forked from mipen/BannerlordTweaks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTweakedSiegeEventModel.cs
33 lines (30 loc) · 1.52 KB
/
TweakedSiegeEventModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using TaleWorlds.CampaignSystem;
using TaleWorlds.CampaignSystem.SandBox.GameComponents;
using TaleWorlds.Core;
namespace BannerlordTweaks
{
public class TweakedSiegeEventModel : DefaultSiegeEventModel
{
public override float GetConstructionProgressPerHour(SiegeEngineType type, SiegeEvent siegeEvent, ISiegeEventSide side, StatExplainer explanation = null)
{
if (Settings.Instance.SiegeConstructionProgressPerDayMultiplierEnabled)
return base.GetConstructionProgressPerHour(type, siegeEvent, side, explanation) * Settings.Instance.SiegeConstructionProgressPerDayMultiplier;
else
return base.GetConstructionProgressPerHour(type, siegeEvent, side, explanation);
}
public override float GetColleteralDamageCasualties(SiegeEngineType siegeEngineType)
{
if (Settings.Instance.SiegeCasualtiesTweakEnabled)
return base.GetColleteralDamageCasualties(siegeEngineType) * Settings.Instance.SiegeCollateralDamageCasualties;
else
return base.GetColleteralDamageCasualties(siegeEngineType);
}
public override float GetDestructionCasualties(SiegeEngineType destroyedSiegeEngine)
{
if (Settings.Instance.SiegeCasualtiesTweakEnabled)
return base.GetDestructionCasualties(destroyedSiegeEngine) * Settings.Instance.SiegeDestructionCasualties;
else
return base.GetDestructionCasualties(destroyedSiegeEngine);
}
}
}