69 if (agentPotency <= immunityLevel)
72 if (temporaryResistance > 1.0)
82 growDelta = invasibility * deltaT;
87 growDelta = -dieOffSpeed * deltaT;
91 float newCount = oldCount + growDelta;
92 newCount =
Math.
Clamp(newCount, 0, maxCount);
105 if (temporaryResistance > 1.0)
107 float newResistanceValue = temporaryResistance - deltaTime;
119 foreach (
int agentId : agentList)
136 if (!ctx.
Read(count))
141 for (
int i = 0; i < count; ++i)
144 if (!ctx.
Read(agentId))
148 if (!ctx.
Read(agentCount))
153 float agentTemporaryResistanceTime;
154 if (!ctx.
Read(agentTemporaryResistanceTime))
183 float newValue =
m_VirusPool.Get(agent_id) + count;
204 float reduction = percent * 0.01;
207 agentCount -= agentCount * reduction;
237 for (
int i = 0; i < count; ++i)
275 float delta = attack_value * resistance;
277 float newAgentCount = actualAgentCount - delta;
294 float newAgentCount = actualAgentCount - attackValue;
335 for (
int i = 0; i < count; i++)
338 string agentName = agent.
GetName();
345 object_out.Insert(
new Param4<string,string, int, float>(agentName, amount, agentId, tempResistance));
348 object_out.InsertAt(
new Param1<int>(count) ,0);
PluginBase GetPlugin(typename plugin_type)
bool IsPluginManagerExists()
bool AutoinfectCheck(float deltaT, PlayerBase player)
static ref Param1< int > PARAM1_INT
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
void OnStoreSave(ParamsWriteContext ctx)
void DrugsAttack(EMedicalDrugsType drugType, float attackValue)
void RemoteGrowRequestDebug(ParamsReadContext ctx)
float GetTotalAgentCount()
void SetTemporaryResistance(int agentId, float time)
void PlayerAgentPool(PlayerBase player)
PluginTransmissionAgents m_PluginTransmissionAgents
void RemoveAgent(int agent_id)
ref array< int > m_VirusPoolArray
DEPRECATED.
void AddAgent(int agent_id, float count)
ref map< int, float > m_AgentTemporaryResistance
ref map< int, float > m_VirusPool
float GetTemporaryResistance(int agentId)
void ImmuneSystemTick(float value, float deltaT)
void AntibioticsAttack(float attack_value)
void ProcessTemporaryResistance(float deltaTime)
void ReduceAgent(int id, float percent)
bool OnStoreLoad(ParamsReadContext ctx, int version)
void ResetTemporaryResistance()
void DigestAgent(int agent_id, float count)
const int STORAGE_VERSION
void SetAgentCount(int agent_id, float count)
void GetDebugObject(array< ref Param > object_out)
int GetSingleAgentCount(int agent_id)
void SpawnAgents(float deltaT)
void GrowAgents(float deltaT)
proto bool Write(void value_out)
proto bool Read(void value_in)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
Serializer ParamsWriteContext
static proto int AbsInt(int i)
Returns absolute value.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.