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

Changes to First Infection Skip Chance & Class Injection #83

Merged
merged 5 commits into from
Oct 30, 2023

Conversation

Faramour
Copy link
Collaborator

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:

  • Remove reduction to player's Skip Chance on avoiding being picked as a mother zombie
  • Move per-round reduction of players Skip Chances to happen after mother zombies have been picked, and make it only reduce Skip Chance of players not picked as MZ (so MZ have 100% Skip Chance on next round)
  • Include a fail safe that will reset everyone but mother zombies' Skip Chance in case the First Infection logic loops too many times without having picked enough MZs (no idea if it's necessary, added for good measure)

@Vauff Vauff changed the title Changes to First Infection Skip Chance Changes to First Infection Skip Chance & Class Injection Oct 30, 2023
@Vauff Vauff merged commit 0a2af90 into Source2ZE:main Oct 30, 2023
1 check passed
@Faramour Faramour deleted the skip-chance-stuff branch October 30, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants