luciensadi / AwakeMUD

The Community Edition fork of the 'Awakened Worlds' Shadowrun 3 MUD codebase.
Other
56 stars 32 forks source link

Initiative revision, limiting int version #685

Closed jdevnull closed 1 year ago

jdevnull commented 1 year ago

This solution to the problem of arbitrary time until next global initiative reroll uses a limiting int, initiative_until_global_reroll. Its value is set by the initiative of the first combatant added to an empty combat_list, or by the highest initiative of a global init reroll. It is then reduced by 10 at the completion of each pass, and causes a global init reroll when <= 0.

jdevnull commented 1 year ago

Note: the problem with the existing (live) solution is if the combat list is empty, the first combatant added to the list is then excluded from subsequent re-ordering, to include when their opponent is added to the list. This means they will get to act before their opponent, regardless of their opponent's initiative.