public static void BombardPrefix(ISiegeEventSide siegeEventSide, SiegeEngineType attackerEngineType, SiegeEvent.SiegeEngineConstructionProgress damagedEngine) { if (!IsCatapult(attackerEngineType)) { return; } CalculateBonusDamageAndRates(attackerEngineType, siegeEventSide, out _, out var bonusDamage); damagedEngine.SetHitpoints(damagedEngine.Hitpoints - bonusDamage); }
private static void ApplyPerkToSiegeEngine(SiegeEvent.SiegeEngineConstructionProgress justDeployedEngine, ISiegeEventSide sideSiegeEvent) { CalculateBonusFlatHpAndRateFromPerk(justDeployedEngine, sideSiegeEvent, out var bonusFlatHp, out _); justDeployedEngine.SetHitpoints(justDeployedEngine.Hitpoints + bonusFlatHp); SiegeEngineConstructionExtraDataManager.SetMaxHitPoints(justDeployedEngine, justDeployedEngine.Hitpoints); }
public static void Prefix(ISiegeEventSide siegeEventSide, SiegeEngineType attackerEngineType, SiegeEvent.SiegeEngineConstructionProgress damagedEngine) { CalculateBonusDamageAndRates(attackerEngineType, siegeEventSide, out _, out var bonusDamageOnly); damagedEngine.SetHitpoints(damagedEngine.Hitpoints - bonusDamageOnly); }