// handle downed zombies ==================================================================== // public static bool Downed(Zombie zombie) { if (zombie.IsDowned() == false) { return(false); } if (ZombieSettings.Values.zombiesDieVeryEasily || zombie.IsSuicideBomber || ZombieSettings.Values.doubleTapRequired == false) { zombie.Kill(null); return(true); } var walkCapacity = PawnCapacityUtility.CalculateCapacityLevel(zombie.health.hediffSet, PawnCapacityDefOf.Moving); var missingBrain = zombie.health.hediffSet.GetBrain() == null; if (walkCapacity < 0.25f || missingBrain) { zombie.Kill(null); return(true); } if (++zombie.healCounter >= Constants.ZOMBIE_HEALING_TICKS) { zombie.healCounter = 0; var injuries = zombie.health.hediffSet.GetHediffs <Hediff_Injury>(); foreach (var injury in injuries) { if (ZombieSettings.Values.zombiesDieVeryEasily) { zombie.Kill(null); return(true); } if (Tools.IsCombatExtendedInstalled()) { injury.Heal(combatExtendedHealAmount); } else { injury.Heal(injury.Severity + 0.5f); } break; } } return(false); }