Skip to content

Commit

Permalink
Update for BTD6 v42.0
Browse files Browse the repository at this point in the history
  • Loading branch information
doombubbles committed Apr 8, 2024
1 parent 2d2cb55 commit 9972d0f
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

env:
PROJECT_NAME: CardMonkey
MELONLOADER_BRANCH: alpha-development

MOD_HELPER_NAME: Btd6ModHelper
BLOONSTD6: ./BloonsTD6
Expand Down Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions CardMonkey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions CardMonkey.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<Optimize>False</Optimize>
<DebugType>embedded</DebugType>
</PropertyGroup>
<ItemGroup>
<Content Include=".github\workflows\build.yml" />
</ItemGroup>

<Import Project="..\btd6.targets" />
</Project>
10 changes: 10 additions & 0 deletions Main.cs → CardMonkeyMod.cs
Original file line number Diff line number Diff line change
@@ -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")]
Expand All @@ -9,6 +13,12 @@ namespace CardMonkey
{
public class CardMonkeyMod : BloonsTD6Mod
{
public static readonly ModSettingHotkey CardMonkeyHotkey = new(KeyCode.W, HotkeyModifier.Shift)
{
icon = ModContent.GetTextureGUID<CardMonkeyMod>("CardMonkey-Icon"),
};

// No Harmony Patches or hooks required for this whole tower!

}
}
Binary file modified Displays/CardMonkeyBaseDisplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Displays/CardMonkeyBaseDisplay_36.png
Binary file not shown.
Binary file added Displays/CardMonkeyBaseDisplay_40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Displays/Tier5/AceOfSpadesDisplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Displays/Tier5/AceOfSpadesDisplay_40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Displays/Tier5/RoyalFlushDisplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Displays/Tier5/RoyalFlushDisplay_32.png
Binary file not shown.
Binary file added Displays/Tier5/RoyalFlushDisplay_40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Displays/Tier5/TFDisplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Displays/Tier5/TFDisplay_40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ModHelperData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down
9 changes: 5 additions & 4 deletions Upgrades/BottomPath/TwistOfFate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -36,7 +36,7 @@ public override void ApplyUpgrade(TowerModel tower)
r2gAlch.GetAttackModels()[1].GetDescendant<IncreaseBloonWorthModel>().Duplicate();
var filterOutTagModel = r2gAlch.GetDescendant<FilterOutTagModel>().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<WildCards>()))
{
Expand All @@ -54,7 +54,7 @@ public override void ApplyUpgrade(TowerModel tower)
var bloonImpact = Game.instance.model.GetTower(TowerType.BombShooter, 4);
var slowModel = bloonImpact.GetDescendant<SlowModel>().Duplicate();
var slowModifierForTagModel = bloonImpact.GetDescendant<SlowModifierForTagModel>().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<WildCards>()))
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions Upgrades/MiddlePath/AceInTheHole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public override void ApplyUpgrade(TowerModel tower)
1, 30, false, false));
projectileModel.GetBehavior<TravelStraitModel>().Speed = 500f;
projectileModel.GetBehavior<TravelStraitModel>().Lifespan = 5.0f;
projectileModel.hasDamageModifiers = true;
}
}
}
1 change: 1 addition & 0 deletions Upgrades/MiddlePath/AceOfSpades.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public override void ApplyUpgrade(TowerModel tower)

projectileModel.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Moabs", "Moabs",
1, 2000, false, false));
projectileModel.hasDamageModifiers = true;
}
}
}
1 change: 1 addition & 0 deletions Upgrades/MiddlePath/AcesWild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public override void ApplyUpgrade(TowerModel tower)
projectile.AddBehavior(new DamageModifierForTagModel("DamageModifierForTagModel_Fortified", "Fortified",
1, 3, false, false));
projectile.ApplyDisplay<WildAceCardDisplay>();
projectile.hasDamageModifiers = true;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion Upgrades/MiddlePath/CutTheDeck.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
1 change: 0 additions & 1 deletion Upgrades/TopPath/Pair.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down

0 comments on commit 9972d0f

Please sign in to comment.