55 if (player.GetSingleAgentCount(
eAgents.HEAVYMETAL) <= SYMPTOMFALLOFF_THRESHOLD3)
57 float waterLoss = (deltaT * (WATER_LOSS_HEAVYMETAL_MAX *
Math.
Max(WATER_LOSS_HEAVYMETAL_MIN, player.GetSingleAgentCountNormalized(
eAgents.HEAVYMETAL))));
58 player.GetStatWater().Add(-waterLoss);
63 if (player.GetSingleAgentCount(
eAgents.HEAVYMETAL) <= SYMPTOMFALLOFF_THRESHOLD2)
65 player.m_AgentPool.AddAgent(
eAgents.HEAVYMETAL, -0.5);
68 if (player.GetSingleAgentCount(
eAgents.HEAVYMETAL) <= SYMPTOMFALLOFF_THRESHOLD3)
72 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_HAND_SHIVER);
116 player.DecreaseDiseaseCount();
132 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_PAIN_LIGHT);
139 float chanceOfDeafness = player.GetSingleAgentCountNormalized(
eAgents.HEAVYMETAL);
142 DoOnce.
Run(ClassName(), player,
"IncreaseDiseaseCount");
143 player.GetSymptomManager().QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_DEAFNESS_COMPLETE);
153 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_DEAFNESS_COMPLETE);
160 player.GetStatWater().Add(-waterLoss);
165 player.m_AgentPool.AddAgent(
eAgents.HEAVYMETAL, -0.5);
202 super.OnActivate(player);
204 player.GetSymptomManager().QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_DEAFNESS_COMPLETE);
205 player.GetSymptomManager().QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_HMP_SEVERE);
210 super.OnDeactivate(player);
212 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_DEAFNESS_COMPLETE);
213 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_HMP_SEVERE);
216 override protected void OnTick(PlayerBase player,
float deltaT)
218 float healthLoss = (deltaT * (HEALTH_LOSS_HEAVYMETAL_MAX * Math.Max(HEALTH_LOSS_HEAVYMETAL_MIN, player.GetSingleAgentCountNormalized(
eAgents.HEAVYMETAL))));
219 player.AddHealth(-healthLoss);
225 SymptomBase symptom = player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_VOMIT);
228 CachedObjectsParams.PARAM1_FLOAT.param1 = 30.0;
229 symptom.
SetParam(CachedObjectsParams.PARAM1_FLOAT);
bool m_TrackActivatedTime
overall time this modifier was active
bool m_AnalyticsStatsEnabled
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
enum eModifierSyncIDs DEFAULT_TICK_TIME_ACTIVE
static void Clear(string key)
static bool Run(string key, Class target, string fnName, Param params=null)
override bool DeactivateCondition(PlayerBase player)
override string GetDebugText()
override bool ActivateCondition(PlayerBase player)
override void OnTick(PlayerBase player, float deltaT)
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
static proto float Max(float x, float y)
Returns bigger of two given values.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].