3 const int AGENT_THRESHOLD_ACTIVATE = 300;
4 const int AGENT_THRESHOLD_DEACTIVATE = 200;
14 override string GetDebugText()
16 return (
"Activate threshold: "+AGENT_THRESHOLD_ACTIVATE +
"| " +
"Deativate threshold: "+AGENT_THRESHOLD_DEACTIVATE);
19 override protected bool ActivateCondition(
PlayerBase player)
21 if(player.GetSingleAgentCount(
eAgents.INFLUENZA) >= AGENT_THRESHOLD_ACTIVATE)
28 override protected void OnActivate(
PlayerBase player)
30 player.IncreaseDiseaseCount();
33 override protected void OnDeactivate(
PlayerBase player)
35 player.DecreaseDiseaseCount();
38 override protected bool DeactivateCondition(
PlayerBase player)
40 return (player.GetSingleAgentCount(
eAgents.INFLUENZA) <= AGENT_THRESHOLD_DEACTIVATE);
43 override protected void OnTick(
PlayerBase player,
float deltaT)
45 float chance_of_cough = player.GetSingleAgentCountNormalized(
eAgents.INFLUENZA);
47 if(
Math.RandomFloat01() < chance_of_cough /
Math.RandomInt(5,20) )
49 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);