3 static const int AGENT_THRESHOLD_ACTIVATE = 250;
4 static const int AGENT_THRESHOLD_DEACTIVATE = 0;
6 static const int PAIN_EVENT_INTERVAL_MIN = 6;
7 static const int PAIN_EVENT_INTERVAL_MAX = 12;
10 static const float DAMAGE_PER_SEC = 0.04;
12 protected float m_NextEvent;
13 protected float m_Time;
24 override string GetDebugText()
26 return (
"Activate threshold: "+AGENT_THRESHOLD_ACTIVATE +
"| " +
"Deativate threshold: "+AGENT_THRESHOLD_DEACTIVATE);
29 override protected bool ActivateCondition(
PlayerBase player)
31 if(player.GetSingleAgentCount(
eAgents.WOUND_AGENT) >= AGENT_THRESHOLD_ACTIVATE)
41 override protected void OnActivate(
PlayerBase player)
43 player.IncreaseDiseaseCount();
44 m_NextEvent =
Math.RandomFloatInclusive( PAIN_EVENT_INTERVAL_MIN, PAIN_EVENT_INTERVAL_MAX );
46 SymptomBase shivers = player.GetSymptomManager().QueueUpSecondarySymptomEx(SymptomIDs.SYMPTOM_HAND_SHIVER);
55 override protected void OnDeactivate(
PlayerBase player)
57 player.DecreaseDiseaseCount();
58 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_HAND_SHIVER);
61 override protected bool DeactivateCondition(
PlayerBase player)
63 if(player.GetSingleAgentCount(
eAgents.WOUND_AGENT) <= AGENT_THRESHOLD_DEACTIVATE)
73 override protected void OnTick(
PlayerBase player,
float deltaT)
77 if (
m_Time >= m_NextEvent )
79 if( player.IsAntibioticsActive() )
81 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_PAIN_LIGHT);
85 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_PAIN_HEAVY);
86 float damage =
m_Time * (DAMAGE_PER_SEC + player.GetHealthRegenSpeed());
87 player.AddHealth(
"",
"", -damage);
91 m_NextEvent =
Math.RandomFloatInclusive( PAIN_EVENT_INTERVAL_MIN, PAIN_EVENT_INTERVAL_MAX );