Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semi-random surges #783

Open
toddmedema opened this issue Sep 18, 2019 · 4 comments
Open

Semi-random surges #783

toddmedema opened this issue Sep 18, 2019 · 4 comments
Labels

Comments

@toddmedema
Copy link
Contributor

Keep the rate of damage constant, but still surprise people

Maybe every 2-4 rounds?

@toddmedema toddmedema added the app label Sep 18, 2019
@toddmedema
Copy link
Contributor Author

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

@sciorms
Copy link
Contributor

sciorms commented Jun 1, 2020

@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
Copy link
Contributor

sciorms commented Jun 15, 2020

@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?

@toddmedema
Copy link
Contributor Author

@smartin015 thoughts? (Since you built this part)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants