Dayz Explorer 1.29.162510
Loading...
Searching...
No Matches
foodpoisonagent.c
Go to the documentation of this file.
2{
3 override void Init()
4 {
5 m_Type = eAgents.FOOD_POISON;
6 m_Invasibility = 1.0;
7 m_TransferabilityIn = 1.0;
8 m_TransferabilityOut = 0.0;
9 m_AntibioticsResistance = 1.0; //deprecated, use m_DrugResistances to initialize this agents resistance to a given drug
10 m_MaxCount = 800;
11 m_Potency = EStatLevels.GREAT;
12 m_DieOffSpeed = 0.0;
13 m_Digestibility = 0.5;
14
15 }
16
17 override EStatLevels GetPotencyEx(PlayerBase player)
18 {
19 if (player.GetStomach().GetVolumeContainingAgent01(eAgents.FOOD_POISON) == 0.0)
20 return EStatLevels.LOW;
21
22 return super.GetPotencyEx(player);
23 }
24
25 override float GetInvasibilityEx(PlayerBase player)
26 {
27 return player.GetStomach().GetVolumeContainingAgent01(eAgents.FOOD_POISON);
28 }
29
30 override float GetDieOffSpeedEx(PlayerBase player)
31 {
32 if (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_CHARCOAL))
33 return 0.5;
34
35 if (player.m_AgentPool.GetSingleAgentCount(eAgents.FOOD_POISON) <= PoisoningMdfr.AGENT_THRESHOLD_DEACTIVATE)
36 return 0.3;
37
38 return 0.0;
39 }
40
41 override float GetDigestibilityEx(PlayerBase player)
42 {
43 if (!player.GetModifiersManager().IsModifierActive(eModifiers.MDF_POISONING))
44 return 1.0;
45
46 return super.GetDigestibilityEx(player);
47 }
48}
void AgentBase()
how fast the agent dies off when not potent enough to grow(per sec)
Definition agentbase.c:19
float m_DieOffSpeed
grow when player's immune system is at this level or lower
Definition agentbase.c:17
EStatLevels m_Potency
Definition agentbase.c:16
void Init()
eAgents
Definition eagents.c:3
eModifiers
Definition emodifiers.c:2
EStatLevels
Definition estatlevels.c:2