3 static const int AGENT_THRESHOLD_ACTIVATE = 2000;
4 static const int AGENT_THRESHOLD_DEACTIVATE = 0;
5 const int SHAKE_INTERVAL_MIN = 1;
6 const int SHAKE_INTERVAL_MAX = 4;
20 override string GetDebugText()
22 return (
"Activate threshold: "+AGENT_THRESHOLD_ACTIVATE +
"| " +
"Deativate threshold: "+AGENT_THRESHOLD_DEACTIVATE);
25 override protected bool ActivateCondition(
PlayerBase player)
27 if(player.GetSingleAgentCount(
eAgents.BRAIN) >= AGENT_THRESHOLD_ACTIVATE)
37 override protected void OnActivate(
PlayerBase player)
39 player.IncreaseDiseaseCount();
42 override protected void OnDeactivate(
PlayerBase player)
44 player.DecreaseDiseaseCount();
47 override protected bool DeactivateCondition(
PlayerBase player)
49 if(player.GetSingleAgentCount(
eAgents.BRAIN) <= AGENT_THRESHOLD_DEACTIVATE)
59 override protected void OnTick(
PlayerBase player,
float deltaT)
62 float brain_agents = player.GetSingleAgentCountNormalized(
eAgents.BRAIN) / 8.0;
63 float chance_of_laughter =
Math.RandomFloat01();
65 if( chance_of_laughter < brain_agents )
67 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_LAUGHTER);
70 if(
m_Time >= m_ShakeTime )
73 m_ShakeTime =
m_Time +
Math.RandomFloat(SHAKE_INTERVAL_MIN, SHAKE_INTERVAL_MAX);