Skip to content

Commit

Permalink
Rebalanced bosses
Browse files Browse the repository at this point in the history
  • Loading branch information
mend-dev committed Jul 22, 2023
1 parent ff3c6ed commit 232123c
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 69 deletions.
39 changes: 15 additions & 24 deletions Bosses/Bloonarius/BloonariusConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@
using BTD_Mod_Helper.Api.Enums;
using UnityEngine;

namespace BTD6Rogue.Bosses.Bloonarius;
namespace BTD6Rogue;

public static class BloonariusConfig
{
public static class BloonariusConfig {

// General Stats
public static readonly float baseMaxHealth = 6000f;
public static readonly float levelMaxHealthMultiplier = 1.5f;
public static readonly float baseMaxHealth = 8000;
public static readonly float levelMaxHealthMultiplier = 3;

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

// 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 All @@ -28,9 +26,9 @@ public static class BloonariusConfig
};

// Strong Spawn
public static readonly int baseStrongSpawnCount = 30;
public static readonly float levelStrongSpawnCountAddition = -4;
public static readonly int baseStrongSpawnDistAhead = 40;
public static readonly int baseStrongSpawnCount = 35;
public static readonly float levelStrongSpawnCountAddition = -3;
public static readonly int baseStrongSpawnDistAhead = 30;
public static readonly float levelStrongSpawnDistAheadAddition = 0;
public static readonly List<string> strongSpawnBloons = new List<string>() {
BloonType.Yellow,
Expand All @@ -43,7 +41,7 @@ public static class BloonariusConfig

// Weak Spawn
public static readonly int baseWeakSpawnCount = 30;
public static readonly float levelWeakSpawnCountAddition = -5;
public static readonly float levelWeakSpawnCountAddition = -2.5f;
public static readonly float baseWeakSpawnTrackMax = 0.4f;
public static readonly float levelWeakSpawnTrackMaxAddition = 0;
public static readonly float baseWeakSpawnTrackMin = 0.1f;
Expand All @@ -58,7 +56,7 @@ public static class BloonariusConfig
};

// Bloon Bleed
public static readonly int baseBleedSpawnCount = 15;
public static readonly int baseBleedSpawnCount = 20;
public static readonly float levelBleedSpawnCountAddition = 5;
public static readonly float baseBleedSpawnTrackMax = 0.4f;
public static readonly float levelBleedSpawnTrackMaxAddition = 0;
Expand All @@ -73,8 +71,7 @@ public static class BloonariusConfig
BloonType.Ceramic
};

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

bloonModel.maxHealth = baseMaxHealth * (levelMaxHealthMultiplier * level) * multiplier;
Expand All @@ -84,23 +81,17 @@ public static void ApplyBloonariusSettings(BloonModel bloonModel, string difficu
bloonModel.speed = (baseSpeed + levelSpeedAddition * level) * multiplier;
bloonModel.Speed = (baseSpeed + levelSpeedAddition * level) * multiplier;

foreach (SpawnBloonsActionModel model in bloonModel.GetBehaviors<SpawnBloonsActionModel>())
{
if (model.actionId == "StrongSpawn")
{
foreach (SpawnBloonsActionModel model in bloonModel.GetBehaviors<SpawnBloonsActionModel>()) {
if (model.actionId == "StrongSpawn") {
model.bloonType = strongSpawnBloons[level];
model.spawnCount = Mathf.FloorToInt((baseStrongSpawnCount + levelStrongSpawnCountAddition * level) * multiplier);
model.spawnDistAhead = (baseStrongSpawnDistAhead + levelStrongSpawnDistAheadAddition * level) * multiplier;
}
else if (model.actionId == "WeakSpawn")
{
} else if (model.actionId == "WeakSpawn") {
model.bloonType = weakSpawnBloons[level];
model.spawnCount = Mathf.FloorToInt((baseWeakSpawnCount + levelWeakSpawnCountAddition * level) * multiplier);
model.spawnTrackMax = (baseWeakSpawnTrackMax + levelWeakSpawnTrackMaxAddition * level) * multiplier;
model.spawnTrackMin = (baseWeakSpawnTrackMin + levelWeakSpawnTrackMinAddition * level) * multiplier;
}
else if (model.actionId == "WeakerSpawn")
{
} else if (model.actionId == "WeakerSpawn") {
model.bloonType = bleedSpawnBloons[level];
model.spawnCount = Mathf.FloorToInt((baseBleedSpawnCount + levelBleedSpawnCountAddition * level) * multiplier);
model.spawnTrackMax = (baseBleedSpawnTrackMax + levelBleedSpawnTrackMaxAddition * level) * multiplier;
Expand Down
6 changes: 3 additions & 3 deletions Bosses/Dreadbloon/DreadRockConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ namespace BTD6Rogue;
public static class DreadRockConfig {

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

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

public static readonly float baseLeakDamage = 25;
Expand Down
21 changes: 11 additions & 10 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 = 250f;
public static readonly float levelMaxHealthMultiplier = 1.5f;
public static readonly float baseMaxHealth = 1000;
public static readonly float levelMaxHealthMultiplier = 3;

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

// Difficulty Multiplier
public static readonly Dictionary<string, float> difficultyMultipliers = new Dictionary<string, float>() {
Expand All @@ -27,19 +27,19 @@ public static class DreadbloonConfig {

//
public static readonly float baseDamageReduction = 0.5f;
public static readonly float levelDamageReductionAddition = 0;
public static readonly float levelDamageReductionAddition = 0.1f;

//
public static readonly float baseArmorAmount = 250;
public static readonly float levelArmorAmountAddition = 0;
public static readonly float baseArmorAmount = 500;
public static readonly float levelArmorAmountMultiplier = 3;
public static readonly float baseSpeedMultiplier = 1f;
public static readonly float levelSpeedMultiplierAddition = 0;

//
public static readonly float baseInitialSpawnSize = 5;
public static readonly float levelInitialSpawnSizeAddition = 0;
public static readonly float levelInitialSpawnSizeAddition = 5;
public static readonly float baseTimeBetweenSpawns = 10;
public static readonly float levelTimeBetweenSpawnsAddition = 0;
public static readonly float levelTimeBetweenSpawnsAddition = -1;

public static void ApplyDreadbloonSettings(BloonModel bloonModel, string difficulty, int level) {
float multiplier = difficultyMultipliers[difficulty];
Expand All @@ -56,8 +56,9 @@ public static void ApplyDreadbloonSettings(BloonModel bloonModel, string difficu
}

foreach (GenerateArmourActionModel model in bloonModel.GetBehaviors<GenerateArmourActionModel>()) {
model.amount = (baseArmorAmount + levelArmorAmountAddition * level) * multiplier;
model.speedMultiplier = (levelArmorAmountAddition + levelSpeedMultiplierAddition * level) * multiplier;
model.amount = baseArmorAmount * (levelArmorAmountMultiplier * level) * multiplier;
if (level == 0) { model.amount = baseArmorAmount * multiplier; }
model.speedMultiplier = (levelSpeedMultiplierAddition + levelSpeedMultiplierAddition * level) * multiplier;
}

foreach (SpawnBloonsUntilArmourBreaksActionModel model in bloonModel.GetBehaviors<SpawnBloonsUntilArmourBreaksActionModel>()) {
Expand Down
8 changes: 4 additions & 4 deletions Bosses/Lych/LychConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
using System.Collections.Generic;
using UnityEngine;

namespace BTD6Rogue.Bosses.Lych;
namespace BTD6Rogue;

public static class LychConfig
{

// General Stats
public static readonly float baseMaxHealth = 5000f;
public static readonly float levelMaxHealthMultiplier = 1.5f;
public static readonly float baseMaxHealth = 6000;
public static readonly float levelMaxHealthMultiplier = 3;

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

// Difficulty Multiplier
Expand Down
29 changes: 12 additions & 17 deletions Bosses/Lych/MiniLychConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@
using BTD_Mod_Helper.Extensions;
using UnityEngine;

namespace BTD6Rogue.Bosses.Lych;
namespace BTD6Rogue;

public static class MiniLychConfig
{
public static class MiniLychConfig {

// General Stats
public static readonly float baseMaxHealth = 300;
public static readonly float levelMaxHealthMultiplier = 1.5f;
public static readonly float baseMaxHealth = 500;
public static readonly float levelMaxHealthMultiplier = 2;

public static readonly float baseSpeed = 5;
public static readonly float levelSpeedAddition = 0f;
public static readonly float levelSpeedAddition = 1f;

// 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 All @@ -28,14 +26,13 @@ public static class MiniLychConfig

// Time Trigger Model
public static readonly float baseTimeInterval = 10;
public static readonly float levelTimeIntervalAddition = 0;
public static readonly float levelTimeIntervalAddition = -1;

// Drain Lives Model
public static readonly float baseDrainLives = 1;
public static readonly float levelDrainLives = 0;
public static readonly float baseDrainLives = 2;
public static readonly float levelDrainLives = 1;

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

bloonModel.maxHealth = baseMaxHealth * (levelMaxHealthMultiplier * level) * multiplier;
Expand All @@ -45,13 +42,11 @@ public static void ApplyMiniLychSettings(BloonModel bloonModel, string difficult
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;
}

foreach (DrainLivesActionModel model in bloonModel.GetBehaviors<DrainLivesActionModel>())
{
foreach (DrainLivesActionModel model in bloonModel.GetBehaviors<DrainLivesActionModel>()) {
model.livesDrained = Mathf.FloorToInt((baseDrainLives + levelDrainLives * level) * multiplier);
}
}
Expand Down
20 changes: 10 additions & 10 deletions Bosses/Vortex/VortexConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ namespace BTD6Rogue;
public static class VortexConfig {

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

public static readonly float baseSpeed = 2.75f;
public static readonly float baseSpeed = 2.5f;
public static readonly float levelSpeedAddition = 0.25f;

// Difficulty Multiplier
Expand All @@ -25,18 +25,18 @@ public static class VortexConfig {
};

// Stun Towers in Radius Action Model
public static readonly float baseStunRadius = 40f;
public static readonly float levelStunRadiusAddition = 5f;
public static readonly float baseStunDuration = 10f;
public static readonly float levelStunDurationAddition = 2f;
public static readonly float baseStunRadius = 50f;
public static readonly float levelStunRadiusAddition = 3f;
public static readonly float baseStunDuration = 20f;
public static readonly float levelStunDurationAddition = 2.5f;

// Set Speed Percent Action Model
public static readonly float baseBackupDistance = -125f;
public static readonly float baseBackupDistance = -100f;
public static readonly float levelBackupDistanceAddition = 10f;

// Destroy Projectiles in Radius Action Model
public static readonly float baseDestroyProjectileRadius = 43f;
public static readonly float levelDestroyProjectileRadiusAddition = 0.1f;
public static readonly float baseDestroyProjectileRadius = 40f;
public static readonly float levelDestroyProjectileRadiusAddition = 2f;

// Reflect Projectiles in Radius Action Model
public static readonly float baseReflectProjectileLifespan = 5f;
Expand Down
2 changes: 1 addition & 1 deletion ModHelperData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace BTD6Rogue;

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

public const string Name = "BTD6Rogue";
public const string Description =
Expand Down

0 comments on commit 232123c

Please sign in to comment.