DayZ 1.24
Loading...
Searching...
No Matches
AgentBase.c
Go to the documentation of this file.
2{
3 float m_Type = 0;
4 float m_Invasibility; //how fast the agent grows when potent enough to grow
5 float m_TransferabilityIn; //to the player
6 float m_TransferabilityOut; //from the player
7 float m_Digestibility = 0.1; //multiplier for agents digested in the player stomach from an infected item(agents_transfered = digested_amount(in grams or mls) * m_Digestibility)
8 int m_MaxCount = 1;
9 float m_AutoinfectProbability = CalculateAutoinfectProbability(0); // [0..1], 0 = zero chance, 1 = 100% chance of getting this agent once per hour
10 float m_TransferabilityAirOut; // transferibility airborne out
11 float m_AntibioticsResistance = 1; //[0..1], 0 means antibiotics have full effect, 1 means no effect
12
13 EStatLevels m_Potency = EStatLevels.MEDIUM; //grow when player's immune system is at this level or lower
14 float m_DieOffSpeed = 1; //how fast the agent dies off when not potent enough to grow(per sec)
15
16 void AgentBase()
17 {
18 Init();
19 }
20
21 void Init();
22
24 {
25 return m_Type;
26 }
27
29 {
30 return GetDieOffSpeed();
31 }
32
34 {
35 return GetPotency();
36 }
37
39 {
40 return GetInvasibility();
41 }
42
44 {
45 return m_Potency;
46 }
47
49 {
50 return m_DieOffSpeed;
51 }
52
54 {
55 return m_AntibioticsResistance;
56 }
58 {
59 return GetAntiboticsResistance();
60 }
61
63 {
64 return m_Invasibility;
65 }
66 //should this agent grow based on invasibility even during antibiotics attack
68 {
69 return true;//for legacy balancing reasons, set to true by default
70 }
71
73 {
74 return m_Digestibility;
75 }
76
78 {
79 return (1 - Math.Pow(1 - userprob, (1 / 1200)));
80 }
81
83 {
84 if (m_AutoinfectProbability == 0.0)
85 return false;
86
88
89 if (dice_throw < m_AutoinfectProbability)
91 else
92 return false;
93 }
94
96 {
97 return false;
98 }
99
101 {
102 return m_TransferabilityIn;
103 }
104
106 {
107 return m_TransferabilityOut;
108 }
109
111 {
112 return m_TransferabilityAirOut;
113 }
114
116 {
117 return m_MaxCount;
118 }
119
120 string GetName()
121 {
122 return ClassName();
123 }
124}
eBleedingSourceType m_Type
EStatLevels
Definition EStatLevels.c:2
override bool CanAutoinfectPlayer(PlayerBase player)
override void Init()
Definition BrainAgent.c:3
Definition EnMath.c:7
float GetInvasibilityEx(PlayerBase player)
Definition AgentBase.c:38
float GetDigestibility()
Definition AgentBase.c:72
float GetInvasibility()
Definition AgentBase.c:62
float GetDieOffSpeedEx(PlayerBase player)
Definition AgentBase.c:28
float GetTransferabilityAirOut()
Definition AgentBase.c:110
bool AutoinfectCheck(float deltaT, PlayerBase player)
Definition AgentBase.c:82
float GetAntiboticsResistance()
Definition AgentBase.c:53
float m_TransferabilityAirOut
Definition AgentBase.c:10
EStatLevels GetPotencyEx(PlayerBase player)
Definition AgentBase.c:33
float m_TransferabilityOut
Definition AgentBase.c:6
float m_TransferabilityIn
Definition AgentBase.c:5
float GetTransferabilityOut()
Definition AgentBase.c:105
bool CanAutoinfectPlayer(PlayerBase player)
Definition AgentBase.c:95
float GetAntibioticsResistanceEx(PlayerBase player)
Definition AgentBase.c:57
float GetDieOffSpeed()
Definition AgentBase.c:48
float GetTransferabilityIn()
Definition AgentBase.c:100
float CalculateAutoinfectProbability(float userprob)
Definition AgentBase.c:77
bool GrowDuringAntibioticsAttack(PlayerBase player)
Definition AgentBase.c:67
EStatLevels GetPotency()
Definition AgentBase.c:43
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:126
static proto float Pow(float v, float power)
Return power of v ^ power.