expedition icon indicating copy to clipboard operation
expedition copied to clipboard

Semi-random surges

Open toddmedema opened this issue 5 years ago • 4 comments

Keep the rate of damage constant, but still surprise people

Maybe every 2-4 rounds?

toddmedema avatar Sep 18 '19 00:09 toddmedema

Note that this keeps coming up as a small but persistent point of feedback in user conversations

toddmedema avatar Oct 24 '19 01:10 toddmedema

@toddmedema I have a few theories on how the app could be expanded through randomness even beyond surges. Can you share the "expedition/services/app/src/quests/future_inspirations.xml" .quest file with me so I can see how some of these functions are implemented with QC itself? Thanks!

sciorms avatar Jun 01 '20 15:06 sciorms

@toddmedema I built a semi-random surges prototype in Python that should be easily translated to Expedition which is based off existing values known during a game of Expedition: combat.roundCount and surgePeriod.

Basic overview:

  • Generate percentage chance of a surge occurring
  • Skip the surge if it's the first round of combat (so we do not overwhelm new players)
  • Compare a random number against the probability of a surge occurring
  • When random number is less than the chance of a surge occurring then a surge will occur.
  • If a surge has occurred then do not let another surge occur until the next surge period.
surge_chance = 1 / surgePeriod
is_surge = False

for round in round_num:
    random_num = random.random()

    # round_num == 0 -> skip surge
    if((random_num < surge_chance) and (is_surge == False) and (round != 0)) :
            print(f"Current Round: {round} Surge {surgePeriod} Surge Chance: {surge_chance} Random Number: {random_num} Surge: Yes")
            is_surge = True
            continue

    if((is_surge == True) and (round != 0) and (round % surgePeriod == 0)):
            print(f"Surge Reset Current Round: {round} Surge {surgePeriod} round % surge {round % surge}")
            is_surge = False

Thoughts?

sciorms avatar Jun 15 '20 14:06 sciorms

@smartin015 thoughts? (Since you built this part)

toddmedema avatar Jun 18 '20 19:06 toddmedema