3 const int UNCONSIOUSS_COOLDOWN_TIME = 60;
22 override bool ActivateCondition(
PlayerBase player)
24 if( !player.IsUnconscious() && player.GetHealth(
"",
"Blood") <=
PlayerConstants.SHOCK_DAMAGE_BLOOD_THRESHOLD_HIGH &&
GetGame().
GetTime() > (player.m_UnconsciousEndTime + UNCONSIOUSS_COOLDOWN_TIME) )
34 override bool DeactivateCondition(
PlayerBase player)
36 return !ActivateCondition(player);
40 override void OnTick(
PlayerBase player,
float deltaT)
42 float blood = player.GetHealth(
"",
"Blood");
44 value =
Math.Clamp(value,0,1);
46 float damage = -dmg * deltaT;
47 player.AddHealth(
"",
"Shock", damage);