3 private const float UNCONSCIOUS_LIMIT = 50;
4 private const float SHOCK_INCREMENT_PER_SEC = 1;
15 override bool ActivateCondition(
PlayerBase player)
20 override bool DeactivateCondition(
PlayerBase player)
35 if ( player.m_IsDrowning )
39 if ( player.IsUnconscious() )
41 if ( player.GetHealth(
"GlobalHealth",
"Blood") <=
PlayerConstants.SL_BLOOD_CRITICAL )
47 return CfgGameplayHandler.GetShockRefillSpeedUnconscious() * player.m_UnconRefillModifier;
54 if ( player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS && (player.IsSwimming() || player.IsClimbingLadder()) )
61 override void OnTick(
PlayerBase player,
float deltaT)
66 if (!player.IsUnconscious())
67 player.m_UnconRefillModifier = 1;
69 if (player.GetHealth01(
"",
"Shock") == 1)
73 player.m_UnconRefillModifier = 1;
75 player.AddHealth(
"",
"Shock", deltaT * GetRefillSpeed(player) );