diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99e1cc8..2a69336 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,6 @@ on: env: PROJECT_NAME: CardMonkey - MELONLOADER_BRANCH: alpha-development MOD_HELPER_NAME: Btd6ModHelper BLOONSTD6: ./BloonsTD6 @@ -107,7 +106,7 @@ jobs: - name: Upload Mod DLL - uses: actions/upload-artifact@v2.2.4 + uses: actions/upload-artifact@v3 with: name: ${{ env.PROJECT_NAME }}.dll path: ${{ env.BLOONSTD6 }}/Mods/${{ env.PROJECT_NAME }}.dll diff --git a/CardMonkey.cs b/CardMonkey.cs index d89cb11..6a31c88 100644 --- a/CardMonkey.cs +++ b/CardMonkey.cs @@ -3,7 +3,7 @@ using BTD_Mod_Helper; using Il2CppAssets.Scripts.Models.Towers; using Il2CppAssets.Scripts.Models.TowerSets; -using BTD_Mod_Helper.Api.Enums; +using BTD_Mod_Helper.Api.ModOptions; using BTD_Mod_Helper.Api.Towers; using BTD_Mod_Helper.Extensions; using CardMonkey.Displays.Projectiles; @@ -23,15 +23,14 @@ public class CardMonkey : ModTower public override string BaseTower => TowerType.DartMonkey; public override int Cost => 400; - public override int TopPathUpgrades => 5; - public override int MiddlePathUpgrades => 5; - public override int BottomPathUpgrades => 5; public override string Description => "Throws playing cards at Bloons"; // public override string DisplayName => "Don't need to override this, the default turns it into 'Card Monkey'" public override ParagonMode ParagonMode => ParagonMode.Base555; + public override ModSettingHotkey Hotkey => CardMonkeyMod.CardMonkeyHotkey; + public override void ModifyBaseTowerModel(TowerModel towerModel) { towerModel.range += 10; diff --git a/CardMonkey.csproj b/CardMonkey.csproj index 8db2fd7..1c5de77 100644 --- a/CardMonkey.csproj +++ b/CardMonkey.csproj @@ -9,6 +9,9 @@ False embedded + + + diff --git a/Main.cs b/CardMonkeyMod.cs similarity index 52% rename from Main.cs rename to CardMonkeyMod.cs index 584a416..0d82793 100644 --- a/Main.cs +++ b/CardMonkeyMod.cs @@ -1,6 +1,10 @@ using BTD_Mod_Helper; +using BTD_Mod_Helper.Api; +using BTD_Mod_Helper.Api.ModOptions; using CardMonkey; +using Il2CppAssets.Scripts.Unity.UI_New.InGame; using MelonLoader; +using UnityEngine; [assembly: MelonInfo(typeof(CardMonkeyMod), ModHelperData.Name, ModHelperData.Version, ModHelperData.RepoOwner)] [assembly: MelonGame("Ninja Kiwi", "BloonsTD6")] @@ -9,6 +13,12 @@ namespace CardMonkey { public class CardMonkeyMod : BloonsTD6Mod { + public static readonly ModSettingHotkey CardMonkeyHotkey = new(KeyCode.W, HotkeyModifier.Shift) + { + icon = ModContent.GetTextureGUID("CardMonkey-Icon"), + }; + // No Harmony Patches or hooks required for this whole tower! + } } \ No newline at end of file diff --git a/Displays/CardMonkeyBaseDisplay.png b/Displays/CardMonkeyBaseDisplay.png index a85cff6..4ae944d 100644 Binary files a/Displays/CardMonkeyBaseDisplay.png and b/Displays/CardMonkeyBaseDisplay.png differ diff --git a/Displays/CardMonkeyBaseDisplay_36.png b/Displays/CardMonkeyBaseDisplay_36.png deleted file mode 100644 index 4ae944d..0000000 Binary files a/Displays/CardMonkeyBaseDisplay_36.png and /dev/null differ diff --git a/Displays/CardMonkeyBaseDisplay_40.png b/Displays/CardMonkeyBaseDisplay_40.png new file mode 100644 index 0000000..a85cff6 Binary files /dev/null and b/Displays/CardMonkeyBaseDisplay_40.png differ diff --git a/Displays/Tier5/AceOfSpadesDisplay.png b/Displays/Tier5/AceOfSpadesDisplay.png index bd65cb7..dc61faf 100644 Binary files a/Displays/Tier5/AceOfSpadesDisplay.png and b/Displays/Tier5/AceOfSpadesDisplay.png differ diff --git a/Displays/Tier5/AceOfSpadesDisplay_40.png b/Displays/Tier5/AceOfSpadesDisplay_40.png new file mode 100644 index 0000000..bd65cb7 Binary files /dev/null and b/Displays/Tier5/AceOfSpadesDisplay_40.png differ diff --git a/Displays/Tier5/RoyalFlushDisplay.png b/Displays/Tier5/RoyalFlushDisplay.png index 0b6e3b9..c91997d 100644 Binary files a/Displays/Tier5/RoyalFlushDisplay.png and b/Displays/Tier5/RoyalFlushDisplay.png differ diff --git a/Displays/Tier5/RoyalFlushDisplay_32.png b/Displays/Tier5/RoyalFlushDisplay_32.png deleted file mode 100644 index c91997d..0000000 Binary files a/Displays/Tier5/RoyalFlushDisplay_32.png and /dev/null differ diff --git a/Displays/Tier5/RoyalFlushDisplay_40.png b/Displays/Tier5/RoyalFlushDisplay_40.png new file mode 100644 index 0000000..0b6e3b9 Binary files /dev/null and b/Displays/Tier5/RoyalFlushDisplay_40.png differ diff --git a/Displays/Tier5/TFDisplay.png b/Displays/Tier5/TFDisplay.png index 7b7ec7a..e37953d 100644 Binary files a/Displays/Tier5/TFDisplay.png and b/Displays/Tier5/TFDisplay.png differ diff --git a/Displays/Tier5/TFDisplay_40.png b/Displays/Tier5/TFDisplay_40.png new file mode 100644 index 0000000..7b7ec7a Binary files /dev/null and b/Displays/Tier5/TFDisplay_40.png differ diff --git a/ModHelperData.cs b/ModHelperData.cs index f2c4484..a300eba 100644 --- a/ModHelperData.cs +++ b/ModHelperData.cs @@ -2,8 +2,8 @@ { public static class ModHelperData { - public const string WorksOnVersion = "37.0"; - public const string Version = "1.2.7"; + public const string WorksOnVersion = "42.0"; + public const string Version = "1.2.8"; public const string Name = "Card Monkey"; public const string Description = "Adds in a new custom tower themed around playing cards."; diff --git a/Upgrades/BottomPath/TwistOfFate.cs b/Upgrades/BottomPath/TwistOfFate.cs index 92b4b7e..ea1a249 100644 --- a/Upgrades/BottomPath/TwistOfFate.cs +++ b/Upgrades/BottomPath/TwistOfFate.cs @@ -2,12 +2,12 @@ using Il2CppAssets.Scripts.Models.Towers.Filters; using Il2CppAssets.Scripts.Models.Towers.Projectiles.Behaviors; using Il2CppAssets.Scripts.Unity; -using Il2CppAssets.Scripts.Utils; using BTD_Mod_Helper.Api.Towers; using BTD_Mod_Helper.Extensions; using CardMonkey.Displays.Projectiles; using CardMonkey.Upgrades.MiddlePath; using Il2CppAssets.Scripts.Models.Effects; +using Il2CppNinjaKiwi.Common.ResourceUtils; namespace CardMonkey.Upgrades.BottomPath { @@ -36,7 +36,7 @@ public override void ApplyUpgrade(TowerModel tower) r2gAlch.GetAttackModels()[1].GetDescendant().Duplicate(); var filterOutTagModel = r2gAlch.GetDescendant().Duplicate(); increaseBloonWorthModel.filter = filterOutTagModel; - goldCard.projectile.collisionPasses = new[] {-1, 0}; + goldCard.projectile.collisionPasses = new[] { -1, 0 }; goldCard.projectile.AddBehavior(increaseBloonWorthModel); if (tower.appliedUpgrades.Contains(UpgradeID())) { @@ -54,7 +54,7 @@ public override void ApplyUpgrade(TowerModel tower) var bloonImpact = Game.instance.model.GetTower(TowerType.BombShooter, 4); var slowModel = bloonImpact.GetDescendant().Duplicate(); var slowModifierForTagModel = bloonImpact.GetDescendant().Duplicate(); - blueCard.projectile.collisionPasses = new[] {-1, 0}; + blueCard.projectile.collisionPasses = new[] { -1, 0 }; blueCard.projectile.AddBehavior(slowModel); blueCard.projectile.AddBehavior(slowModifierForTagModel); if (tower.appliedUpgrades.Contains(UpgradeID())) @@ -84,7 +84,8 @@ public override void ApplyUpgrade(TowerModel tower) sound.sound1, sound.sound2, sound.sound3, sound.sound4, sound.sound5); redCard.projectile.AddBehavior(soundBehavior); - var eB = new CreateEffectOnExhaustedModel("CreateEffectOnExhaustedModel_", new PrefabReference(), 0f, Fullscreen.No, + var eB = new CreateEffectOnExhaustedModel("CreateEffectOnExhaustedModel_", new PrefabReference(), 0f, + Fullscreen.No, false, effect.effectModel); redCard.projectile.AddBehavior(eB); redCard.Rate *= 0.8f; diff --git a/Upgrades/MiddlePath/AceInTheHole.cs b/Upgrades/MiddlePath/AceInTheHole.cs index 0216e2d..567f767 100644 --- a/Upgrades/MiddlePath/AceInTheHole.cs +++ b/Upgrades/MiddlePath/AceInTheHole.cs @@ -77,6 +77,7 @@ public override void ApplyUpgrade(TowerModel tower) 1, 30, false, false)); projectileModel.GetBehavior().Speed = 500f; projectileModel.GetBehavior().Lifespan = 5.0f; + projectileModel.hasDamageModifiers = true; } } } \ No newline at end of file diff --git a/Upgrades/MiddlePath/AceOfSpades.cs b/Upgrades/MiddlePath/AceOfSpades.cs index 928434c..b574a7e 100644 --- a/Upgrades/MiddlePath/AceOfSpades.cs +++ b/Upgrades/MiddlePath/AceOfSpades.cs @@ -55,6 +55,7 @@ public override void ApplyUpgrade(TowerModel tower) projectileModel.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Moabs", "Moabs", 1, 2000, false, false)); + projectileModel.hasDamageModifiers = true; } } } \ No newline at end of file diff --git a/Upgrades/MiddlePath/AcesWild.cs b/Upgrades/MiddlePath/AcesWild.cs index efd67da..8fc37ff 100644 --- a/Upgrades/MiddlePath/AcesWild.cs +++ b/Upgrades/MiddlePath/AcesWild.cs @@ -30,6 +30,7 @@ public override void ApplyUpgrade(TowerModel tower) projectile.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Fortified", "Fortified", 1, 3, false, false)); projectile.ApplyDisplay(); + projectile.hasDamageModifiers = true; } } } diff --git a/Upgrades/MiddlePath/CutTheDeck.cs b/Upgrades/MiddlePath/CutTheDeck.cs index e46b6b7..5e969fd 100644 --- a/Upgrades/MiddlePath/CutTheDeck.cs +++ b/Upgrades/MiddlePath/CutTheDeck.cs @@ -1,5 +1,4 @@ using Il2CppAssets.Scripts.Models.Towers; -using Il2CppAssets.Scripts.Simulation.Towers; using BTD_Mod_Helper.Api.Towers; using BTD_Mod_Helper.Extensions; diff --git a/Upgrades/TopPath/Pair.cs b/Upgrades/TopPath/Pair.cs index 96e28d3..6e26ad1 100644 --- a/Upgrades/TopPath/Pair.cs +++ b/Upgrades/TopPath/Pair.cs @@ -1,6 +1,5 @@ using Il2CppAssets.Scripts.Models.Towers; using Il2CppAssets.Scripts.Models.Towers.Behaviors.Emissions; -using Il2CppAssets.Scripts.Simulation.Towers; using BTD_Mod_Helper.Api.Towers; using BTD_Mod_Helper.Extensions;