Skip to content

Commit

Permalink
Updated the Icon and made it so you can give the bloon BloonProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkTerraYT committed Oct 29, 2023
1 parent f8b5a8f commit 269fe3c
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 2 deletions.
129 changes: 127 additions & 2 deletions Bloon.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using BTD_Mod_Helper.Api.Bloons;
using BTD_Mod_Helper.Extensions;
using Il2CppAssets.Scripts.Models.Bloons;
using Il2Cpp;
using static Extension.CustomBloon;

namespace Extension
Expand Down Expand Up @@ -59,9 +60,133 @@ public override void ModifyBaseBloonModel(BloonModel bloonModel)
bloonModel.isMoab = true;
bloonModel.IsMoabBloon();
}
if (Immune)
{
bloonModel.bloonProperties = BloonProperties.Immune;
}
else if(Lead & Purple & White & Black & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Lead | BloonProperties.White | BloonProperties.Purple | BloonProperties.Frozen;
}
else if (Lead & Purple & White & Black)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Lead | BloonProperties.White | BloonProperties.Purple;
}
else if (Lead & Purple & White & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Lead | BloonProperties.White | BloonProperties.Purple | BloonProperties.Frozen;
}
else if (Lead & Purple & Black & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Lead | BloonProperties.Purple | BloonProperties.Frozen;
}
else if (Lead & White & Black & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Lead | BloonProperties.White | BloonProperties.Frozen;
}
else if (Purple & White & Black & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.White | BloonProperties.Purple | BloonProperties.Frozen;
}
else if (Lead & Purple & White)
{
bloonModel.bloonProperties = BloonProperties.Lead | BloonProperties.White | BloonProperties.Purple;
}
else if (Lead & Purple & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Lead | BloonProperties.Purple | BloonProperties.Frozen;
}
else if (Lead & Black & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Lead | BloonProperties.Frozen;
}
else if (White & Black & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.White | BloonProperties.Frozen;
}
else if (Lead & White & Black)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Lead | BloonProperties.White;
}
else if (Purple & White & Frozen)
{
bloonModel.bloonProperties = BloonProperties.White | BloonProperties.Purple | BloonProperties.Frozen;
}
else if (Purple & Black & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Purple | BloonProperties.Frozen;
}
else if (Lead & Purple & Black)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Lead | BloonProperties.Purple;
}
else if (Lead & White & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Lead | BloonProperties.White | BloonProperties.Frozen;
}
else if (Lead & Purple)
{
bloonModel.bloonProperties = BloonProperties.Lead | BloonProperties.Purple;
}
else if (Lead & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Lead | BloonProperties.Frozen;
}
else if (Black & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Frozen;
}
else if (Purple & White)
{
bloonModel.bloonProperties = BloonProperties.White | BloonProperties.Purple;
}
else if (Lead & Black)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Lead;
}
else if (Purple & Frozen)
{
bloonModel.bloonProperties = BloonProperties.Purple | BloonProperties.Frozen;
}
else if (White & Frozen)
{
bloonModel.bloonProperties = BloonProperties.White | BloonProperties.Frozen;
}
else if (White & Black)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.White;
}
else if (Lead & White)
{
bloonModel.bloonProperties = BloonProperties.Lead | BloonProperties.White;
}
else if(Black & Purple)
{
bloonModel.bloonProperties = BloonProperties.Black | BloonProperties.Purple;
}
else if (Lead)
{
bloonModel.bloonProperties = BloonProperties.Lead;
}
else if (Purple)
{
bloonModel.bloonProperties = BloonProperties.Purple;
}
else if (White)
{
bloonModel.bloonProperties = BloonProperties.White;
}
else if (Black)
{
bloonModel.bloonProperties = BloonProperties.Black;
}
else if (Frozen)
{
bloonModel.bloonProperties = BloonProperties.Frozen;
}

// LAST
if(!KeepChildren)
// KEEP LAST
if (!KeepChildren)
{
bloonModel.RemoveAllChildren();
}
Expand Down
38 changes: 38 additions & 0 deletions CustomBloon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,44 @@ public class CustomBloon : BloonsTD6Mod
category = RoundSetSettings,
description = "Only set this to true if you want only the custom bloon to spawn"
};
static readonly ModSettingCategory BloonProperties = new("BloonProperites");

public static readonly ModSettingBool Lead = new(false)
{
requiresRestart = true,
category = BloonProperties,
description = "Can't be popped by towers that can't pop leads"
};
public static readonly ModSettingBool Purple = new(false)
{
requiresRestart = true,
category = BloonProperties,
description = "Can't be popped by towers that use magic attacks"
};
public static readonly ModSettingBool Black = new(false)
{
requiresRestart = true,
category = BloonProperties,
description = "Can't be popped by towers that use explosions"
};
public static readonly ModSettingBool White = new(false)
{
requiresRestart = true,
category = BloonProperties,
description = "Can't be popped by towers that use ice attacks"
};
public static readonly ModSettingBool Frozen = new(false)
{
requiresRestart = true,
category = BloonProperties,
description = "Can't be popped by towers that can't pop frozen bloons (lead but weaker)"
};
public static readonly ModSettingBool Immune = new(false)
{
requiresRestart = true,
category = BloonProperties,
description = "Can't be popped at all"
};

public override void OnApplicationStart()
{
Expand Down
Binary file modified Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 269fe3c

Please sign in to comment.