Changes to First Infection Skip Chance & Class Injection #83
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current implementation of Skip Chance allows uncommon cases where a player can be picked as a mother zombie 2 (or even more) rounds in a row. While not problematic for the gamemode's functioning, it can be rather frustrating for the player it happens to. This PR fixes that behaviour and causes players picked as mother zombies to have immunity from being picked as MZ in the next round. In following rounds, player will still have high Skip Chance value (and there will be other players to pick), so the effect of players being MZs only once every couple rounds is still achieved. On average, at least.
This PR also adds a fail safe to the First Infection loop that resets everyone but already picked MZs' Skip Chances to 0, akin to CS:GO's Z:R resetting Infection Cycle. This should fire only in very fringe cases. I do not know if it's needed, but I've added it just in case.
Changes in this PR: