public void NormalDamageVersusShips() { attackerDesign.AddComponent(mod.ComponentTemplates.FindByName("Depleted Uranium Cannon I")); attacker = attackerDesign.Instantiate(); // armor should get hit before hull defenderDesign.AddComponent(mod.ComponentTemplates.FindByName("Armor I")); SetupDefender(); TestDamage(attacker, defender, 1, expectedArmorDmg: 1); // phased shields should get hit before normal shields defenderDesign.AddComponent(mod.ComponentTemplates.FindByName("Shield Generator I")); defenderDesign.AddComponent(mod.ComponentTemplates.FindByName("Phased - Shield Generator I")); SetupDefender(); TestDamage(attacker, defender, 1, expectedNormalShieldDmg: 1); // make sure our ship can be destroyed SetupDefender(); TestDamage(attacker, defender, 99999, defender.HullHitpoints, defender.ArmorHitpoints, defender.PhasedShields, defender.NormalShields); }
private void SetupDefender() { defender = defenderDesign.Instantiate(); Heal(defender); }