scripts/4_World/Entities/ManBase/PlayerBase.c
//!returns player's immunity strength between 0..1
returns player's immunity strength between 0..1
returns player ' s immunity strength between 0 .. 1
float GetImmunity()
	{
		if(	GetPlayerStats() ) 
		{
			float max_health = GetMaxHealth("GlobalHealth", "Health") + 0.01;
			float max_blood = GetMaxHealth("GlobalHealth", "Blood") + 0.01;
			return ( GetStatDiet().GetNormalized() + GetStatEnergy().GetNormalized() + (this.GetHealth("GlobalHealth", "Health") / max_health) + (this.GetHealth("GlobalHealth", "Blood") / max_blood) ) / 4;
		}
		return 0;
	}
float GetImmunity ( ) { if ( GetPlayerStats ( ) ) { float max_health = GetMaxHealth ( " " , " " ) + 0.01 ; float max_blood = GetMaxHealth ( " " , " " ) + 0.01 ; return ( GetStatDiet ( ) . GetNormalized ( ) + GetStatEnergy ( ) . GetNormalized ( ) + ( this . GetHealth ( " " , " " ) / max_health ) + ( this . GetHealth ( " " , " " ) / max_blood ) ) / 4 ; } return 0 ; }
returns player's immunity strength between 0..1
returns player ' s immunity strength between 0 .. 1
//addition to prevent divisioin by zero in case of some messup //addition to prevent divisioin by zero in case of some messup