ExpeditionRPG / expedition

Expedition: The Cards & App RPG
https://ExpeditionGame.com
Other
78 stars 26 forks source link

Semi-random surges #783

Open toddmedema opened 4 years ago

toddmedema commented 4 years ago

Keep the rate of damage constant, but still surprise people

Maybe every 2-4 rounds?

toddmedema commented 4 years ago

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

sciorms commented 4 years ago

@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 commented 4 years ago

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

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 commented 4 years ago

@smartin015 thoughts? (Since you built this part)