Skip to main content

DownedStateDebuffManager

A class in Root.Township, ATT.PlayerStates.

Tracks the timed stat debuffs a player gets on respawning from the downed state, so they can be removed early. One is made by PlayerStateFactory and shared by every DownedState.

Constructors​

MemberWhat it is
DownedStateDebuffManager()Creates a DownedStateDebuffManager with default values.

Fields​

1 private and internal field
MemberWhat it is
private Dictionary<PlayerCharacter, TimedStatModifier> playerStatModifiersApplied timed modifiers by player character.

Methods​

MemberWhat it is
void ApplyDebuffToPlayer(PlayerCharacter playerCharacter, IEnumerable<StatModifier> debuffs, float duration)Applies each debuff to the player's stats as a timed modifier and records it. A player can only hold one entry, so a second debuff or a second call before removal throws.
void ClearAllDebuffs()Removes every recorded debuff from every player.
void RemoveDebuffsForPlayer(PlayerCharacter playerCharacter)Removes the recorded debuffs from one player. Called by DownedState when the player leaves the state.

Used in​

Members of other types that take, return or hold a DownedStateDebuffManager: