-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
/tg/ Status Effects Part 2 - datum, KD, KO, Stuns (#4842)
# About the pull request <!-- Remove this text and explain what the purpose of your PR is. Mention if you have tested your changes. If you changed a map, make sure you used the mapmerge tool. If this is an Issue Correction, you can type "Fixes Issue #169420" to link the PR to the corresponding Issue number #169420. Remember: something that is self-evident to you might not be to others. Explain your rationale fully, even if you feel it goes without saying. --> Part 2 - this includes porting the actual status_effect datum, modifying it to fit our purposes by backing it with timers similarly to old system, and finally implementing KD, KO and Stun with it. This contains Part 1 PR (#4828) so if you want to take a look at it I'd advise checking the last commits or setting up a compare between both branches. # Explain why it's good for the game Predictable status timers. Current ones are bogus in their handling of "life tick correction" and will "stack" time even when they're not supposed to. Also provides a more robust backend for general effects, and integrates status effects into it. # Testing Photographs and Procedure Summary testing of buckling interactions, explosion knock times, crawling, resting. Will have to be expanded once part 1 is ready # Changelog :cl: add: Added Buckled, Handcuffed and Legcuffed screen alerts code: Ported /tg/ status effects backend, modified with timers to let effects end at appropriate time code: Stun, Knockdown and Knockout now use the new effects backend balance: Due to backend change, all KO/KD/Stuns may behave differently timing wise. This is of course subject to adjustments. balance: Endurance is now set at 8% effect duration reduction per level above 1. However it now compounds with species bonus. Feel free to adjust. balance: Knockdowns are not inherently incapacitating anymore and many sources of it have been updated to also stun to make up for it. fix: KO/KD/Stuns do not artificially and randomly ''stack'' due to incorrect timer offset calculation anymore. fix: Stuns now correctly apply Stun reduction values instead of Knockdown reductions. fix: Crawling can now be interrupted by a normal move, if you are fit enough to do so. /:cl: --------- Co-authored-by: forest2001 <[email protected]>
- Loading branch information
1 parent
553fa38
commit 55f9dd8
Showing
75 changed files
with
1,172 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#define ALERT_BUCKLED "buckled" | ||
#define ALERT_HANDCUFFED "handcuffed" | ||
#define ALERT_LEGCUFFED "legcuffed" | ||
#define ALERT_FLOORED "floored" | ||
#define ALERT_INCAPACITATED "incapacitated" | ||
#define ALERT_KNOCKEDOUT "knockedout" | ||
#define ALERT_IMMOBILIZED "immobilized" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
///if it allows multiple instances of the effect | ||
#define STATUS_EFFECT_MULTIPLE 0 | ||
///if it allows only one, preventing new instances | ||
#define STATUS_EFFECT_UNIQUE 1 | ||
///if it allows only one, but new instances replace | ||
#define STATUS_EFFECT_REPLACE 2 | ||
/// if it only allows one, and new instances just instead refresh the timer | ||
#define STATUS_EFFECT_REFRESH 3 | ||
|
||
///Processing flags - used to define the speed at which the status will work | ||
///This is fast - 0.2s between ticks (I believe!) | ||
#define STATUS_EFFECT_FAST_PROCESS 0 | ||
///This is slower and better for more intensive status effects - 1s between ticks | ||
#define STATUS_EFFECT_NORMAL_PROCESS 1 | ||
|
||
//Incapacitated status effect flags | ||
/// If the incapacitated status effect will ignore a mob in restraints (handcuffs) | ||
#define IGNORE_RESTRAINTS (1<<0) | ||
/// If the incapacitated status effect will ignore a mob in stasis (stasis beds) | ||
#define IGNORE_STASIS (1<<1) | ||
/// If the incapacitated status effect will ignore a mob being agressively grabbed | ||
#define IGNORE_GRAB (1<<2) | ||
|
||
/// Time threshold after which we launch ending timer - this should be higher than the slowest processing rate | ||
#define STATUS_EFFECT_TIME_THRESHOLD (2 SECONDS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
PROCESSING_SUBSYSTEM_DEF(effects) | ||
name = "Effects" | ||
wait = 1 SECONDS | ||
flags = SS_NO_INIT | SS_KEEP_TIMING | ||
priority = SS_PRIORITY_EFFECTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PROCESSING_SUBSYSTEM_DEF(fasteffects) | ||
name = "Fast Effects" | ||
wait = 0.2 SECONDS | ||
priority = SS_PRIORITY_FASTEFFECTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
PROCESSING_SUBSYSTEM_DEF(oldeffects) | ||
name = "Old Effects" | ||
wait = 1 SECONDS | ||
flags = SS_NO_INIT | SS_KEEP_TIMING | ||
priority = SS_PRIORITY_OLDEFFECTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.