-
Notifications
You must be signed in to change notification settings - Fork 4
/
PhayzeConfig.cs
79 lines (63 loc) · 3.06 KB
/
PhayzeConfig.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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 = (int)(baseMaxHealth * (levelMaxHealthMultiplier * level) * multiplier);
if (level == 0) { bloonModel.maxHealth = (int)(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;
}
}
}