-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathEnemyModifiersServerConfig.cs
More file actions
375 lines (272 loc) · 9.09 KB
/
EnemyModifiersServerConfig.cs
File metadata and controls
375 lines (272 loc) · 9.09 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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
using FargoEnemyModifiers.Modifiers;
using FargoEnemyModifiers.Modifiers.Rarity1;
using FargoEnemyModifiers.Modifiers.Rarity2;
using FargoEnemyModifiers.Modifiers.Rarity3;
using FargoEnemyModifiers.Modifiers.Rarity4;
using Mono.Cecil;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Serialization;
using System.Text.Json.Serialization;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.Config;
namespace FargoEnemyModifiers
{
//[Label("Enemy Modifiers Config")]
public class EnemyModifiersServerConfig : ModConfig
{
public override ConfigScope Mode => ConfigScope.ServerSide;
public static EnemyModifiersServerConfig Instance { get; private set; }
public override void OnLoaded()
{
Instance = this;
}
[Header("ModifierConfiguration")]
[DefaultValue(false)]
public bool BossModifiers;
[Increment(1)]
[Range(0, 100)]
[DefaultValue(50)]
[Slider]
public int ChanceForModifier;
[Range(1, 10)]
[DefaultValue(3)]
[Slider]
public int ModifierAmount;
[Increment(1)]
[Range(0, 100)]
[DefaultValue(50)]
[Slider]
public int ChanceForExtraModifier;
[DefaultValue(false)]
public bool ForceModifier;
[DefaultValue(0)]
[DrawTicks]
public ConfigModifierID ModifierEnum;
[Header("ModifierToggleHeader")]
[DefaultValue(true)]
public bool Red;
[DefaultValue(true)]
public bool Yellow;
[DefaultValue(true)]
public bool Blue;
[DefaultValue(true)]
public bool Green;
[DefaultValue(true)]
public bool Orange;
[DefaultValue(true)]
public bool Purple;
[DefaultValue(true)]
public bool Pink;
[Header("Rarity1Header")]
[DefaultValue(true)]
public bool Armored;
[DefaultValue(true)]
public bool Healthy;
[DefaultValue(true)]
public bool Impenetrable;
[DefaultValue(true)]
public bool Light;
[DefaultValue(true)]
public bool Menacing;
[DefaultValue(true)]
public bool Rampaging;
[DefaultValue(true)]
public bool Regenerating;
[DefaultValue(true)]
public bool Slow;
[DefaultValue(true)]
public bool Sluggish;
[DefaultValue(true)]
public bool Splitting;
[DefaultValue(true)]
public bool Swift;
[DefaultValue(true)]
public bool Unrelenting;
[DefaultValue(true)]
public bool Wealthy;
[DefaultValue(true)]
public bool Stinky;
[DefaultValue(true)]
public bool Shiny;
[DefaultValue(true)]
public bool Poor;
[DefaultValue(true)]
public bool Big;
[DefaultValue(true)]
public bool Small;
[DefaultValue(true)]
public bool Smoky;
[Header("Rarity2Header")]
[DefaultValue(true)]
public bool Lovestruck;
[DefaultValue(true)]
public bool Accelerating;
[DefaultValue(true)]
public bool Bulletproof;
[DefaultValue(true)]
public bool Flaming;
[DefaultValue(true)]
public bool Fortifying;
[DefaultValue(true)]
public bool Hexproof;
[DefaultValue(true)]
public bool Huge;
[DefaultValue(true)]
public bool Infested;
[DefaultValue(true)]
public bool Metallic;
[DefaultValue(true)]
public bool Miniature;
[DefaultValue(true)]
public bool Possessed;
[DefaultValue(true)]
public bool Rallying;
[DefaultValue(true)]
public bool Shielded;
[DefaultValue(true)]
public bool Stealthy;
[DefaultValue(true)]
public bool Vaccinated;
[DefaultValue(true)]
public bool Vampiric;
[DefaultValue(true)]
public bool Veiled;
[DefaultValue(true)]
public bool Reflective;
[DefaultValue(true)]
public bool Volatile;
[DefaultValue(true)]
public bool Frenzied;
[DefaultValue(true)]
public bool Scary;
[DefaultValue(true)]
public bool Sleepy;
[DefaultValue(true)]
public bool Polite;
[DefaultValue(true)]
public bool Fishy;
[DefaultValue(true)]
public bool Molten;
[Header("Rarity3Header")]
[DefaultValue(true)]
public bool Chained;
[DefaultValue(true)]
public bool Devouring;
[DefaultValue(true)]
public bool Hyper;
[DefaultValue(true)]
public bool Tricky;
[DefaultValue(true)]
public bool Juggernaut;
[DefaultValue(true)]
public bool Merchant;
[DefaultValue(true)]
public bool Showman;
[DefaultValue(true)]
public bool Solidifed;
[DefaultValue(true)]
public bool Undying;
[DefaultValue(true)]
public bool Worm;
[DefaultValue(true)]
public bool Swarming;
[DefaultValue(true)]
public bool Aquarian;
[DefaultValue(true)]
public bool Flucuating;
[DefaultValue(true)]
public bool Skeletal;
[DefaultValue(true)]
public bool Disguised;
[DefaultValue(true)]
public bool Shimmering;
[DefaultValue(true)]
public bool Celebratory;
[DefaultValue(true)]
public bool Sticky;
[DefaultValue(true)]
public bool Medic;
[DefaultValue(true)]
public bool Sorcerous;
[DefaultValue(true)]
public bool Creepy;
[DefaultValue(true)]
public bool Shy;
[DefaultValue(true)]
public bool Dramatic;
[DefaultValue(true)]
public bool Buzzing;
[Header("Rarity4Header")]
[DefaultValue(true)]
public bool Royal;
[DefaultValue(true)]
public bool Rainbow;
[DefaultValue(true)]
public bool Modifying;
[Header("Blacklists")]
public List<NPCDefinition> NPCBlacklist = getDefaultNPCBlacklist();
private static List<NPCDefinition> getDefaultNPCBlacklist()
{
List<NPCDefinition> NPCBlacklist = new List<NPCDefinition>
{
new NPCDefinition(NPCID.WallCreeper),
new NPCDefinition(NPCID.WallCreeperWall),
new NPCDefinition(NPCID.BlackRecluse),
new NPCDefinition(NPCID.BlackRecluseWall),
new NPCDefinition(NPCID.JungleCreeper),
new NPCDefinition(NPCID.JungleCreeperWall),
new NPCDefinition(NPCID.BloodCrawler),
new NPCDefinition(NPCID.BloodCrawlerWall),
new NPCDefinition(NPCID.DesertScorpionWall),
new NPCDefinition(NPCID.DesertScorpionWall),
new NPCDefinition(NPCID.BurningSphere),
new NPCDefinition(NPCID.ChaosBall),
new NPCDefinition(NPCID.WaterSphere),
new NPCDefinition(NPCID.VileSpit),
new NPCDefinition(NPCID.VileSpitEaterOfWorlds),
new NPCDefinition(NPCID.DetonatingBubble),
new NPCDefinition(NPCID.SolarFlare),
new NPCDefinition(NPCID.SolarGoop),
new NPCDefinition(NPCID.AncientLight),
new NPCDefinition(NPCID.AncientDoom),
new NPCDefinition(NPCID.CultistBossClone),
new NPCDefinition(NPCID.SpikeBall),
new NPCDefinition(NPCID.DD2EterniaCrystal),
new NPCDefinition(NPCID.DD2LanePortal),
new NPCDefinition(NPCID.EaterofWorldsHead),
new NPCDefinition(NPCID.EaterofWorldsBody),
new NPCDefinition(NPCID.EaterofWorldsTail),
new NPCDefinition(NPCID.DD2LanePortal),
new NPCDefinition(NPCID.DD2EterniaCrystal),
new NPCDefinition(NPCID.LunarTowerNebula),
new NPCDefinition(NPCID.LunarTowerSolar),
new NPCDefinition(NPCID.LunarTowerStardust),
new NPCDefinition(NPCID.LunarTowerVortex),
};
try
{
if (ModLoader.TryGetMod("Fargowiltas", out Mod fargoMod))
{
NPCBlacklist.Add(new NPCDefinition(ModContent.Find<ModNPC>("Fargowiltas", "SuperDummy").Type));
}
if (ModLoader.TryGetMod("FargowiltasSouls", out Mod fargoMod2))
{
NPCBlacklist.Add(new NPCDefinition(ModContent.Find<ModNPC>("FargowiltasSouls", "ShadowOrbNPC").Type));
NPCBlacklist.Add(new NPCDefinition(ModContent.Find<ModNPC>("FargowiltasSouls", "CrystalLeaf").Type));
}
if (ModLoader.TryGetMod("CalamityMod", out Mod calamityMod))
{
//EnemyModifiersConfig.Instance.NPCBlacklist.Add(new NPCDefinition(calamityMod.GetContent("")));
}
}
catch
{
}
return NPCBlacklist;
}
}
}