Exemple #1
0
        protected override void AssignShotsToKillData(EntitySystem Weapon, GameEntity entity)
        {
            int damageIWouldDo = Weapon.GetAttackPowerAgainst(entity);

            if (damageIWouldDo <= 0)
            {
                entity.Working_FindTargetOnly_ShotsToKill = 9999;
            }
            else
            {
                entity.Working_FindTargetOnly_ShotsToKill = (((FInt)entity.GetCurrentHullPoints() + (FInt)entity.EstimatedTotalShieldPointsOfProtectors) / damageIWouldDo).GetNearestIntPreferringHigher();
                entity.Working_FindTargetOnly_ShotsToKill = Math.Max(1, entity.Working_FindTargetOnly_ShotsToKill);
            }
        }