Skip to content

Commit

Permalink
Update 1.5: Phayze
Browse files Browse the repository at this point in the history
  • Loading branch information
mend-dev committed Jul 27, 2023
1 parent 232123c commit 0aaab93
Show file tree
Hide file tree
Showing 22 changed files with 459 additions and 74 deletions.
15 changes: 14 additions & 1 deletion BTD6Rogue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
using UnityEngine;
using Il2CppAssets.Scripts.Models.Towers;
using Il2CppAssets.Scripts.Models.TowerSets;
using Il2CppAssets.Scripts.Unity;
using System.Windows.Input;
using System;
using System.Linq;
using BTD_Mod_Helper.Api.Towers;
using Unity.Jobs;

[assembly: MelonInfo(typeof(BTD6Rogue.BTD6Rogue), ModHelperData.Name, ModHelperData.Version, ModHelperData.RepoOwner)]
[assembly: MelonGame("Ninja Kiwi", "BloonsTD6")]
Expand Down Expand Up @@ -40,6 +46,9 @@ public class BTD6Rogue : BloonsTD6Mod {
public int towerCount = 0;
public bool uiOpen = false;
public float previousIncrease = 0;
public int rerolls = 0;

public bool canGainMoney = true;

#region Mod Settings
public static readonly ModSettingHotkey FasterForwardHotkey = new(KeyCode.F1); // Doesn't Work
Expand Down Expand Up @@ -74,9 +83,10 @@ public class BTD6Rogue : BloonsTD6Mod {
// Banana Farmer
// Pontoon
// Inflatable Pool

public static readonly ModSettingBool LimitUpgrades = new(true); // Doesn't Work

public static readonly ModSettingCategory ParagonSettings = new("Paragon Settings") { collapsed = true };

public static readonly ModSettingCategory HeroSettings = new("Hero Settings") { collapsed = true };
public static readonly ModSettingBool MultipleHeroes = new(true) { category = HeroSettings }; // Doesn't Work
public static readonly ModSettingBool HeroXpSplit = new(false) { category = HeroSettings }; // Doesn't Work
Expand Down Expand Up @@ -129,6 +139,9 @@ public override void OnUpdate() {

public void StartRogueGame(InGame __instance) {

rerolls = 0;
canGainMoney = true;

// Get rid of all ui panels if they exist
DifficultyChoicePanel.uiPanel?.Destroy();
HeroChoicePanel.uiPanel?.Destroy();
Expand Down
2 changes: 1 addition & 1 deletion Bosses/Dreadbloon/DreadRockConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace BTD6Rogue;
public static class DreadRockConfig {

// General Stats
public static readonly float baseMaxHealth = 20;
public static readonly float baseMaxHealth = 25;
public static readonly float levelMaxHealthMultiplier = 2.5f;

public static readonly float baseSpeed = 1f;
Expand Down
6 changes: 3 additions & 3 deletions Bosses/Dreadbloon/DreadbloonConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ namespace BTD6Rogue;
public static class DreadbloonConfig {

// General Stats
public static readonly float baseMaxHealth = 1000;
public static readonly float baseMaxHealth = 2000;
public static readonly float levelMaxHealthMultiplier = 3;

public static readonly float baseSpeed = 1;
public static readonly float levelSpeedAddition = 0.125f;
public static readonly float levelSpeedAddition = 0.25f;

// Difficulty Multiplier
public static readonly Dictionary<string, float> difficultyMultipliers = new Dictionary<string, float>() {
Expand All @@ -30,7 +30,7 @@ public static class DreadbloonConfig {
public static readonly float levelDamageReductionAddition = 0.1f;

//
public static readonly float baseArmorAmount = 500;
public static readonly float baseArmorAmount = 100;
public static readonly float levelArmorAmountMultiplier = 3;
public static readonly float baseSpeedMultiplier = 1f;
public static readonly float levelSpeedMultiplierAddition = 0;
Expand Down
18 changes: 7 additions & 11 deletions Bosses/Lych/LychConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@

namespace BTD6Rogue;

public static class LychConfig
{
public static class LychConfig {

// General Stats
public static readonly float baseMaxHealth = 6000;
public static readonly float baseMaxHealth = 6500;
public static readonly float levelMaxHealthMultiplier = 3;

public static readonly float baseSpeed = 1f;
public static readonly float levelSpeedAddition = 0.1f;
public static readonly float baseSpeed = 1.25f;
public static readonly float levelSpeedAddition = 0.25f;

// Difficulty Multiplier
public static readonly Dictionary<string, float> difficultyMultipliers = new Dictionary<string, float>()
{
public static readonly Dictionary<string, float> difficultyMultipliers = new Dictionary<string, float>() {
["Poppable"] = 0.7f,
["Easy"] = 0.85f,
["Medium"] = 1f,
Expand Down Expand Up @@ -62,8 +60,7 @@ public static class LychConfig
public static readonly float baseSpeedDownPercent = 0.5f;
public static readonly float levelSpeedDownPercentAddition = 0;

public static void ApplyLychSettings(BloonModel bloonModel, string difficulty, int level)
{
public static void ApplyLychSettings(BloonModel bloonModel, string difficulty, int level) {
float multiplier = difficultyMultipliers[difficulty];

bloonModel.maxHealth = baseMaxHealth * (levelMaxHealthMultiplier * level) * multiplier;
Expand All @@ -73,8 +70,7 @@ public static void ApplyLychSettings(BloonModel bloonModel, string difficulty, i
bloonModel.speed = (baseSpeed + levelSpeedAddition * level) * multiplier;
bloonModel.Speed = (baseSpeed + levelSpeedAddition * level) * multiplier;

foreach (TimeTriggerModel model in bloonModel.GetBehaviors<TimeTriggerModel>())
{
foreach (TimeTriggerModel model in bloonModel.GetBehaviors<TimeTriggerModel>()) {
model.interval = (baseTimeInterval + levelTimeIntervalAddition * level) * multiplier;
}

Expand Down
2 changes: 1 addition & 1 deletion Bosses/Lych/MiniLychConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace BTD6Rogue;
public static class MiniLychConfig {

// General Stats
public static readonly float baseMaxHealth = 500;
public static readonly float baseMaxHealth = 1000;
public static readonly float levelMaxHealthMultiplier = 2;

public static readonly float baseSpeed = 5;
Expand Down
79 changes: 79 additions & 0 deletions Bosses/Phayze/PhayzeConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
using BTD_Mod_Helper.Extensions;
using Il2CppAssets.Scripts.Models.Bloons;
using Il2CppAssets.Scripts.Models.Bloons.Behaviors;
using Il2CppAssets.Scripts.Models.Bloons.Behaviors.Actions;
using System.Collections.Generic;

namespace BTD6Rogue;

public static class PhayzeConfig {

// General Stats
public static readonly float baseMaxHealth = 1000;
public static readonly float levelMaxHealthMultiplier = 3f;

public static readonly float baseSpeed = 1f;
public static readonly float levelSpeedAddition = 0.1f;

// Difficulty Multiplier
public static readonly Dictionary<string, float> difficultyMultipliers = new Dictionary<string, float>() {
["Poppable"] = 0.7f,
["Easy"] = 0.85f,
["Medium"] = 1f,
["Hard"] = 1.15f,
["Impoppable"] = 1.3f
};

//
public static readonly float baseDashSpeed = 20f;
public static readonly float levelDashSpeed = 0;
public static readonly float baseDashDistance = 0.04f;
public static readonly float levelDashDistance = 0;

//
public static readonly float baseShield = 1000;
public static readonly float levelShieldMultiplier = 3f;

public static void ApplyPhayzeSettings(BloonModel bloonModel, string difficulty, int level) {
float multiplier = difficultyMultipliers[difficulty];

bloonModel.maxHealth = baseMaxHealth * (levelMaxHealthMultiplier * level) * multiplier;
if (level == 0) { bloonModel.maxHealth = baseMaxHealth * multiplier; }

bloonModel.leakDamage = 99999f;
bloonModel.speed = (baseSpeed + levelSpeedAddition * level) * multiplier;
bloonModel.Speed = (baseSpeed + levelSpeedAddition * level) * multiplier;

foreach (DashForwardsActionModel model in bloonModel.GetBehaviors<DashForwardsActionModel>()) {
model.speedMultiplier = (baseDashSpeed + levelDashSpeed * level) * multiplier;
model.dashDistance = (baseDashDistance + levelDashDistance * level) * multiplier;
}

foreach (GenerateShieldActionModel model in bloonModel.GetBehaviors<GenerateShieldActionModel>()) {
model.amount = baseShield * (levelShieldMultiplier * level) * multiplier;
if (level == 0) { model.amount = baseShield * multiplier; }
}

foreach (WaitForSecondsActionModel model in bloonModel.GetBehaviors<WaitForSecondsActionModel>()) {
if (model.actionId == "RestoreTimerEffects") {
model.delayTime = 12f;
} else if (model.actionId == "SkullDelay") {
model.delayTime = 2f;
}
}

foreach (PhayzeBehaviorModel model in bloonModel.GetBehaviors<PhayzeBehaviorModel>()) {
//model.powerLevels;
model.shieldSpeedBoost = 1.3f;
}

foreach (TimeTriggerModel model in bloonModel.GetBehaviors<TimeTriggerModel>()) {
model.interval = 24f;
}

foreach (ThrowBloonsActionModel model in bloonModel.GetBehaviors<ThrowBloonsActionModel>()) {
model.offsetMin = 2.5f;
model.offsetMax = 20f;
}
}
}
36 changes: 36 additions & 0 deletions Bosses/Phayze/RoguePhayze.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using BTD_Mod_Helper.Api.Bloons;
using BTD6Rogue;
using Il2CppAssets.Scripts.Models.Bloons;

namespace Phayze;

public class PoppableRoguePhayze1 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Poppable", 0); } }
public class PoppableRoguePhayze2 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Poppable", 1); } }
public class PoppableRoguePhayze3 : ModBloon { public override string BaseBloon => "Phayze2"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Poppable", 2); } }
public class PoppableRoguePhayze4 : ModBloon { public override string BaseBloon => "Phayze3"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Poppable", 3); } }
public class PoppableRoguePhayze5 : ModBloon { public override string BaseBloon => "Phayze4"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Poppable", 4); } }
public class PoppableRoguePhayze6 : ModBloon { public override string BaseBloon => "Phayze5"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Poppable", 5); } }
public class EasyRoguePhayze1 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Easy", 0); } }
public class EasyRoguePhayze2 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Easy", 1); } }
public class EasyRoguePhayze3 : ModBloon { public override string BaseBloon => "Phayze2"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Easy", 2); } }
public class EasyRoguePhayze4 : ModBloon { public override string BaseBloon => "Phayze3"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Easy", 3); } }
public class EasyRoguePhayze5 : ModBloon { public override string BaseBloon => "Phayze4"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Easy", 4); } }
public class EasyRoguePhayze6 : ModBloon { public override string BaseBloon => "Phayze5"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Easy", 5); } }
public class MediumRoguePhayze1 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Medium", 0); } }
public class MediumRoguePhayze2 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Medium", 1); } }
public class MediumRoguePhayze3 : ModBloon { public override string BaseBloon => "Phayze2"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Medium", 2); } }
public class MediumRoguePhayze4 : ModBloon { public override string BaseBloon => "Phayze3"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Medium", 3); } }
public class MediumRoguePhayze5 : ModBloon { public override string BaseBloon => "Phayze4"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Medium", 4); } }
public class MediumRoguePhayze6 : ModBloon { public override string BaseBloon => "Phayze5"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Medium", 5); } }
public class HardRoguePhayze1 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Hard", 0); } }
public class HardRoguePhayze2 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Hard", 1); } }
public class HardRoguePhayze3 : ModBloon { public override string BaseBloon => "Phayze2"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Hard", 2); } }
public class HardRoguePhayze4 : ModBloon { public override string BaseBloon => "Phayze3"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Hard", 3); } }
public class HardRoguePhayze5 : ModBloon { public override string BaseBloon => "Phayze4"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Hard", 4); } }
public class HardRoguePhayze6 : ModBloon { public override string BaseBloon => "Phayze5"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Hard", 5); } }
public class ImpoppableRoguePhayze1 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Impoppable", 0); } }
public class ImpoppableRoguePhayze2 : ModBloon { public override string BaseBloon => "Phayze1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Impoppable", 1); } }
public class ImpoppableRoguePhayze3 : ModBloon { public override string BaseBloon => "Phayze2"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Impoppable", 2); } }
public class ImpoppableRoguePhayze4 : ModBloon { public override string BaseBloon => "Phayze3"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Impoppable", 3); } }
public class ImpoppableRoguePhayze5 : ModBloon { public override string BaseBloon => "Phayze4"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Impoppable", 4); } }
public class ImpoppableRoguePhayze6 : ModBloon { public override string BaseBloon => "Phayze5"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { PhayzeConfig.ApplyPhayzeSettings(bloonModel, "Impoppable", 5); } }
7 changes: 7 additions & 0 deletions Bosses/RogueBoss.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using BTD_Mod_Helper.Api.Bloons;

namespace BTD6Rogue;

public abstract class RogueBoss : ModBloon {

}
1 change: 0 additions & 1 deletion Bosses/Vortex/RogueVortex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace BTD6Rogue.Bosses.Vortex;


public class PoppableRogueVortex1 : ModBloon { public override string BaseBloon => "Vortex1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { VortexConfig.ApplyVortexSettings(bloonModel, "Poppable", 0); } }
public class PoppableRogueVortex2 : ModBloon { public override string BaseBloon => "Vortex1"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { VortexConfig.ApplyVortexSettings(bloonModel, "Poppable", 1); } }
public class PoppableRogueVortex3 : ModBloon { public override string BaseBloon => "Vortex2"; public override void ModifyBaseBloonModel(BloonModel bloonModel) { VortexConfig.ApplyVortexSettings(bloonModel, "Poppable", 2); } }
Expand Down
4 changes: 2 additions & 2 deletions Gamemodes/Roguemode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
namespace BTD6Rogue;

public class Roguemode : ModGameMode {
public override string Difficulty => DifficultyType.Hard;
public override string Difficulty => DifficultyType.Medium;

public override string BaseGameMode => GameModeType.Hard;
public override string BaseGameMode => GameModeType.Medium;

public override string DisplayName => "BTD6 Rogue";

Expand Down
16 changes: 5 additions & 11 deletions LATEST.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
Version 1.3:
Version 1.5:

NEW FEATURES:
- Lych Boss
- Fixed the dumb bug where same tower in a choice messes which upgrades you get
- Removed the scuffed "10 mil" upgrade in favor of actually locking upgrades
- Changed the difficulty icons
- Nerfed Early Game
- Buffed mid-late game

Upcoming in Version 1.4+:
- Dreadbloon Boss
- PHAYZE (before Ninja Kiwi started the boss event :p)
- Rerolling towers

Upcoming in Version 1.6+:
- Difficulties effecting costs
- Mod settings
- Modifiers
- Artifacts
- Banana Farmer, Pontoon, and Portable Lake as towers you can get
Expand Down
6 changes: 5 additions & 1 deletion ModHelperData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ namespace BTD6Rogue;

public static class ModHelperData {
public const string WorksOnVersion = "37.0";
public const string Version = "1.4.1";
public const string Version = "1.5.0";

public const string Name = "BTD6Rogue";
public const string Description =
"BTD6 Rogue! The mod that turns bloons into a Roguelike, or BTD7 apparently\n" +
"\n" +
"If you're making content of this mod please credit me as the creator, (menddev, https://www.youtube.com/@menddev)\n" +
"\n" +
"Considering how drastic the changes are, take caution if you are worried about getting flagged\n" +
"I have recently gotten flagged, it is unknown whether or not it is this mod or not\n" +
"(I do a lot of dumb modded testing with other mods so it could be that), warning over\n" +
"\n" +
"Oh by the way, a ton of the mod settings don't work\n" +
"\n" +
"Anyway join my discord and yell at me if it's unbalancd, because it is lmao";
Expand Down
2 changes: 1 addition & 1 deletion Panels/DifficultyChoicePanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DifficultyChoicePanel : MonoBehaviour {
public DifficultyChoicePanel(IntPtr ptr) : base(ptr) { }

public void ChooseDifficulty(string difficulty) {
InitialHeroChoicePanel.Create(__instance.uiRect, __instance);
GameSettingsPanel.Create(__instance.uiRect, __instance);


if (difficulty == "Poppable") {
Expand Down
Loading

0 comments on commit 0aaab93

Please sign in to comment.