From 8afab92c7f9a2eaa7c19c7dbae77c15bdb8e8faf Mon Sep 17 00:00:00 2001 From: DarkTerraYT Date: Fri, 31 May 2024 22:16:32 -0400 Subject: [PATCH] Some fixes I forgor --- Api/Enhancements/ModEnhancement.cs | 2 ++ Api/Enhancements/Normal/Damage1.cs | 2 ++ Api/Enhancements/Normal/Damage2.cs | 4 ++++ Api/Enhancements/Normal/Pierce1.cs | 2 ++ Api/Enhancements/Normal/Pierce2.cs | 2 ++ Api/Enhancements/Normal/Pierce3.cs | 2 ++ Api/Enhancements/Normal/Pierce4.cs | 4 ++++ Api/Enhancements/Normal/Range1.cs | 4 +++- Api/Enhancements/Normal/Range2.cs | 4 ++++ Api/Enhancements/Normal/Rate1.cs | 2 ++ Api/Enhancements/Normal/Rate2.cs | 2 ++ Api/Enhancements/Normal/Rate3.cs | 2 ++ 12 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Api/Enhancements/ModEnhancement.cs b/Api/Enhancements/ModEnhancement.cs index 92b0501..ccce33d 100644 --- a/Api/Enhancements/ModEnhancement.cs +++ b/Api/Enhancements/ModEnhancement.cs @@ -136,6 +136,8 @@ public void ApplyEnhancement(Il2CppAssets.Scripts.Simulation.Towers.Tower tower) } } + Cost *= (int)(Cost * CostMultiplier); + ModifyOther(); AbilityMenu.instance.AbilitiesChanged(); // Update Ability Menu diff --git a/Api/Enhancements/Normal/Damage1.cs b/Api/Enhancements/Normal/Damage1.cs index 1000c87..f35f956 100644 --- a/Api/Enhancements/Normal/Damage1.cs +++ b/Api/Enhancements/Normal/Damage1.cs @@ -18,6 +18,8 @@ internal class Damage1 : ProgressionModEnhancement public override string Description => "Increases damage by 1"; + public override string EnhancementName => "Damage 1"; + public override float CostMultiplier => 1.5f; public override EnhancementType EnhancementGroup => EnhancementType.Normal; diff --git a/Api/Enhancements/Normal/Damage2.cs b/Api/Enhancements/Normal/Damage2.cs index 61d656e..be093be 100644 --- a/Api/Enhancements/Normal/Damage2.cs +++ b/Api/Enhancements/Normal/Damage2.cs @@ -18,12 +18,16 @@ internal class Damage2 : ModEnhancement public override string Description => "Increases damage by 2"; + public override string EnhancementName => "Damage 2"; + public override float CostMultiplier => 1.5f; public override EnhancementType EnhancementGroup => EnhancementType.Normal; public override ModifyType Modifies => ModifyType.Weapon; + public override bool LockedByDefault => true; + protected override void ModifyTower(TowerModel towerModel) { foreach (var damageModel in towerModel.GetDescendants().ToList()) diff --git a/Api/Enhancements/Normal/Pierce1.cs b/Api/Enhancements/Normal/Pierce1.cs index 867db22..7924b3d 100644 --- a/Api/Enhancements/Normal/Pierce1.cs +++ b/Api/Enhancements/Normal/Pierce1.cs @@ -16,6 +16,8 @@ public class Pierce1 : ProgressionModEnhancement public override int Priority => 0; + public override string EnhancementName => "Pierce 1"; + public override uint Max => 8; public override EnhancementLevel NewEnhancementLevel => EnhancementLevel.Basic; diff --git a/Api/Enhancements/Normal/Pierce2.cs b/Api/Enhancements/Normal/Pierce2.cs index 5273aef..81628cf 100644 --- a/Api/Enhancements/Normal/Pierce2.cs +++ b/Api/Enhancements/Normal/Pierce2.cs @@ -20,6 +20,8 @@ public class Pierce2 : ProgressionModEnhancement public override EnhancementLevel NewEnhancementLevel => EnhancementLevel.Basic; + public override string EnhancementName => "Pierce 2"; + public override ModifyType Modifies => ModifyType.Projectile; public override bool LockedByDefault => true; diff --git a/Api/Enhancements/Normal/Pierce3.cs b/Api/Enhancements/Normal/Pierce3.cs index 3652ae9..79a05c9 100644 --- a/Api/Enhancements/Normal/Pierce3.cs +++ b/Api/Enhancements/Normal/Pierce3.cs @@ -22,6 +22,8 @@ public class Pierce3 : ProgressionModEnhancement public override EnhancementLevel NewEnhancementLevel => EnhancementLevel.Basic; + public override string EnhancementName => "Pierce 3"; + public override ModifyType Modifies => ModifyType.Projectile; public override void ModifyTower(Il2CppAssets.Scripts.Simulation.Towers.Tower tower) diff --git a/Api/Enhancements/Normal/Pierce4.cs b/Api/Enhancements/Normal/Pierce4.cs index a2e8fd8..4673d17 100644 --- a/Api/Enhancements/Normal/Pierce4.cs +++ b/Api/Enhancements/Normal/Pierce4.cs @@ -16,10 +16,14 @@ public class Pierce4 : ModEnhancement public override int Priority => 0; + public override uint Max => 50; + public override EnhancementLevel NewEnhancementLevel => EnhancementLevel.Basic; public override ModifyType Modifies => ModifyType.Projectile; + public override string EnhancementName => "Pierce 4"; + public override bool LockedByDefault => true; public override void ModifyTower(Il2CppAssets.Scripts.Simulation.Towers.Tower tower) diff --git a/Api/Enhancements/Normal/Range1.cs b/Api/Enhancements/Normal/Range1.cs index b167e1d..540d0ed 100644 --- a/Api/Enhancements/Normal/Range1.cs +++ b/Api/Enhancements/Normal/Range1.cs @@ -20,7 +20,9 @@ public class Range1 : ProgressionModEnhancement public override ModifyType Modifies => ModifyType.Tower; - public override uint Max => 5; + public override string EnhancementName => "Range 1"; + + public override uint Max => 6; public override void ModifyTower(Il2CppAssets.Scripts.Simulation.Towers.Tower tower) { diff --git a/Api/Enhancements/Normal/Range2.cs b/Api/Enhancements/Normal/Range2.cs index 441921c..f9785dc 100644 --- a/Api/Enhancements/Normal/Range2.cs +++ b/Api/Enhancements/Normal/Range2.cs @@ -14,8 +14,12 @@ public class Range2 : ModEnhancement public override float CostMultiplier => 1.75f; + public override uint Max => 7; + public override int Priority => 1; + public override string EnhancementName => "Range 2"; + public override EnhancementLevel NewEnhancementLevel => EnhancementLevel.Basic; public override EnhancementType EnhancementGroup => EnhancementType.Normal; diff --git a/Api/Enhancements/Normal/Rate1.cs b/Api/Enhancements/Normal/Rate1.cs index fda42b4..a274dfd 100644 --- a/Api/Enhancements/Normal/Rate1.cs +++ b/Api/Enhancements/Normal/Rate1.cs @@ -18,6 +18,8 @@ internal class Rate1 : ProgressionModEnhancement public override int Priority => 0; public override float CostMultiplier => 1; + public override string EnhancementName => "Rate 1"; + public override EnhancementLevel NewEnhancementLevel => EnhancementLevel.Good; public override EnhancementType EnhancementGroup => EnhancementType.Normal; diff --git a/Api/Enhancements/Normal/Rate2.cs b/Api/Enhancements/Normal/Rate2.cs index 36293c0..dfbb7aa 100644 --- a/Api/Enhancements/Normal/Rate2.cs +++ b/Api/Enhancements/Normal/Rate2.cs @@ -18,6 +18,8 @@ internal class Rate2 : ProgressionModEnhancement public override int Priority => 0; public override float CostMultiplier => 1; + public override string EnhancementName => "Rate 2"; + public override EnhancementLevel NewEnhancementLevel => EnhancementLevel.Good; public override EnhancementType EnhancementGroup => EnhancementType.Normal; diff --git a/Api/Enhancements/Normal/Rate3.cs b/Api/Enhancements/Normal/Rate3.cs index 6ad42e1..e6f096f 100644 --- a/Api/Enhancements/Normal/Rate3.cs +++ b/Api/Enhancements/Normal/Rate3.cs @@ -19,6 +19,8 @@ internal class Rate3 : ModEnhancement public override float CostMultiplier => 1; + public override string EnhancementName => "Rate 3"; + public override EnhancementLevel NewEnhancementLevel => EnhancementLevel.Good; public override EnhancementType EnhancementGroup => EnhancementType.Normal;