Files
Bubberstation/code/datums/achievements
SkyratBot 5231715e9a [MIRROR] Refactors the Heart Attack event. Adds a new related achievement and admin setup. [MDB IGNORE] (#16434)
* Refactors the Heart Attack event. Adds a new related achievement and admin setup. (#70048)

* So, this moves the "candidate" selection into round_event_control and integrates it into part of canspawnevent. The actual selection is part of a new proc, generate_candidates, which was created so that canspawnevent() and admin_setup() (WHICH OVERRIDES CANSPAWNEVENT AND THEREFORE CANDIDATE GENERATION) don't have to share any code.

The heart attack candidates list is passed down from the event control to the round event. This is used for running a second series of checks via attack_heart(), a new proc on the round event.

The heart attack now fires on every tick, until "attacks_left" reaches zero, which is a value inhereted from the round event control (default 1, modifiable in admin setup).

In attack_heart, the victim pick_weight-ed from the victims (formerly candidates) and is checked to see if they'll be spared from their fate for some special reason. This is so that feedback can be given and smugness can be felt over surviving a heart attack. This check was literally the only thing I wanted to implement in this PR and I ended up rewriting most of the entire thing. Wowee.

* Refactors the Heart Attack event. Adds a new related achievement and admin setup.

Co-authored-by: Rhials <Datguy33456@gmail.com>
2022-09-25 20:11:27 -04:00
..