3 const int AGENT_THRESHOLD_ACTIVATE = 200;
4 const int AGENT_THRESHOLD_DEACTIVATE = 100;
13 override string GetDebugText()
15 return (
"Activate threshold: "+AGENT_THRESHOLD_ACTIVATE +
"| " +
"Deativate threshold: "+AGENT_THRESHOLD_DEACTIVATE);
18 override bool ActivateCondition(
PlayerBase player)
20 if(player.GetSingleAgentCount(
eAgents.INFLUENZA) >= AGENT_THRESHOLD_ACTIVATE)
30 override protected void OnActivate(
PlayerBase player)
33 player.IncreaseDiseaseCount();
36 override protected void OnDeactivate(
PlayerBase player)
39 player.DecreaseDiseaseCount();
43 override protected bool DeactivateCondition(
PlayerBase player)
45 return (player.GetSingleAgentCount(
eAgents.INFLUENZA) <= AGENT_THRESHOLD_DEACTIVATE);
48 override protected void OnTick(
PlayerBase player,
float deltaT)
50 float chance_of_sneeze = player.GetSingleAgentCountNormalized(
eAgents.INFLUENZA);
52 if(
Math.RandomFloat01() < chance_of_sneeze /
Math.RandomInt(15,20) )
54 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_SNEEZE);