Paradise
Paradise copied to clipboard
Implements dynamic latespawns
What Does This PR Do
Generalizes the dynamic gamemode latespawn system to all antagonists. Latespawns were previously only implemented for traitors.
Brief description of how dynamic works:
- A random amount of rulesets are chosen at the start of the round. A ruleset is basically the type of antagonist that will be rolled.
- One antag from each ruleset is spawned, and their cost subtracted from the antagonist budget (if there are enough candidates).
- Antagonists are randomly rolled from the chosen rulesets until the budget is gone.
- Late joins increase the antagonist budget over the rest of the round.
My implementation works like this:
- When a latejoin happens, we check if there's enough banked budget to buy an antagonist.
- If there is, antagonists are randomly rolled from the round's rulesets until the budget is yet again exhausted.
Essentially, every antagonist now works like autotraitor.
Why It's Good For The Game
Testing
I tested it as best as I can locally, but this needs a TM.
Declaration
- [x] I confirm that I either do not require pre-approval for this PR, or I have obtained such approval and have included a screenshot to demonstrate this below.
Changelog
:cl: add: Vampires, Changelings, and Mindflayers can now be rolled mid-round. /:cl:
Post-TM update changelog:
- Removed the autotraitor ruleset.
- Prevented explorers from getting latespawned as vampires.
- Fixed mindflayer ruleset not respecting banned jobs.
- Tweaked budget population scaling formula to round result up to the nearest whole number.
- Tweaked how the latespawn budget threshold is calculated. It is now set to the most expensive ruleset of the round. For example, if the rulesets were traitor (7 budget) and vampire (10 budget),
min_latespawn_budgetwould be set to 10.
Can the budget increase after it's been exhausted, say if an antag cryos?