-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMain.cs
More file actions
322 lines (313 loc) · 14.9 KB
/
Main.cs
File metadata and controls
322 lines (313 loc) · 14.9 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
using HarmonyLib;
using System;
using System.IO;
using UnityModManagerNet;
using WOTR_PATH_OF_RAGE.Utilities;
using ModKit;
namespace WOTR_PATH_OF_RAGE
{
public class Main
{
public class Settings : UnityModManager.ModSettings
{
public bool PatchDemonRage = true;
public bool AddDemonSpecialSelectionToMythic = true;
public bool PatchBrimorakAspect = true;
public bool PatchKalavakusAspect = true;
public bool PatchShadowDemonAspect = true;
public bool PatchSuccubusAspect = true;
public bool PatchDemonAspectIcons = true;
public bool PatchBaseRagesForDemon = true;
public bool PatchAbyssalStorm = true;
public bool PatchBloodHaze = true;
public bool AddDemonBlast = true;
public bool PatchDemonLordAspects = true;
public bool AddLilithuAspect = true;
public bool AddOolioddrooAspect = true;
public bool PatchDemonicAura = true;
public bool PatchAutometamagic = true;
public bool AddMightyDemonrage = true;
public bool PatchNocticulaAspect = true;
public bool PatchLegendaryProportions = true;
public bool PatchBalorAspect = true;
public bool UncontrollableRageLocalization = true;
public bool UncontrollableRageToggle = true;
public bool UncontrollableRageFix = true;
public bool DarkCodexLimitlessRageDisable = true;
public bool DemonicChargePointTargetting = true;
public override void Save(UnityModManager.ModEntry modEntry)
{
Save(this, modEntry);
}
}
public static UnityModManager.ModEntry modInfo = null;
public static Settings settings;
private static bool enabled;
static bool Load(UnityModManager.ModEntry modEntry)
{
var harmony = new Harmony(modEntry.Info.Id);
AssetLoader.ModEntry = modEntry;
modInfo = modEntry;
settings = Settings.Load<Settings>(modEntry);
var settingsFile = Path.Combine(modEntry.Path, "Settings.bak");
var copyFile = Path.Combine(modEntry.Path, "Settings.xml");
if (File.Exists(settingsFile) && !File.Exists(copyFile))
{
File.Copy(settingsFile, copyFile, false);
}
settings = Settings.Load<Settings>(modEntry);
modEntry.OnToggle = OnToggle;
modEntry.OnGUI = OnGUI;
modEntry.OnSaveGUI = OnSaveGUI;
harmony.PatchAll();
return true;
}
private static void OnGUI(UnityModManager.ModEntry obj)
{
UI.AutoWidth(); UI.Div(0, 15);
using (UI.VerticalScope())
{
UI.Label("SETTINGS WILL NOT BE UPDATED UNTIL YOU RESTART YOUR GAME.".red().bold().size(20));
UI.Toggle("Demon Rage Rework".bold(), ref settings.PatchDemonRage);
if(settings.PatchDemonRage)
{
UI.Label("Includes a number of changes to Demon Rage. This is now a toggleable ability that will consume a number of rounds instead of per-combat and a new icon is added.".green().size(10));
}
else
{
UI.Label("Demon Rage is unchanged. It is suggested to turn off Special Abilites as well.".red().size(10));
}
UI.Toggle("Allow Special Abilities".bold(), ref settings.AddDemonSpecialSelectionToMythic);
if (settings.AddDemonSpecialSelectionToMythic)
{
UI.Label("When you gain your Demon path, new special abilites called Demonologies are unlocked, allowing more rounds of rage per day.".green().size(10));
}
else
{
UI.Label("No special abilites will be added.".red().size(10));
}
UI.Toggle("Brimorak Aspect Fix".bold(), ref settings.PatchBrimorakAspect);
if (settings.PatchBrimorakAspect)
{
UI.Label("Brimorak Aspect uses a new component to fix its expected scaling".green().size(10));
}
else
{
UI.Label("Brimorak Aspect is unchanged from vanilla".red().size(10));
}
UI.Toggle("Succubus Aspect Fix".bold(), ref settings.PatchSuccubusAspect);
if (settings.PatchSuccubusAspect)
{
UI.Label("Succubus Aspect now properly gives a malus to Attack Bonus instead of AC".green().size(10));
}
else
{
UI.Label("Succubus Aspect is unchanged from vanilla".red().size(10));
}
UI.Toggle("Kalvakus Aspect Fix".bold(), ref settings.PatchKalavakusAspect);
if (settings.PatchKalavakusAspect)
{
UI.Label("Kalvakus Aspect's bonus attack will only work while you have a melee weapon.".green().size(10));
}
else
{
UI.Label("Kalvakus Aspect is unchanged from vanilla".red().size(10));
}
UI.Toggle("Shadow Demon Aspect Fix".bold(), ref settings.PatchShadowDemonAspect);
if (settings.PatchShadowDemonAspect)
{
UI.Label("Shadow Demon Aspect will no longer give double the wisdom bonus when toggled.".green().size(10));
}
else
{
UI.Label("Shadow Demon Aspect is unchanged from vanilla".red().size(10));
}
UI.Toggle("Demon Aspect Icons Change".bold(), ref settings.PatchDemonAspectIcons);
if (settings.PatchDemonAspectIcons)
{
UI.Label("Adds new icons to each aspect making it easier to tell them apart.".green().size(10));
}
else
{
UI.Label("Aspect icons are unchanged from vanilla".red().size(10));
}
/* UI.Toggle("Demon Lord Aspects Progression Fix".bold(), ref settings.PatchDemonLordAspects);
if (settings.PatchDemonLordAspects)
{
UI.Label("Demon Lord Aspects are written to be given one at 9 and another at 10. This fixes that.".green().size(10));
}
else
{
UI.Label("Demon Lord Aspect progression is unchanged.".red().size(10));
} This was fixed in 1.2 */
UI.Toggle("Allow Toggling Of Rages".bold(), ref settings.PatchBaseRagesForDemon);
if (settings.PatchBaseRagesForDemon)
{
UI.Label("Allows you to toggle Barbarian and Bloodrager rages while in a demon rage.".green().size(10));
}
else
{
UI.Label("Barbarian and Bloodrager rages are unchanged from vanilla".red().size(10));
}
UI.Toggle("Abyssal Storm Fix".bold(), ref settings.PatchAbyssalStorm);
if (settings.PatchAbyssalStorm)
{
UI.Label("Abyssal Storm no longer hurts the caster.".green().size(10));
}
else
{
UI.Label("Abyssal Storm is unchanged from vanilla".red().size(10));
}
UI.Toggle("Blood Haze Change".bold(), ref settings.PatchBloodHaze);
if (settings.PatchBloodHaze)
{
UI.Label("Blood Haze now gives a +2 profane bonus to attack.".green().size(10));
}
else
{
UI.Label("Blood Haze is unchanged from vanilla".red().size(10));
}
UI.Toggle("Demon Blast Addition".bold(), ref settings.AddDemonBlast);
if (settings.AddDemonBlast)
{
UI.Label("At Mythic Rank 3 you gain an ability to use Demonic Charge that isn't a teleport. This is for instances where you can't use Demonic Charge".green().size(10));
}
else
{
UI.Label("Demonic Blast is not added".red().size(10));
}
UI.Toggle("Lilithu Aspect Addition".bold(), ref settings.AddLilithuAspect);
if (settings.AddLilithuAspect)
{
UI.Label("As a Major demonic aspect you can select Lilithu, gaining a bonus to your Charisma as well as allowing all your spells and spell-like abilites to be considered using Selective Metamagic.".green().size(10));
}
else
{
UI.Label("Lilithu Aspect is not added".red().size(10));
}
UI.Toggle("Oolioddroo Aspect Addition".bold(), ref settings.AddOolioddrooAspect);
if (settings.AddOolioddrooAspect)
{
UI.Label("As a Major demonic aspect you can select Oolioddroo, gaining a bonus to your Dexterity and allowing all attacks to be rolled twice and take the highest result.".green().size(10));
}
else
{
UI.Label("Oolioddroo Aspect is not added".red().size(10));
}
UI.Toggle("Demonic Aura Fix".bold(), ref settings.PatchDemonicAura);
if (settings.PatchDemonicAura)
{
UI.Label("Fixes Demonic Aura so that it will only apply its damage when an enemy starts a new round instead of every time you activate Bloodrage.".green().size(10));
}
else
{
UI.Label("Demonic Aura is not fixed.".red().size(10));
}
UI.Toggle("Autometamagic Fix".bold(), ref settings.PatchAutometamagic);
if (settings.PatchAutometamagic)
{
UI.Label("Fixes autometamagic so that it will work on spells that are not originally part of a spellbook but added later. This is important for Arcane Bloodline for Bloodragers.".green().size(10));
}
else
{
UI.Label("Autometamagic is not fixed.".red().size(10));
}
UI.Toggle("Mighty Demonrage addition".bold(), ref settings.AddMightyDemonrage);
if (settings.AddMightyDemonrage)
{
UI.Label("Adds a new mythic ability called Mighty Demonrage. This allows you to cast a demon spell of fourth level or lower as a swift action while Demon Raging.".green().size(10));
}
else
{
UI.Label("Mighty Demonrage is not added.".red().size(10));
}
UI.Toggle("Patch Nocticula Aspect".bold(), ref settings.PatchNocticulaAspect);
if (settings.PatchNocticulaAspect)
{
UI.Label("Changes Nocticula Aspect to have a unique icon icon. Changes the aspect to give bloodrage/barbarian rage like Channel Rage does. Changes to only use once per combat.".green().size(10));
}
else
{
UI.Label("Nocticula Aspect is not changed.".red().size(10));
}
UI.Toggle("Patch Legendary Proportions".bold(), ref settings.PatchLegendaryProportions);
if (settings.PatchLegendaryProportions)
{
UI.Label("Changes the Legendary Proportions to increase your size to Large instead of Huge. This is an annoying buff to use when you use Abyssal Bulk.".green().size(10));
}
else
{
UI.Label("Legendary Proportions is not changed.".red().size(10));
}
UI.Toggle("Patch Balor Aspect".bold(), ref settings.PatchBalorAspect);
if (settings.PatchBalorAspect)
{
UI.Label("Fixes Balor Aspect to not give a bonus on intelligence.".green().size(10));
}
else
{
UI.Label("Balor Aspect is unchanged.".red().size(10));
}
UI.Toggle("Patch Uncontrollable Rage Localization".bold(), ref settings.UncontrollableRageLocalization);
if (settings.UncontrollableRageLocalization)
{
UI.Label("Fixes Uncontrollable Rage's localization to have an actual description and name".green().size(10));
}
else
{
UI.Label("Uncontrollable Rage's localization is not changed.".red().size(10));
}
UI.Toggle("Turn Uncontrollable Rage to Toggle".bold(), ref settings.UncontrollableRageToggle);
if (settings.UncontrollableRageToggle)
{
UI.Label("Changes Uncontrollable Rage to be a toggle, instead of a feature.".green().size(10));
}
else
{
UI.Label("Uncontrollable Rage is not turned into a toggle.".red().size(10));
}
UI.Toggle("Fix Uncontrollable Rage".bold(), ref settings.UncontrollableRageToggle);
if (settings.UncontrollableRageToggle)
{
UI.Label("Fixes Uncontrollable Rage so that it does what the description says.".green().size(10));
}
else
{
UI.Label("Uncontrollable Rage is unfixed.".red().size(10));
}
UI.Toggle("Demonic Charge Point Targetting".bold(), ref settings.DemonicChargePointTargetting);
if (settings.DemonicChargePointTargetting)
{
UI.Label("Allows Demonic Charge to target a point instead of a unit.".green().size(10));
}
else
{
UI.Label("Demonic Charge unchanged.".red().size(10));
}
}
}
private static bool Unload(UnityModManager.ModEntry arg)
{
throw new NotImplementedException();
}
public static void Log(string msg)
{
#if DEBUG
modInfo.Logger.Log(msg);
#endif
}
public bool GetSettingValue(string b)
{
return true;
}
public static void OnSaveGUI(UnityModManager.ModEntry modEntry)
{
settings.Save(modEntry);
}
static bool OnToggle(UnityModManager.ModEntry modEntry, bool value)
{
enabled = value;
return true;
}
}
}