Skip to content

Commit d66f024

Browse files
3.2.1 hotfix
Forgot `OGDarksTowers` had paragons :clown: also fixed a bug where `CreateTowerChoiceData` tried to make a `TowerChoice` for tier 4/5 Powers Pro (and logging failing to do so.)
1 parent 76a001c commit d66f024

4 files changed

Lines changed: 38 additions & 2 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Il2CppAssets.Scripts.Models.Towers;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
5+
namespace BTD6Rogue;
6+
7+
public class CyberMonkey : RogueTower
8+
{
9+
public override string BaseTowerId => "DarksTowers-CyberMonkey";
10+
public override Dictionary<string, TowerTag[]> TowerTags => [];
11+
public override Vector2Int[] TowerAmountRanges => [new(1, 3), new(1, 3), new(1, 3)];
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Il2CppAssets.Scripts.Models.Towers;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
5+
namespace BTD6Rogue;
6+
7+
public class MonkeyofLight : RogueTower
8+
{
9+
public override string BaseTowerId => "DarksTowers-MonkeyofLight";
10+
public override Dictionary<string, TowerTag[]> TowerTags => [];
11+
public override Vector2Int[] TowerAmountRanges => [new(1, 3), new(1, 3), new(1, 3)];
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Il2CppAssets.Scripts.Models.Towers;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
5+
namespace BTD6Rogue;
6+
7+
public class PlasmaMonkey : RogueTower
8+
{
9+
public override string BaseTowerId => "DarksTowers-PlasmaMonkey";
10+
public override Dictionary<string, TowerTag[]> TowerTags => [];
11+
public override Vector2Int[] TowerAmountRanges => [new(1, 3), new(1, 3), new(1, 3)];
12+
}

Towers/TowerUtil.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static TowerChoice[] GetTier0TowersChoiceData(RogueGame game)
7575
towerName = towerModel.GetUpgrade(path, tiers[path]).name;
7676
}
7777
catch {
78-
BTD6Rogue.LogMessage("The tier " + tiers[path] + " UPGRADE for the " + path + "th path for the '" + towerName + "'tower is null.", "TowerUtil.CreateTowerChoiceData", ErrorLevels.Error);
78+
BTD6Rogue.LogMessage("The tier " + tiers[path] + " UPGRADE for the " + (1 + path) + "th path for the '" + towerName + "' tower is null.", "TowerUtil.CreateTowerChoiceData", ErrorLevels.Error);
7979
towerName += "(Path " + (1 + path) + ")";
8080
}
8181
}
@@ -85,7 +85,7 @@ public static TowerChoice[] GetTier0TowersChoiceData(RogueGame game)
8585
public static TowerChoice[] CreateTowerChoiceDatas(RogueTower tower, int tier) {
8686
List<TowerChoice> towerChoices = new List<TowerChoice>();
8787

88-
if (tower is RoguePowerProTower) { tier -= 2; }
88+
if (tower is RoguePowerProTower) { tier -= 2; if (tier > 3) { tier = 3; } }
8989

9090
TowerModel path2Tower = tower.GetTower([0, tier, 0]);
9191

0 commit comments

Comments
 (0)