-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathtsorcScriptedEvents.cs
2374 lines (2069 loc) · 130 KB
/
tsorcScriptedEvents.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
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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.Config;
using Terraria.ModLoader.IO;
using tsorcRevamp;
using tsorcRevamp.Items;
using tsorcRevamp.Items.Lore;
using tsorcRevamp.Items.Materials;
using tsorcRevamp.Items.Potions;
using tsorcRevamp.NPCs.Bosses.SuperHardMode.Fiends;
using tsorcRevamp.Utilities;
namespace tsorcRevamp
{
public static class tsorcScriptedEvents
{
/**
* Scripted event class! Kinda a long boi so I tried to keep it well documented
* This can handle all the location-triggered special spawns and events we want to implement
* It works like this: The parameters of each event (location, enemy, detection radius, etc) are saved in a dictionary in InitializeScriptedEvents.
* On mod load, that dictionary is loaded into a list: InactiveEvents
* As the game runs, it checks whether the player entered the activation range for any event.
* If they have, it is removed from InactiveEvents (meaning it is no longer getting checked) and into ActiveEvents
* Once in there, it spawns the specified NPCs and watches them. Once all the NPCs associated with an event die, the event removes itself from ActiveEvents.
* If the player dies and respawns, the world is reloaded, or other similar things then the events are all re-added to InactiveEvents and can be activated again
* If an event is set to save, however, it will never activate again once the player has finished it.
* It saves the status of each event in such a way that should make it resistant to corruption due to events being added, changed, or removed.
* However, since enum names are how it identifies events, if you change one it will reset its save status to 'never run'.
*
*
* How to add a scripted NPC event:
* Go to public enum ScriptedEventType below and add an entry for your event
* Go to InitializeScriptedEvents, and add your scripted event.
* Finally, pair your enum and ScriptedEvent up in ScriptedEventDict
*
* The format for a ScriptedEvent is the following:
* ScriptedEvent [YourEventType] = new ScriptedEvent(position, detection radius, [NPC ID = -1], [Dust = 31], [save event: false], [visible detection range: false], [text to display: none], [text color: none], [custom condition: none], [custom scripted action: none], [only run action once: false]);
* Alternatively, you don't have to spawn an NPC! Events can exist without one and simply run a custom action event function instead.
* That's a lot! For reference, variables in brackets [like this] are not necessary. If you don't specify them, they will default to whatever's in the box
*
* Here's an explaination for what each variable there means:
* 1) Position: A "Vector2" variable containing the position (in tiles) to spawn the NPC. Created like 'new Vector2([Position X], [Position Y])'
* 2) Detection radius, again in tiles.
* 3) NPC ID: The ID for the NPC in question. For vanilla enemies, you can get this by using 'NPCID.[EnemyName]'. For modded enemies, you can do it like ModContent.NPCType<[Path.To.Enemy.File]>()
* Note: You don't actually need to spawn an NPC! This field is optional. If you don't want to, like in ExampleNoNPCScriptedEvent, simply put 'default' in the spot where you would put the NPC's ID.
* 4) What dust to spawn for the event. This controls both what appears around the NPC as it spawns, but also the dust that appears at the edge of its detection range (if that is enabled)
* 5) Save event: Should this event be permanantly saved once it's completed? If not, it will reappear once the player dies and respawns. Useful for bosses, and will also be used for minibosses once they're in.
* 6) Visible detection range: Should it show a ring or square of dust outlining the range of the event? Defaults to off. Helpful to highlight optional events, otherwise players wouldn't know anything is there.
* 7) Text to display: If you want the event to output some flavor text in chat when it runs, you can put that here.
* 8) Text color: If you have text, what color should it be? You can specify with either new Color(Red, Green, Blue), or 'Color.[ColorName]'.
*
* 9 and 10) The final few paramaters don't actually take variables, they take whole functions.
* The first is Custom Condition. This lets you specify when an event should happen.
* Some basic condition functions are provided below: NormalModeCondition, NightCustomCondition, HardModeCondition, etc.
* Each of these returns true under its stated conditions, and may be enough for now. However, it's easy to add more!
* Just write a function that returns 'true' when you want the event to occur, and pass it as an argument
* ExampleCondition exists as an example for how to do this. You can create conditions as complex as you'd like!
*
* The final main parameter is Custom Scripted Action.
* This allows you to pass a function to be run, much like Custom Condition.
* The difference is that the Custom Scripted Action function will be run for as long as the event is active
* You can create a Custom Scripted Action function similarly to a Custom Condition. The difference is that this function also takes a Player and an Int as parameters
* The player is the player who triggered the event, and the int is the ID for the NPC that spawned
* This action function must return a bool. If this event has no NPC associated, that bool tells the event handler whether or not to end the event. False = do not end, true = end it.
* On the other hand, if an event *does* have an NPC, it will ignore that. Those are connected to the life of their NPC instead, and will end automatically when the NPC dies.
*
*
* Adding custom stats:
* To customize the stats of a spawned NPC, add this line below your event line
* '[Event Name].SetCustomStats(Health, Defense, Damage);'
* An example of this is below ArtoriasEvent, giving the spawned Artorias dramatically weakened stats
* * Note: The damage stat here can not change the projectile damage for enemies, since the damage of each projectile is hardcoded independent of their true stats.
* That value MUST be changed via scripting instead. ArtoriasCustomAction shows an example of this.
*
* Adding custom drops:
* To add drops to a spawned NPC, add this line below your event line
* [Event Name].SetCustomDrops(new List<int>() { [ItemID 1], [ItemID 2], [ItemID 3], etc etc etc});
* For vanilla items, get their ID with 'ItemID.[ItemName]'
* For modded items, get it with 'ModContent.ItemType<Path.To.That.Specific.Item>()'
*
* Spawning a list of enemies instead of a single one:
* In this case, simply replace NPC ID with a List of the ID's of the enemies you want to spawn. They do not all have to be the same enemy!
* Then, follow it up with a list of the coordinates of each enemy in the swarm. The coordinates are passed as Vector2's, and an example is the ExampleHarpySwarm
*
* TODO:
* Minibosses
* Potentially make it easier to modify enemy projectile damage. Not sure if that's feasable, though.
*
* Another idea: Add the option to spawn particles around the edge of/within the detection range, so that players know it's there and can willingly trigger it (ex, for boss fights so they don't trigger it by accident)
*
* **/
//This is a dictionary that will store all the info for each of our events to keep them nice and neat!
public static Dictionary<ScriptedEventType, ScriptedEvent> ScriptedEventDict;
//This is a dictionary that will store whether or not each event has run its course and should no longer be activated
//The contents of this dictionary are saved and loaded across sessions
public static Dictionary<ScriptedEventType, bool> ScriptedEventValues;
//Stores the events that have not been triggered by the player. It will check if the player is within any of these
public static List<ScriptedEvent> EnabledEvents;
//Stores the events that have been triggered by the player and are currently active. It will run the RunEvent() code for each of these as long as they remain active.
public static List<ScriptedEvent> RunningEvents;
//Stores events that the player has triggered and are no longer active. Upon player death, these will be restored to InactiveEvents.
public static List<ScriptedEvent> DisabledEvents;
//For multiplayer. The server sends clients a list of events, which it stores here. They are not run client-side, and exist only so dust can be drawn indicating their presence.
//Necessary because event conditions are dynamic. There's no way for clients to know if events have ended or not unless they run them as well, which would result in duplication.
public static List<NetworkEvent> NetworkEvents;
//If a boss is alive, events are placed in a queue instead of re-enabled when players respawn. They are re-enabled once the boss dies or despawns. This is to prevent events, including events to *spawn* that very boss, from being re-enabled mid-fight.
public static List<ScriptedEvent> QueuedEvents;
//Each scripted event should have a definition here. I added some theoretical examples commented out
//This name is what the event handler uses to save an event, and marks them as unique.
public enum ScriptedEventType
{
Pinwheel,
LothricKnightCatacombs,
FireLurkerAmbush1,
Death,
BlackKnightSHMDungeon,
RedKnightOolicileForest,
BlackKnightHallowed,
QueenSlimeEvent,
GoblinSharkTropicalIsland,
GreatRedKnightInDesert,
AncestralSpirit,
SkeletronHidden,
AlienAmbush,
EoC,
EoW1,
AncientDemon,
LitchKing,
TheHunter,
TheRage,
AODE,
GoblinWizardWMF,
GoblinWizardClouds,
Golem2,
IceGolemEvent,
KingSlimeEvent,
HeroofLumeliaFight,
FireLurkerPain,
RedKnightPain,
RedKnightTwinMountain,
JungleWyvernFight,
SeathFight,
WyvernMageFight,
SlograAndGaibonFight,
SerrisFight,
MarilithFight,
PrimeFight,
KrakenFight,
GwynTombVision,
AbyssPortal,
GwynFight,
AbysmalOolacileSorcererFight,
WitchkingFight,
WyvernMageShadowFight,
ChaosFight,
BlightFight,
DarkCloudPyramidFight,
ArtoriasFight,
BlackKnightCity,
//ExampleHarpySwarm,
//ExampleNoNPCScriptEvent,
SpawnUndeadMerchant,
SpawnGoblin,
AttraidiesTheSorrowEvent,
TwinEoWFight,
DunledingAmbush,
BoulderfallEvent1,
BoulderfallEvent2,
BoulderfallEvent3,
FirebombHollowAmbush,
LeonhardPhase1Event,
HollowAmbush1,
GoblinAmbush1,
ShadowMageAmbush1,
BridgeAmbush1,
LothricAmbush1,
LothricAmbush2,
SpawnMechanic,
SpawnWizard,
HellkiteDragonEvent,
EoL,
DungeonGuardian,
OldManEvent,
DualSandsprogAmbush1,
DrownedAmbush1,
DrownedAmbush2,
MushroomCavern,
AshCavernLeftside,
AshCavernRightside,
ShadowTempleEvent,
ShadowTempleEvent2,
MoltenSkyTempleEvent,
SandstormElementalEvent,
KingSlime2Event,
JungleMimicEvent,
BloodBossEvent1,
BloodBossEvent2,
BloodBossEvent3,
CatacombsEvent,
FoundryEvent,
FrozenCathedralEvent,
Lunatic,
IceGolemIsland,
AncestralSpiritEvent2,
FrozenCathedralEvent2,
WyvernPrisonEvent,
//AncientDemonAmbush,
//HellkiteDragonAttack
//Frogpocalypse2_TheFroggening,
}
//Contains all the info defining each scripted event, and loads it all into the dictionary
//It also initializes the other dictionary and lists
public static void InitializeScriptedEvents()
{
Player player = Main.LocalPlayer;
//ScriptedEvent[YourEventType] = new ScriptedEvent(position, detection radius, [NPC ID = -1], [Dust = 31], [save event: false], [visible detection range: false], [text to display: none], [text color: none], [custom condition: none], [custom scripted action: none], [only run action once: false]);
//PINWHEEL
ScriptedEvent Pinwheel = new ScriptedEvent(new Vector2(4139f, 923), 15, ModContent.NPCType<NPCs.Bosses.Pinwheel.Pinwheel>(), DustID.Asphalt, true, true, true, LangUtils.GetTextValue("Events.Pinwheel"), Color.Firebrick, false);
//LOTHRIC BLACK KNIGHT IN CATACOMBS OF THE DROWNED
ScriptedEvent LothricKnightCatacombs = new ScriptedEvent(new Vector2(4137, 895), 10, ModContent.NPCType<NPCs.Enemies.LothricBlackKnight>(), DustID.ShadowbeamStaff, true, true, true, LangUtils.GetTextValue("Events.BlackKnight"), Color.Purple, false, default, LothricBlackKnightCustomAction);
LothricKnightCatacombs.SetCustomStats(1100, 8, 40, 1500);
//FIRELURKER AMBUSH 1 - Path of Ambition main room
List<int> FireLurkerAmbush1EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.FireLurker>(), ModContent.NPCType<NPCs.Enemies.FireLurker>() };
List<Vector2> FireLurkerAmbush1EnemyLocations = new List<Vector2>() { new Vector2(3559, 1248), new Vector2(3629, 1248) };
ScriptedEvent FireLurkerAmbush1 = new ScriptedEvent(new Vector2(3591, 1248), 6, FireLurkerAmbush1EnemyTypeList, FireLurkerAmbush1EnemyLocations, DustID.DungeonWater, true, false, false, LangUtils.GetTextValue("Events.FireLurker"), Color.Red, false, default, FireLurkerPainCustomAction);
FireLurkerAmbush1.SetCustomStats(500, 12, 70, 650);
FireLurkerAmbush1.SetCustomDrops(new List<int>() { ModContent.ItemType<Items.Potions.GreenBlossom>() }, new List<int>() { 5 }, true);
//DEATH
ScriptedEvent Death = new ScriptedEvent(new Vector2(1066, 529), 30, ModContent.NPCType<NPCs.Bosses.Death>(), DustID.BoneTorch, true, true, true, LangUtils.GetTextValue("Events.Death"), Color.Black, false);
//BLACK KNIGHT IN BLUE SHM DUNGEON
ScriptedEvent BlackKnightSHMDungeon = new ScriptedEvent(new Vector2(2282, 1650), 30, ModContent.NPCType<NPCs.Enemies.BlackKnight>(), DustID.ShadowbeamStaff, true, true, true, LangUtils.GetTextValue("Events.BlackKnight"), Color.Purple, false, default, BlackKnightCustomAction);
BlackKnightSHMDungeon.SetCustomStats(25000, 30, 140, 16000);
BlackKnightSHMDungeon.SetCustomDrops(new List<int>() { ModContent.ItemType<SoulCoin>(), ModContent.ItemType<PurgingStone>() }, new List<int>() { 50, 1 });
//RED KNIGHT IN OOLICILE FOREST
ScriptedEvent RedKnightOolicileForest = new ScriptedEvent(new Vector2(5596, 926), 10, ModContent.NPCType<NPCs.Enemies.RedKnight>(), DustID.OrangeTorch, true, true, true, LangUtils.GetTextValue("Events.RedKnight2"), Color.Purple, false, default, RedKnightMountainCustomAction);
RedKnightOolicileForest.SetCustomDrops(new List<int>() { ItemID.GreaterHealingPotion, ItemID.RagePotion, ItemID.WrathPotion, ModContent.ItemType<SoulCoin>() }, new List<int>() { 4, 3, 2, 50 });
RedKnightOolicileForest.SetCustomStats(1000, 9, 55, 1250);
//BLACK KNIGHT IN HALLOWED CAVES
ScriptedEvent BlackKnightHallowed = new ScriptedEvent(new Vector2(7454, 1413), 40, ModContent.NPCType<NPCs.Enemies.BlackKnight>(), DustID.ShadowbeamStaff, true, false, true, LangUtils.GetTextValue("Events.BlackKnight"), Color.Purple, false, default, BlackKnightCustomAction);
BlackKnightHallowed.SetCustomStats(6000, 20, 80, 5000);
BlackKnightHallowed.SetCustomDrops(new List<int>() { ModContent.ItemType<SoulCoin>(), ModContent.ItemType<PurgingStone>() }, new List<int>() { 50, 1 });
//QUEEN SLIME
ScriptedEvent QueenSlimeEvent = new ScriptedEvent(new Vector2(7059, 1289), 25, NPCID.QueenSlimeBoss, DustID.MagicMirror, true, true, true, LangUtils.GetTextValue("Events.QueenSlime"), Color.Blue, false);
//GREAT RED KNIGHT IN DESERT
ScriptedEvent GreatRedKnightInDesert = new ScriptedEvent(new Vector2(2229, 856), 100, ModContent.NPCType<NPCs.Bosses.SuperHardMode.GreatRedKnight>(), DustID.Shadowflame, true, false, true, LangUtils.GetTextValue("Events.GreatRedKnightInvasion"), Color.Red, false, SuperHardModeCustomCondition);
GreatRedKnightInDesert.SetCustomDrops(new List<int>() { ItemID.RagePotion, ItemID.WrathPotion, ModContent.ItemType<Humanity>() }, new List<int>() { 2, 2, 2 });
GreatRedKnightInDesert.SetCustomStats(null, null, null, 20000);
//Ancestral Spirit
ScriptedEvent AncestralSpiritEvent = new ScriptedEvent(new Vector2(4043, 143), 30, NPCID.Deerclops, DustID.Shadowflame, true, true, true, LangUtils.GetTextValue("Events.AncestralSpirit"), Color.Blue, false, null, SetNightCustomAction);
//SkeletronHidden
ScriptedEvent SkeletronHiddenEvent = new ScriptedEvent(new Vector2(5563, 1676), 16, NPCID.SkeletronHead, DustID.MagicMirror, true, true, true, LangUtils.GetTextValue("Events.SkeletronHidden"), Color.Blue, false, null, SetNightCustomAction);
//SkeletronHidden
ScriptedEvent OldManEvent = new ScriptedEvent(new Vector2(4979, 1398), 64, NPCID.OldMan, DustID.WhiteTorch, true, true, true, "default", Color.White, false, () => { return !NPC.AnyNPCs(NPCID.OldMan) && !NPC.AnyNPCs(NPCID.SkeletronHead) && !NPC.downedBoss3; });
//EoC
ScriptedEvent EoCEvent = new ScriptedEvent(new Vector2(3900, 1138), 20, NPCID.EyeofCthulhu, DustID.MagicMirror, true, true, true, LangUtils.GetTextValue("Events.EoC"), Color.Blue, false, null, SetNightCustomAction);
//EoW1
ScriptedEvent EoW1Event = new ScriptedEvent(new Vector2(3633, 996), 46, NPCID.EaterofWorldsHead, DustID.Shadowflame, false, true, true, LangUtils.GetTextValue("Events.EoW"), Color.Purple, false, PreEoWCustomCondition);
//EMPRESS OF LIGHT
ScriptedEvent EoL = new ScriptedEvent(new Vector2(4484, 355), 100, NPCID.HallowBoss, DustID.RainbowTorch, false, true, true, LangUtils.GetTextValue("Events.EoL"), Main.DiscoColor, false, EoLDownedCondition);
ScriptedEvent Lunatic = new ScriptedEvent(new Vector2(171, 210), 40, NPCID.CultistBoss, 15, false, true, true, LangUtils.GetTextValue("Events.Lunatic"), Color.Cyan, false, RemixMapCondition);
Lunatic.SetCustomDrops(new List<int>() { ItemID.CelestialSigil }, new List<int>() {1});
Lunatic.SetCustomStats(100000, null, null, null);
//LITCH KING
ScriptedEvent LitchKing = new ScriptedEvent(new Vector2(364, 1897), 40, ModContent.NPCType<EarthFiendLich>(), DustID.GoldFlame, true, true, true, LangUtils.GetTextValue("Events.LichKing"), Color.Gold, false);
//THE HUNTER
ScriptedEvent TheHunter = new ScriptedEvent(new Vector2(296, 1560), 36, ModContent.NPCType<NPCs.Bosses.TheHunter>(), DustID.GoldFlame, true, true, true, LangUtils.GetTextValue("Events.Hunter"), Color.DarkGreen, false);
//THE RAGE
ScriptedEvent TheRage = new ScriptedEvent(new Vector2(7000, 1845), 30, ModContent.NPCType<NPCs.Bosses.TheRage>(), DustID.GoldFlame, true, true, true, LangUtils.GetTextValue("Events.Rage"), Color.Red, false);
//ANCIENT DEMON (FORGOTTEN CITY, CLOSE TO FIRE TEMPLE)
ScriptedEvent AncientDemon = new ScriptedEvent(new Vector2(5317, 1800), 25, ModContent.NPCType<NPCs.Bosses.AncientDemon>(), DustID.GoldFlame, true, true, true, LangUtils.GetTextValue("Events.AncientDemon"), Color.MediumPurple, false);
AncientDemon.SetCustomDrops(new List<int>() { ModContent.ItemType<Items.Humanity>(), ModContent.ItemType<DarkSoul>() }, new List<int>() { 1, 5000 });
//ANCIENT OOLACILE DEMON (EARLY-GAME)
ScriptedEvent AODE = new ScriptedEvent(new Vector2(5652, 971), 27, ModContent.NPCType<NPCs.Bosses.AncientOolacileDemon>(), DustID.GoldFlame, true, true, true, LangUtils.GetTextValue("Events.AncientOolacileDemon"), Color.MediumPurple, false);
AODE.SetCustomDrops(new List<int>() { ModContent.ItemType<Items.Humanity>(), ModContent.ItemType<DarkSoul>() }, new List<int>() { 1, 1500 });
//GOBLIN SUMMONER IN WMF
ScriptedEvent GoblinWizardWMF = new ScriptedEvent(new Vector2(7153, 411), 20, NPCID.GoblinSummoner, DustID.MagicMirror, true, true, false, LangUtils.GetTextValue("Events.GoblinSummoner1"), Color.MediumPurple, false);
GoblinWizardWMF.SetCustomDrops(new List<int>() { ModContent.ItemType<Items.Humanity>(), ModContent.ItemType<DarkSoul>() }, new List<int>() { 1, 1500 });
//GOBLIN SUMMONER IN THE CLOUDS (WMF)
ScriptedEvent GoblinWizardClouds = new ScriptedEvent(new Vector2(7822, 118), 40, NPCID.GoblinSummoner, DustID.MagicMirror, true, false, false, LangUtils.GetTextValue("Events.GoblinSummoner2"), Color.MediumPurple, false);
GoblinWizardClouds.SetCustomDrops(new List<int>() { ModContent.ItemType<Items.Humanity>(), ModContent.ItemType<DarkSoul>() }, new List<int>() { 1, 1500 });
//ICE GOLEM WYVERN COMBO
List<int> Golem2EnemyTypeList = new List<int>() { NPCID.WyvernHead, NPCID.IceGolem };
List<Vector2> Golem2EnemyLocations = new List<Vector2>() { new Vector2(7776, 829), new Vector2(7800, 868) };
ScriptedEvent Golem2 = new ScriptedEvent(new Vector2(7900, 868), 30, Golem2EnemyTypeList, Golem2EnemyLocations, DustID.Snow, true, false, false, LangUtils.GetTextValue("Events.IceGolemWyvern"), Color.BlueViolet, false, OnlyAdventureMapCondition, StormCustomAction); //
//ANCESTRAL SPIRIT (REMIX MAP ONLY)
List<int> AncestralSpiritEvent2EnemyTypeList = new List<int>() { NPCID.Deerclops };
List<Vector2> AncestralSpiritEvent2EnemyLocations = new List<Vector2>() { new Vector2(7800, 868) };
ScriptedEvent AncestralSpiritEvent2 = new ScriptedEvent(new Vector2(7900, 868), 30, AncestralSpiritEvent2EnemyTypeList, AncestralSpiritEvent2EnemyLocations, DustID.Snow, true, false, false, LangUtils.GetTextValue("Events.AncestralSpirit"), Color.BlueViolet, false, RemixMapCondition, RainCustomAction);
AncestralSpiritEvent2.SetCustomStats(17000, 18, 80, 15000);
AncestralSpiritEvent2.SetCustomDrops(new List<int>() { ItemID.FrostCore, ItemID.WarmthPotion }, new List<int>() { 1, 4 });
//ICE GOLEM - FROZEN OCEAN
ScriptedEvent IceGolemEvent = new ScriptedEvent(new Vector2(7651, 1020), 20, NPCID.IceGolem, DustID.MagicMirror, true, true, false, LangUtils.GetTextValue("Events.IceGolem"), Color.Blue, false);
//KING SLIME
ScriptedEvent KingSlimeEvent = new ScriptedEvent(new Vector2(5995, 1117), 20, NPCID.KingSlime, DustID.MagicMirror, true, true, true, LangUtils.GetTextValue("Events.KingSlime"), Color.Blue, false);
//HERO OF LUMELIA FIGHT
ScriptedEvent HeroofLumeliaFight = new ScriptedEvent(new Vector2(2229, 854), 60, ModContent.NPCType<NPCs.Bosses.HeroofLumelia>(), DustID.OrangeTorch, true, true, true, LangUtils.GetTextValue("Events.HeroOfLumelia"), Color.LightGoldenrodYellow, false, LumeliaCustomCondition);//location previously was 4413, 717, near village
//FIRE LURKER PATH OF PAIN
ScriptedEvent FireLurkerPain = new ScriptedEvent(new Vector2(3245, 1252), 9, ModContent.NPCType<NPCs.Enemies.FireLurker>(), DustID.CursedTorch, true, true, true, LangUtils.GetTextValue("Events.FireLurker"), Color.Purple, false, default, FireLurkerPainCustomAction);
FireLurkerPain.SetCustomStats(1800, 12, 85, 1500);
FireLurkerPain.SetCustomDrops(new List<int>() { ItemID.RagePotion, ItemID.WrathPotion }, new List<int>() { 3, 4 });
//RED KNIGHT IN PATH OF PAIN
ScriptedEvent RedKnightPain = new ScriptedEvent(new Vector2(3897, 1219), 20, ModContent.NPCType<NPCs.Enemies.RedKnight>(), DustID.OrangeTorch, true, true, true, LangUtils.GetTextValue("Events.RedKnight1"), Color.Purple, false, default, RedKnightPainCustomAction);
RedKnightPain.SetCustomDrops(new List<int>() { ItemID.RagePotion, ItemID.WrathPotion, ModContent.ItemType<WorldRune>() }, new List<int>() { 2, 3, 4 });
RedKnightPain.SetCustomStats(2660, 10, 65, 3350);
//RED KNIGHT IN TWIN PEAKS MOUNTAIN
ScriptedEvent RedKnightTwinMountain = new ScriptedEvent(new Vector2(3287, 495), 10, ModContent.NPCType<NPCs.Enemies.RedKnight>(), DustID.OrangeTorch, true, true, true, LangUtils.GetTextValue("Events.RedKnight2"), Color.Purple, false, default, RedKnightMountainCustomAction);
RedKnightTwinMountain.SetCustomDrops(new List<int>() { ItemID.RagePotion, ItemID.WrathPotion, ItemID.AmmoReservationPotion }, new List<int>() { 3, 4, 5 });
RedKnightTwinMountain.SetCustomStats(2000, 10, 55, 2500);
//JUNGLE WYVERN
ScriptedEvent JungleWyvernEvent = new ScriptedEvent(new Vector2(4331, 1713), 16, ModContent.NPCType<NPCs.Bosses.JungleWyvern.JungleWyvernHead>(), DustID.CursedTorch, true, true, true, LangUtils.GetTextValue("Events.JungleWyvern"), Color.Green, false);
//SEATH THE SCALELESS
ScriptedEvent SeathEvent = new ScriptedEvent(new Vector2(7737, 1546), 40, ModContent.NPCType<NPCs.Bosses.SuperHardMode.Seath.SeathTheScalelessHead>(), DustID.FireworkFountain_Blue, true, true, true, LangUtils.GetTextValue("Events.SeathTheScaleless"), Color.Blue, false);
//WYVERN MAGE
List<int> WyvernMageEnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Bosses.WyvernMage.WyvernMage>(), ModContent.NPCType<NPCs.Bosses.WyvernMage.MechaDragonHead>() };
List<Vector2> WyvernLocations = new List<Vector2>() { new Vector2(7192, 364), new Vector2(7192, 364) };
ScriptedEvent WyvernMageEvent = new ScriptedEvent(new Vector2(7192, 364), 40, WyvernMageEnemyTypeList, WyvernLocations, DustID.MagicMirror, true, true, true, LangUtils.GetTextValue("Events.WyvernMage"), Color.LightCyan, false, null, StormCustomAction);
//SLOGRA and GAIBON
//This one works a little different from the others, because it's an event with two bosses that spawns them in an action instead of normally
//As such, it doesn't "save". Instead, it simply has a custom condition that returns "false" if the boss has truly been beaten. Without this, it would save after just running once...
List<int> SoggyandGaibonEnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Bosses.Slogra>(), ModContent.NPCType<NPCs.Bosses.Gaibon>() };
List<Vector2> SoggyandGaibonLocations = new List<Vector2>() { new Vector2(6192, 1267), new Vector2(6192, 1267) };
ScriptedEvent SlograAndGaibonEvent = new ScriptedEvent(new Vector2(6192, 1267), 30, SoggyandGaibonEnemyTypeList, SoggyandGaibonLocations, DustID.Shadowflame, false, true, true, LangUtils.GetTextValue("Events.SlograAndGaibon"), Color.Purple, false, SlograGaibonCondition);
//SERRIS
//Like Slogra and Gaibon, this one works a little different due to spawning two bosses.
List<int> SerrisEnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Bosses.Serris.SerrisHead>(), ModContent.NPCType<NPCs.Bosses.Serris.SerrisHead>(), ModContent.NPCType<NPCs.Bosses.Serris.SerrisHead>() };
List<Vector2> SerrisEnemyLocations = new List<Vector2>() { new Vector2(1136, 956) + new Vector2(100, 0).RotatedBy(MathHelper.Pi / 3), new Vector2(1136, 956) + new Vector2(100, 0).RotatedBy(-MathHelper.Pi / 3), new Vector2(1136, 956) + new Vector2(100, 0).RotatedBy(MathHelper.Pi) };
ScriptedEvent SerrisEvent = new ScriptedEvent(new Vector2(1136, 956), 30, SerrisEnemyTypeList, SerrisEnemyLocations, DustID.FireworkFountain_Blue, false, true, true, LangUtils.GetTextValue("Events.Serris"), Color.Blue, false, SerrisCustomCondition);
//MARILITH
ScriptedEvent MarilithEvent = new ScriptedEvent(new Vector2(3235, 1770), 100, ModContent.NPCType<MarilithIntro>(), DustID.RedTorch, false, true, true, LangUtils.GetTextValue("Events.Marilith"), Color.Red, false, MarilithCustomCondition, disablePeaceCandle: true);
//SKELETRON PRIME
ScriptedEvent PrimeEvent = new ScriptedEvent(new Vector2(5090, 1103), 75, ModContent.NPCType<NPCs.Bosses.PrimeV2.PrimeIntro>(), DustID.RedTorch, false, false, true, LangUtils.GetTextValue("Events.TheMachine"), Color.Gray, false, PrimeCustomCondition);
//KRAKEN
ScriptedEvent KrakenEvent = new ScriptedEvent(new Vector2(1821, 1702), 30, ModContent.NPCType<WaterFiendKraken>(), DustID.MagicMirror, true, true, true, LangUtils.GetTextValue("Events.WaterFiendKraken"), Color.Blue, false, SuperHardModeCustomCondition);
//GWYN's TOMB VISIONS
ScriptedEvent GwynsTombEvent = new ScriptedEvent(new Vector2(670, 1164), 150, ModContent.NPCType<NPCs.Special.GwynBossVision>(), DustID.RedTorch, false, true, true, LangUtils.GetTextValue("Events.GwynTombVisions"), default, false, GwynsTombVisionCustomCondition);
//ABYSS PORTAL
ScriptedEvent AbyssPortalEvent = new ScriptedEvent(new Vector2(670, 1164), 9999999, ModContent.NPCType<NPCs.Special.AbyssPortal>(), DustID.RedTorch, false, false, false, LangUtils.GetTextValue("Events.AbyssPortal"), default, false, AbyssPortalCustomCondition);
//GWYN
ScriptedEvent GwynEvent = new ScriptedEvent(new Vector2(832, 1244), 16, ModContent.NPCType<NPCs.Bosses.SuperHardMode.Gwyn>(), DustID.OrangeTorch, true, true, true, LangUtils.GetTextValue("Events.Gwyn"), Color.Red, false);
//ABYSMAL OOLACILE SORCERER
ScriptedEvent AbysmalOolacileSorcererEvent = new ScriptedEvent(new Vector2(6721, 1905), 40, ModContent.NPCType<NPCs.Bosses.SuperHardMode.AbysmalOolacileSorcerer>(), DustID.Shadowflame, true, true, true, LangUtils.GetTextValue("Events.AbysmalOolacileSorcerer"), Color.Red, false, SuperHardModeCustomCondition);
//WITCHKING
ScriptedEvent WitchkingEvent = new ScriptedEvent(new Vector2(2484, 1795), 30, ModContent.NPCType<NPCs.Bosses.SuperHardMode.Witchking>(), DustID.OrangeTorch, true, true, true, LangUtils.GetTextValue("Events.Witchking"), Color.Red, false, SuperHardModeCustomCondition);
//BLIGHT
ScriptedEvent BlightEvent = new ScriptedEvent(new Vector2(8174, 866), 30, ModContent.NPCType<NPCs.Bosses.SuperHardMode.Blight>(), DustID.MagicMirror, true, true, true, LangUtils.GetTextValue("Events.Blight"), Color.Blue, false, SuperHardModeCustomCondition);
//BlightEvent.SetCustomStats(50000, 30, 50);
//CHAOS
ScriptedEvent ChaosEvent = new ScriptedEvent(new Vector2(6415, 1888), 50, ModContent.NPCType<NPCs.Bosses.SuperHardMode.Chaos>(), DustID.GoldFlame, true, true, true, LangUtils.GetTextValue("Events.Chaos"), Color.Red, false, SuperHardModeCustomCondition);
//WYVERN MAGE SHADOW-SHM
List<int> WyvernShadowEnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Bosses.SuperHardMode.GhostWyvernMage.WyvernMageShadow>(), ModContent.NPCType<NPCs.Bosses.SuperHardMode.GhostWyvernMage.GhostDragonHead>() };
List<Vector2> WyvernShadowLocations = new List<Vector2>() { new Vector2(6432, 196), new Vector2(6432, 196) };
ScriptedEvent WyvernMageShadowEvent = new ScriptedEvent(new Vector2(6432, 196), 20, WyvernShadowEnemyTypeList, WyvernShadowLocations, DustID.MagicMirror, true, true, true, LangUtils.GetTextValue("Events.WyvernMageShadow"), Color.LightBlue, false, SuperHardModeCustomCondition);
//DARK CLOUD
ScriptedEvent DarkCloudEvent = new ScriptedEvent(new Vector2(5828, 1760), 30, ModContent.NPCType<NPCs.Bosses.SuperHardMode.DarkCloud>(), DustID.ShadowbeamStaff, true, true, true, LangUtils.GetTextValue("Events.DarkCloud"), Color.LightCyan, false, SuperHardModeCustomCondition);
//ARTORIAS
ScriptedEvent ArtoriasEvent = new ScriptedEvent(new Vector2(5344, 1692), 15, ModContent.NPCType<NPCs.Bosses.SuperHardMode.Artorias>(), DustID.GoldFlame, true, true, true, LangUtils.GetTextValue("Events.Artorias"), Color.Gold, false, SuperHardModeCustomCondition);
//ArtoriasEvent.SetCustomDrops(new List<int>() { ItemID.RodofDiscord, ModContent.ItemType<Items.DestructionElement>() }, new List<int>() { 1, 4 });
//BLACK KNIGHT IN FORGOTTEN CITY
ScriptedEvent BlackKnightCity = new ScriptedEvent(new Vector2(4508, 1745), 20, ModContent.NPCType<NPCs.Enemies.BlackKnight>(), DustID.ShadowbeamStaff, true, true, true, LangUtils.GetTextValue("Events.BlackKnight"), Color.Purple, false, default, BlackKnightCustomAction);
BlackKnightCity.SetCustomStats(3000, 10, 60, 3500);
BlackKnightCity.SetCustomDrops(new List<int>() { ModContent.ItemType<SoulCoin>(), ModContent.ItemType<PurgingStone>() }, new List<int>() { 50, 1 });
//ATTRAIDIES THE SORROW EVENT
ScriptedEvent AttraidiesTheSorrowEvent = new ScriptedEvent(new Vector2(8216.5f, 1630), 30, ModContent.NPCType<NPCs.Special.AttraidiesApparition>(), DustID.ShadowbeamStaff, false, true, true, LangUtils.GetTextValue("Events.SorrowAttraidies"), Color.OrangeRed, false, AttraidiesTheSorrowCondition);
//TWIN EATER OF WORLDS FIGHT
ScriptedEvent TwinEoWFight = new ScriptedEvent(new Vector2(3245, 1215), 15, default, DustID.ShadowbeamStaff, true, true, true, LangUtils.GetTextValue("Events.TwinEaters"), Color.Purple, false, TwinEoWCustomCondition, TwinEoWAction);
//DUNLENDING AMBUSH
List<int> DunledingAmbushEnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.Dunlending>(), ModContent.NPCType<NPCs.Enemies.Dunlending>(), ModContent.NPCType<NPCs.Enemies.Dunlending>() };
List<Vector2> DunledingAmbushEnemyLocations = new List<Vector2>() { new Vector2(4697, 858), new Vector2(4645, 858), new Vector2(4645, 841) };
ScriptedEvent DunledingAmbush = new ScriptedEvent(new Vector2(4666, 856), 10, DunledingAmbushEnemyTypeList, DunledingAmbushEnemyLocations, default, true, false, false, LangUtils.GetTextValue("Events.DunlendingAmbush"), Color.Red, false, PreEoCCustomCondition, DundledingAmbushAction);
if (Main.netMode == NetmodeID.SinglePlayer && Main.expertMode)
{
DunledingAmbush.SetCustomStats((int?)(player.statLifeMax2 * .5f), null, (int?)(player.statLifeMax2 * 0.10f) + 25); //damage doesn't double for Expert
}
DunledingAmbush.SetCustomDrops(new List<int>() { ModContent.ItemType<DodgerollMemo>() }, new List<int>() { 1 }, true);
//ALIEN AMBUSH
List<int> AlienAmbushEnemyTypeList = new List<int>() { NPCID.VortexHornet, NPCID.VortexHornet, NPCID.VortexHornet, NPCID.VortexHornet, NPCID.VortexHornet, NPCID.VortexHornet };
List<Vector2> AlienAmbushEnemyLocations = new List<Vector2>() { new Vector2(6069, 69), new Vector2(6010, 79), new Vector2(6010, 79), new Vector2(6079, 79), new Vector2(6041, 69), new Vector2(6079, 79) };
ScriptedEvent AlienAmbush = new ScriptedEvent(new Vector2(6041, 79), 60, AlienAmbushEnemyTypeList, AlienAmbushEnemyLocations, default, true, false, false, LangUtils.GetTextValue("Events.AlienAmbush"), Color.Red, false, PreMechCustomCondition, AlienAmbushAction);
//HARPY SWARM
//List<int> HarpySwarmEnemyTypeList = new List<int>() { NPCID.Harpy, NPCID.Harpy, NPCID.Harpy, NPCID.Harpy, NPCID.Harpy };
//List<Vector2> HarpySwarmEnemyLocations = new List<Vector2>() { new Vector2(525, 837), new Vector2(545, 837), new Vector2(505, 837), new Vector2(525, 817), new Vector2(525, 857) };
//ScriptedEvent ExampleHarpySwarm = new ScriptedEvent(new Vector2(525, 837), 50, HarpySwarmEnemyTypeList, HarpySwarmEnemyLocations, DustID.BlueFairy, false, true, "A Swarm of Harpies appears!", Color.Cyan);
//ExampleHarpySwarm.SetCustomStats(50, 5, 30);
//List<int> HarpyDropList = new List<int>() { ModContent.ItemType<Items.DarkSoul>(), ItemID.Feather };
//List<int> HarpyDropCounts = new List<int>() { 50, 10 };
//ExampleHarpySwarm.SetCustomDrops(HarpyDropList, HarpyDropCounts);
//EXAMPLE NO NPC SCRIPTED EVENT
//ScriptedEvent ExampleNoNPCScriptEvent = new ScriptedEvent(new Vector2(456, 867), 60, default, DustID.GreenFairy, default, true, "The example scripted event has begun...", Color.Green, false, ExampleCondition, ExampleCustomAction);
//ScriptedEvent FrogpocalypseEvent = new ScriptedEvent(SuperHardModeCustomCondition, new Vector2(5728, 1460), 120, ModContent.NPCType<NPCs.Enemies.MutantGigatoad>(), DustID.GreenTorch, default, true, "The Abyssal Toad rises to assist in debugging...", Color.Green);
//UNDEAD MERCHANT SPAWN EVENT
ScriptedEvent SpawnUndeadMerchant = new ScriptedEvent(new Vector2(1686, 963), 50, default, 31, false, false, false, "", default, false, UndeadMerchantCondition, UndeadMerchantAction);
//GOBLIN TINKERER SPAWN EVENT
ScriptedEvent SpawnGoblin = new ScriptedEvent(new Vector2(4456, 1744), 100, default, 31, true, true, false, "", default, false, TinkererCondition, TinkererAction);
//MECHANIC SPAWN EVENT
ScriptedEvent SpawnMechanic = new ScriptedEvent(new Vector2(294, 1366), 100, default, 31, true, true, false, "", default, false, MechanicCondition, MechanicAction);
//WIZARD SPAWN EVENT
ScriptedEvent SpawnWizard = new ScriptedEvent(new Vector2(7322, 603), 40, default, 31, true, true, false, "", default, true, WizardCondition, WizardAction);
//BOULDERFALL EVENT 1 - EARTH TEMPLE ENTRANCE
ScriptedEvent BoulderfallEvent1 = new ScriptedEvent(new Vector2(4378, 922), 6, default, default, true, false, false, "", default, false, default, BoulderfallEvent1Action);
//BOULDERFALL EVENT 2 - BLUE DUNGEON BRICK PARKOUR ROOM IN MOUNTAIN
ScriptedEvent BoulderfallEvent2 = new ScriptedEvent(new Vector2(3518, 429), 2, default, default, true, false, false, "", default, false, default, BoulderfallEvent2Action);
//BOULDERFALL EVENT 3 - TWIN PEAK RIGHTMOST ENTRANCE
ScriptedEvent BoulderfallEvent3 = new ScriptedEvent(new Vector2(3665, 360), 6, default, default, true, false, false, "", default, false, default, BoulderfallEvent3Action);
//FIREBOMB HOLLOW AMBUSH - ON BRIDGE AT TWIN PEAKS - ONLY ONCE
List<int> FirebombHollowAmbushEnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.HollowSpearman>(), ModContent.NPCType<NPCs.Enemies.FirebombHollow>() };
List<Vector2> FirebombHollowAmbushEnemyLocations = new List<Vector2>() { new Vector2(3386, 367), new Vector2(3451, 367) };
ScriptedEvent FirebombHollowAmbush = new ScriptedEvent(new Vector2(3418, 364), 10, FirebombHollowAmbushEnemyTypeList, FirebombHollowAmbushEnemyLocations, default, true, false, false, LangUtils.GetTextValue("Events.FirebombHollowAmbush"), Color.Red, false, default, FirebombHollowAmbushAction);
//LEONHARD PHASE 1 EVENT - BY ADAMANTITE GATE ACROSS BRIDGE FROM WIZARDS HOUSE
ScriptedEvent LeonhardPhase1Event = new ScriptedEvent(new Vector2(3314, 355), 34, ModContent.NPCType<NPCs.Special.LeonhardPhase1>(), 54, true, false, true, LangUtils.GetTextValue("Events.Leonhard1"), Color.Red, false, LeonhardPhase1Undefeated);
//HOLLOW AMBUSH 1 - BOTTOM RIGHT OF EARTH TEMPLE
List<int> HollowAmbush1EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.HollowWarrior>(), ModContent.NPCType<NPCs.Enemies.FirebombHollow>() };
List<Vector2> HollowAmbush1EnemyLocations = new List<Vector2>() { new Vector2(4446, 1211), new Vector2(4456, 1211) };
ScriptedEvent HollowAmbush1 = new ScriptedEvent(new Vector2(4422, 1210), 10, HollowAmbush1EnemyTypeList, HollowAmbush1EnemyLocations, default, true, false, false, LangUtils.GetTextValue("Events.HollowAmbush1"), Color.Red, false, PreEoCCustomCondition, null);
//GOBLIN AMBUSH 1 - RIGHT OF WORLD SPAWN
List<int> GoblinAmbush1EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.AbandonedStump>(), NPCID.GoblinSorcerer, NPCID.GoblinScout };
List<Vector2> GoblinAmbush1EnemyLocations = new List<Vector2>() { new Vector2(5012, 851), new Vector2(5013, 823), new Vector2(5049f, 839) };
ScriptedEvent GoblinAmbush1 = new ScriptedEvent(new Vector2(5028, 837), 18, GoblinAmbush1EnemyTypeList, GoblinAmbush1EnemyLocations, default, true, false, false, LangUtils.GetTextValue("Events.GoblinAmbush1"), Color.Red, false);
GoblinAmbush1.SetCustomStats(400, null, null); //I haven't set this one to save so players can farm the goblin scout and tattered cloth if they really feel the need to
GoblinAmbush1.SetCustomDrops(new List<int>() { ItemID.TatteredCloth }, new List<int>() { 1 }, true);
//SANDSPROG AMBUSH 1 - IN LONG SANDY ROOM LEFTMOST OF CORRUPTION TEMPLE
List<int> DualSandsprog1EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.MountedSandsprogMage>(), ModContent.NPCType<NPCs.Enemies.MountedSandsprog>() };
List<Vector2> DualSandsprog1EnemyLocations = new List<Vector2>() { new Vector2(2606, 806), new Vector2(2673, 817) };
ScriptedEvent DualSandsprogAmbush1 = new ScriptedEvent(new Vector2(2637, 807.5f), 9, DualSandsprog1EnemyTypeList, DualSandsprog1EnemyLocations, DustID.GemTopaz, true, true, false, LangUtils.GetTextValue("Events.DualSandsprogAmbush1"), Color.Red, false, null, null);
DualSandsprogAmbush1.SetCustomStats(400, null, null, 300);
DualSandsprogAmbush1.SetCustomDrops(new List<int>() { ItemID.SandBoots }, new List<int>() { 1 }, true);
//SHADOW MAGE AMBUSH - IN TUNNEL AFTER TWIN EOW FIGHT
List<int> ShadowMageAmbush1EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.HollowSoldier>(), ModContent.NPCType<NPCs.Enemies.ShadowMage>() };
List<Vector2> ShadowMageAmbush1EnemyLocations = new List<Vector2>() { new Vector2(4029, 1429), new Vector2(4074, 1399) };
ScriptedEvent ShadowMageAmbush1 = new ScriptedEvent(new Vector2(4060, 1418), 10, ShadowMageAmbush1EnemyTypeList, ShadowMageAmbush1EnemyLocations, DustID.CursedTorch, true, false, false, LangUtils.GetTextValue("Events.ShadowMageAmbush"), Color.Red, false, PreSkeletronCustomCondition, null);
ShadowMageAmbush1.SetCustomStats(700, 18, null); // Lowers the mage's HP, and raises the soldiers
//BRIDGE AMBUSH 1 - ON BRIDGE POST EOW
List<int> BridgeAmbush1EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.HollowWarrior>(), ModContent.NPCType<NPCs.Enemies.HollowSoldier>(), ModContent.NPCType<NPCs.Enemies.ManHunter>(), ModContent.NPCType<NPCs.Enemies.HollowSpearman>() };
List<Vector2> BridgeAmbush1EnemyLocations = new List<Vector2>() { new Vector2(4593, 858), new Vector2(4640, 858), new Vector2(4643f, 841), new Vector2(4588f, 858) };
ScriptedEvent BridgeAmbush1 = new ScriptedEvent(new Vector2(4615, 852), 6, BridgeAmbush1EnemyTypeList, BridgeAmbush1EnemyLocations, DustID.Cloud, true, false, false, LangUtils.GetTextValue("Events.BridgeAmbush1"), Color.Red, false, PostEoWCustomCondition, null);
//LOTHRIC AMBUSH 1 - IN ROOM BELOW ARTORIAS BOSS FIGHT ROOM, APPROACHING JUNGLE PYRAMID FROM FORGOTTEN CITY
List<int> LothricAmbush1EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.LothricKnight>(), ModContent.NPCType<NPCs.Enemies.LothricSpearKnight>() };
List<Vector2> LothricAmbush1EnemyLocations = new List<Vector2>() { new Vector2(5148, 1757), new Vector2(5197, 1757) };
ScriptedEvent LothricAmbush1 = new ScriptedEvent(new Vector2(5173, 1750), 6, LothricAmbush1EnemyTypeList, LothricAmbush1EnemyLocations, DustID.DungeonWater, true, false, false, LangUtils.GetTextValue("Events.LothricAmbush1"), Color.Red, false, PreMechCustomCondition, null);
LothricAmbush1.SetCustomStats(null, null, null, 500);
LothricAmbush1.SetCustomDrops(new List<int>() { ModContent.ItemType<Items.Potions.GreenBlossom>() }, new List<int>() { 5 }, true);
//LOTHRIC AMBUSH 2 - IN ROOM BEFORE TRIPLE ENCHANTED SWORDS, UNDER EARTH TEMPLE ENTRANCE
List<int> LothricAmbush2EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.LothricKnight>() };
List<Vector2> LothricAmbush2EnemyLocations = new List<Vector2>() { new Vector2(4596, 946) };
ScriptedEvent LothricAmbush2 = new ScriptedEvent(new Vector2(4574, 945), 12, LothricAmbush2EnemyTypeList, LothricAmbush2EnemyLocations, DustID.DungeonWater, true, false, false, LangUtils.GetTextValue("Events.LothricAmbush2"), Color.Red, false, PreMechCustomCondition, null);
LothricAmbush2.SetCustomStats(null, null, 70, 600); // Lower damage than normal, slightly more souls than normal
LothricAmbush2.SetCustomDrops(new List<int>() { ModContent.ItemType<Items.Potions.RadiantLifegem>() }, new List<int>() { 5 });
//GHOST OF THE DROWNED AMBUSH 1 - NEAR ENTRANCE OF CATACOMBS OF THE DROWNED
List<int> DrownedAmbush1EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.GhostOfTheDrowned>() };
List<Vector2> DrownedAmbush1EnemyLocations = new List<Vector2>() { new Vector2(4294, 778) };
ScriptedEvent DrownedAmbush1 = new ScriptedEvent(new Vector2(4318, 768), 11, DrownedAmbush1EnemyTypeList, DrownedAmbush1EnemyLocations, DustID.Water, true, false, false, LangUtils.GetTextValue("Events.BridgeAmbush1"), Color.Red);
DrownedAmbush1.SetCustomDrops(new List<int>() { ModContent.ItemType<Items.Potions.HealingElixir>() }, new List<int>() { 1 });
//GHOST OF THE DROWNED AMBUSH 1 - NEAR ENTRANCE OF CATACOMBS OF THE DROWNED
List<int> DrownedAmbush2EnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.GhostOfTheDrowned>() };
List<Vector2> DrownedAmbush2EnemyLocations = new List<Vector2>() { new Vector2(4117, 823) };
ScriptedEvent DrownedAmbush2 = new ScriptedEvent(new Vector2(4090, 828), 11, DrownedAmbush2EnemyTypeList, DrownedAmbush2EnemyLocations, DustID.Water, true, false, false, LangUtils.GetTextValue("Events.BridgeAmbush1"), Color.Red);
DrownedAmbush2.SetCustomDrops(new List<int>() { ModContent.ItemType<Items.Potions.BoostPotion>() }, new List<int>() { 2 });
//Sandstorm Elemental in the Solar Island
ScriptedEvent SandstormElementalEvent = new ScriptedEvent(new Vector2(2119, 248), 40, NPCID.SandElemental, 269, true, true, false, LangUtils.GetTextValue("Events.SandstormElementalEvent"), Color.Yellow);
//Ancient vision in the Shadow Temple
ScriptedEvent ShadowTempleEvent = new ScriptedEvent(new Vector2(1460, 1364), 25, NPCID.AncientCultistSquidhead, 228, true, true, false, LangUtils.GetTextValue("Events.ShadowTempleEvent"), Color.Yellow);
//Paladin in the Shadow Temple
ScriptedEvent ShadowTempleEvent2 = new ScriptedEvent(new Vector2(1734, 1297), 20, NPCID.Paladin, 133, true, true, false, LangUtils.GetTextValue("Events.ShadowTempleEvent2"), Color.Yellow);
//Mushroom Cavern AMBUSH
List<int> MushroomCavernEnemyTypeList = new List<int>() { ModContent.NPCType<NPCs.Enemies.SuperHardMode.TaurusKnight>(), ModContent.NPCType<NPCs.Enemies.SuperHardMode.Abysswalker>(), };
List<Vector2> MushroomCavernEnemyLocations = new List<Vector2>() { new Vector2(3690, 1545), new Vector2(3675, 1545) };
ScriptedEvent MushroomCavern = new ScriptedEvent(new Vector2(3690, 1535), 30, MushroomCavernEnemyTypeList, MushroomCavernEnemyLocations, DustID.Water, true, true, false, LangUtils.GetTextValue("Events.BridgeAmbush1"), Color.Red);
//Ashen Cavern Leftside - Ancient Demon Of The Abyss
ScriptedEvent AshCavernLeftside = new ScriptedEvent(new Vector2(1578, 1895), 25, ModContent.NPCType<NPCs.Enemies.SuperHardMode.AncientDemonOfTheAbyss>(), DustID.CursedTorch, true, true, false, LangUtils.GetTextValue("Events.IceGolemWyvern"), Color.Red);
//Ashen Cavern Rightside - Oolacile Knight
ScriptedEvent AshCavernRightside = new ScriptedEvent(new Vector2(2382, 1882), 25, ModContent.NPCType<NPCs.Enemies.SuperHardMode.OolacileKnight>(), DustID.CursedTorch, true, true, false, LangUtils.GetTextValue("Events.IceGolemWyvern"), Color.Red);
//Molten Sky Temple
ScriptedEvent MoltenSkyTempleEvent = new ScriptedEvent(new Vector2(1040, 1865), 25, NPCID.CultistDragonHead, 15, true, true, false, LangUtils.GetTextValue("Events.IceGolemWyvern"), Color.Blue);
MoltenSkyTempleEvent.SetCustomStats(25000, null, null, 10000);
ScriptedEvent HellkiteDragonEvent = new ScriptedEvent(new Vector2(4282, 405), 200, ModContent.NPCType<NPCs.Bosses.SuperHardMode.HellkiteDragon.HellkiteDragonHead>(), DustID.OrangeTorch, true, true, true, LangUtils.GetTextValue("Events.HellkiteDragon"), new Color(175, 75, 255), false, SuperHardModeCustomCondition, SetNightCustomAction);
ScriptedEvent DungeonGuardianEvent = new ScriptedEvent(new Vector2(4228, 1800), 20, NPCID.DungeonGuardian, DustID.WhiteTorch, false, true, false, "default", new Color(175, 75, 255), false, () => !NPC.downedBoss3);
ScriptedEvent KingSlime2Event = new ScriptedEvent(new Vector2(4749, 639), 25, NPCID.KingSlime, DustID.MagicMirror, true, true, false, LangUtils.GetTextValue("Events.KingSlime"), Color.Blue, false, RemixMapCondition);
ScriptedEvent JungleMimicEvent = new ScriptedEvent(new Vector2(5781, 1525), 25, NPCID.BigMimicJungle, 107, true, false, true, LangUtils.GetTextValue("Events.IceGolemWyvern"), Color.Lime, false, RemixMapCondition, SetNightCustomAction);
ScriptedEvent BloodBossEvent1 = new ScriptedEvent(new Vector2(2914, 526), 25, NPCID.BloodEelHead, 60, true, true, false, LangUtils.GetTextValue("Events.BloodBossEvent1"), Color.Red, false, RemixMapCondition, SetNightCustomAction);
BloodBossEvent1.SetCustomDrops(new List<int>() { ItemID.GreaterHealingPotion, ItemID.WrathPotion, ItemID.DripplerFlail }, new List<int>() { 5, 2, 1 });
BloodBossEvent1.SetCustomStats(null, null, null, 7500);
ScriptedEvent BloodBossEvent2 = new ScriptedEvent(new Vector2(2765, 620), 25, NPCID.GoblinShark, 60, true, true, false, LangUtils.GetTextValue("Events.GoblinShark"), Color.Red, false, RemixMapCondition, SetNightCustomAction);
BloodBossEvent2.SetCustomDrops(new List<int>() { ItemID.GreaterHealingPotion, ItemID.RagePotion, ItemID.SharpTears }, new List<int>() { 5, 2, 1 });
BloodBossEvent2.SetCustomStats(null, null, null, 7500);
ScriptedEvent BloodBossEvent3 = new ScriptedEvent(new Vector2(2893, 610), 30, NPCID.BloodNautilus, 60, true, true, false, LangUtils.GetTextValue("Events.BloodBossEvent3"), Color.Red, false, RemixMapCondition, SetBloodMoonCustomAction);
BloodBossEvent3.SetCustomDrops(new List<int>() { ItemID.SuperHealingPotion, ItemID.LifeforcePotion, ItemID.BloodHamaxe, ItemID.MagicQuiver, ItemID.LavaCharm }, new List<int>() { 6, 3, 1, 1, 1, 1});
BloodBossEvent3.SetCustomStats(null, null, null, 12000);
ScriptedEvent CatacombsEvent = new ScriptedEvent(new Vector2(3181, 1334), 25, ModContent.NPCType<NPCs.Enemies.SuperHardMode.SlograII>(), DustID.Torch, true, true, false, LangUtils.GetTextValue("Events.IceGolemWyvern"), Color.Red, false, RemixMapCondition);
CatacombsEvent.SetCustomStats(9000, null, null, null);
ScriptedEvent FoundryEvent = new ScriptedEvent(new Vector2(5229, 1254), 25, ModContent.NPCType<NPCs.Enemies.SuperHardMode.OolacileKnight>(), DustID.CursedTorch, true, true, false, LangUtils.GetTextValue("Events.IceGolemWyvern"), Color.Orange, false, RemixMapCondition);
ScriptedEvent FrozenCathedralEvent = new ScriptedEvent(new Vector2(7635, 1735), 65, NPCID.IceQueen, 67, true, true, false, LangUtils.GetTextValue("Events.FrozenCathedralEvent"), Color.Cyan, false, RemixMapCondition, SetNightCustomAction);
CatacombsEvent.SetCustomStats(null, null, null, 10000);
ScriptedEvent WyvernPrisonEvent = new ScriptedEvent(new Vector2(6408, 385), 32, ModContent.NPCType<NPCs.Enemies.MarilithSpiritTwin>(), DustID.Shadowflame, true, true, false, LangUtils.GetTextValue("Events.WyvernPrisonEvent"), Color.Purple, false, RemixMapCondition, SetNightCustomAction);
List<int> FrozenCathedralEvent2EnemyTypeList = new List<int>() { NPCID.MourningWood, NPCID.Everscream };
List<Vector2> FrozenCathedralEvent2EnemyLocations = new List<Vector2>() { new Vector2(7189, 1650), new Vector2(7164, 1650) };
ScriptedEvent FrozenCathedralEvent2 = new ScriptedEvent(new Vector2(7177, 1650), 35, FrozenCathedralEvent2EnemyTypeList, FrozenCathedralEvent2EnemyLocations, 6, true, true, false, LangUtils.GetTextValue("Events.IceGolemWyvern"), Color.Orange, false, RemixMapCondition, SetNightCustomAction); //
ScriptedEvent GoblinSharkTropicalIsland = new ScriptedEvent(new Vector2(7874, 390), 40, NPCID.GoblinShark, DustID.CrimsonSpray, true, false, true, LangUtils.GetTextValue("Events.GoblinShark"), Color.Red, false, OnlyAdventureMapCondition, SetNightCustomAction);
GoblinSharkTropicalIsland.SetCustomDrops(new List<int>() { ItemID.SuperHealingPotion, ItemID.RagePotion, ItemID.SharpTears }, new List<int>() { 5, 3, 1 });
GoblinSharkTropicalIsland.SetCustomStats(5000, null, null, 15000);
ScriptedEvent IceGolemIsland = new ScriptedEvent(new Vector2(7874, 390), 40, NPCID.IceGolem, 67, true, false, true, LangUtils.GetTextValue("Events.IceGolemWyvern"), Color.Blue, false, RemixMapCondition);
IceGolemIsland.SetCustomDrops(new List<int>() { ItemID.SuperHealingPotion, ItemID.RagePotion}, new List<int>() { 5, 3 });
IceGolemIsland.SetCustomStats(null, null, null, 10000);
//Every enum and ScriptedEvent has to get paired up here
ScriptedEventDict = new Dictionary<ScriptedEventType, ScriptedEvent>(){
{ScriptedEventType.Pinwheel,Pinwheel},
{ScriptedEventType.LothricKnightCatacombs,LothricKnightCatacombs},
{ScriptedEventType.FireLurkerAmbush1, FireLurkerAmbush1},
{ScriptedEventType.Death, Death},
{ScriptedEventType.BlackKnightSHMDungeon, BlackKnightSHMDungeon},
{ScriptedEventType.RedKnightOolicileForest, RedKnightOolicileForest},
{ScriptedEventType.QueenSlimeEvent, QueenSlimeEvent},
{ScriptedEventType.BlackKnightHallowed, BlackKnightHallowed},
{ScriptedEventType.GoblinSharkTropicalIsland, GoblinSharkTropicalIsland},
{ScriptedEventType.GreatRedKnightInDesert, GreatRedKnightInDesert},
{ScriptedEventType.AncestralSpirit, AncestralSpiritEvent},
{ScriptedEventType.OldManEvent, OldManEvent},
{ScriptedEventType.SkeletronHidden, SkeletronHiddenEvent},
{ScriptedEventType.AlienAmbush, AlienAmbush},
{ScriptedEventType.EoC, EoCEvent},
{ScriptedEventType.EoW1, EoW1Event},
{ScriptedEventType.AncientDemon, AncientDemon},
{ScriptedEventType.LitchKing, LitchKing},
{ScriptedEventType.TheHunter, TheHunter},
{ScriptedEventType.TheRage, TheRage},
{ScriptedEventType.AODE, AODE},
{ScriptedEventType.GoblinWizardWMF, GoblinWizardWMF},
{ScriptedEventType.GoblinWizardClouds, GoblinWizardClouds},
{ScriptedEventType.Golem2, Golem2},
{ScriptedEventType.IceGolemEvent, IceGolemEvent},
{ScriptedEventType.KingSlimeEvent, KingSlimeEvent},
{ScriptedEventType.HeroofLumeliaFight, HeroofLumeliaFight},
{ScriptedEventType.FireLurkerPain, FireLurkerPain},
{ScriptedEventType.RedKnightPain, RedKnightPain},
{ScriptedEventType.RedKnightTwinMountain, RedKnightTwinMountain},
{ScriptedEventType.JungleWyvernFight, JungleWyvernEvent},
{ScriptedEventType.SeathFight, SeathEvent},
{ScriptedEventType.WyvernMageFight, WyvernMageEvent},
{ScriptedEventType.SlograAndGaibonFight, SlograAndGaibonEvent},
{ScriptedEventType.SerrisFight, SerrisEvent},
{ScriptedEventType.MarilithFight, MarilithEvent},
{ScriptedEventType.PrimeFight, PrimeEvent},
{ScriptedEventType.KrakenFight, KrakenEvent},
{ScriptedEventType.AbyssPortal, AbyssPortalEvent},
{ScriptedEventType.GwynTombVision, GwynsTombEvent},
{ScriptedEventType.GwynFight, GwynEvent},
{ScriptedEventType.AbysmalOolacileSorcererFight, AbysmalOolacileSorcererEvent},
{ScriptedEventType.WitchkingFight, WitchkingEvent},
{ScriptedEventType.ChaosFight, ChaosEvent},
{ScriptedEventType.WyvernMageShadowFight, WyvernMageShadowEvent},
{ScriptedEventType.BlightFight, BlightEvent},
{ScriptedEventType.DarkCloudPyramidFight, DarkCloudEvent},
{ScriptedEventType.ArtoriasFight, ArtoriasEvent},
{ScriptedEventType.BlackKnightCity, BlackKnightCity},
//{ScriptedEventType.ExampleHarpySwarm, ExampleHarpySwarm},
//{ScriptedEventType.ExampleNoNPCScriptEvent, ExampleNoNPCScriptEvent},
//{ScriptedEventType.Frogpocalypse2_TheFroggening, FrogpocalypseEvent}
{ScriptedEventType.SpawnUndeadMerchant, SpawnUndeadMerchant },
{ScriptedEventType.SpawnGoblin, SpawnGoblin },
{ScriptedEventType.AttraidiesTheSorrowEvent, AttraidiesTheSorrowEvent},
{ScriptedEventType.TwinEoWFight, TwinEoWFight},
{ScriptedEventType.DunledingAmbush, DunledingAmbush},
{ScriptedEventType.BoulderfallEvent1, BoulderfallEvent1},
{ScriptedEventType.BoulderfallEvent2, BoulderfallEvent2},
{ScriptedEventType.BoulderfallEvent3, BoulderfallEvent3},
{ScriptedEventType.LeonhardPhase1Event, LeonhardPhase1Event},
{ScriptedEventType.HollowAmbush1, HollowAmbush1},
{ScriptedEventType.GoblinAmbush1, GoblinAmbush1},
{ScriptedEventType.ShadowMageAmbush1, ShadowMageAmbush1},
{ScriptedEventType.BridgeAmbush1, BridgeAmbush1},
{ScriptedEventType.LothricAmbush1, LothricAmbush1},
{ScriptedEventType.LothricAmbush2, LothricAmbush2},
{ScriptedEventType.FirebombHollowAmbush, FirebombHollowAmbush},
{ScriptedEventType.SpawnMechanic, SpawnMechanic},
{ScriptedEventType.SpawnWizard, SpawnWizard},
{ScriptedEventType.HellkiteDragonEvent, HellkiteDragonEvent},
{ScriptedEventType.EoL, EoL},
{ScriptedEventType.DungeonGuardian, DungeonGuardianEvent },
{ScriptedEventType.DualSandsprogAmbush1, DualSandsprogAmbush1 },
{ScriptedEventType.DrownedAmbush1, DrownedAmbush1 },
{ScriptedEventType.DrownedAmbush2, DrownedAmbush2 },
{ScriptedEventType.MushroomCavern, MushroomCavern },
{ScriptedEventType.AshCavernLeftside, AshCavernLeftside },
{ScriptedEventType.AshCavernRightside, AshCavernRightside },
{ScriptedEventType.ShadowTempleEvent, ShadowTempleEvent },
{ScriptedEventType.ShadowTempleEvent2, ShadowTempleEvent2 },
{ScriptedEventType.MoltenSkyTempleEvent, MoltenSkyTempleEvent },
{ScriptedEventType.SandstormElementalEvent, SandstormElementalEvent },
{ScriptedEventType.JungleMimicEvent, JungleMimicEvent },
{ScriptedEventType.BloodBossEvent1, BloodBossEvent1 },
{ScriptedEventType.BloodBossEvent2, BloodBossEvent2 },
{ScriptedEventType.BloodBossEvent3, BloodBossEvent3 },
{ScriptedEventType.CatacombsEvent, CatacombsEvent },
{ScriptedEventType.FrozenCathedralEvent, FrozenCathedralEvent },
{ScriptedEventType.FoundryEvent, FoundryEvent },
{ScriptedEventType.Lunatic, Lunatic },
{ScriptedEventType.KingSlime2Event, KingSlime2Event },
{ScriptedEventType.IceGolemIsland, IceGolemIsland },
{ScriptedEventType.AncestralSpiritEvent2, AncestralSpiritEvent2 },
{ScriptedEventType.FrozenCathedralEvent2, FrozenCathedralEvent2 },
{ScriptedEventType.WyvernPrisonEvent, WyvernPrisonEvent },
};
ScriptedEventValues = new Dictionary<ScriptedEventType, bool>();
foreach (ScriptedEventType currentEvent in ScriptedEventDict.Keys)
{
ScriptedEventValues.Add(currentEvent, false);
}
//Add everything to InactiveEvents to start fresh.
//If the player is NOT loading a fresh world, then this will get wiped later and re-loaded with only the appropriate events.
EnabledEvents = new List<ScriptedEvent>();
foreach (KeyValuePair<ScriptedEventType, ScriptedEvent> eventValuePair in ScriptedEventDict)
{
EnabledEvents.Add(eventValuePair.Value);
}
QueuedEvents = new List<ScriptedEvent>();
RunningEvents = new List<ScriptedEvent>();
DisabledEvents = new List<ScriptedEvent>();
NetworkEvents = new List<NetworkEvent>();
}
#region customconditions
//You can make custom conditions like this: Just write a function that takes no arguments and returns a bool
//When it's time to run the event this function will be executed, and if false the event will not run
//This condition is an example. If it's day and in the morning, it returns 'true'. If not, it returns false.
public static bool ExampleCondition()
{
if ((Main.dayTime) && (Main.time < 24000))
{
return true;
}
else
{
return false;
}
}
public static bool LumeliaCustomCondition()
{
if (tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<NPCs.Bosses.TheSorrow>())) && !tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<NPCs.Bosses.HeroofLumelia>())))
{
return true;
}
else
{
return false;
}
}
//COMMON CONDITIONS
public static bool NormalModeCustomCondition()
{
return !Main.hardMode;
}
public static bool PreEoCCustomCondition()
{
return !NPC.downedBoss1;
}
public static bool PreEoWCustomCondition()
{
if (NPC.downedBoss2 || NPC.AnyNPCs(NPCID.EaterofWorldsHead) || NPC.AnyNPCs(NPCID.EaterofWorldsBody) || NPC.AnyNPCs(NPCID.EaterofWorldsTail))
{
return false;
}
else
{
return true;
}
}
public static bool PostEoWCustomCondition()
{
return NPC.downedBoss2;
}
public static bool PreSkeletronCustomCondition()
{
return !NPC.downedBoss3;
}
public static bool PreMechCustomCondition()
{
return !NPC.downedMechBossAny;
}
public static bool NightCustomCondition()
{
return !Main.dayTime;
}
public static bool HardModeCustomCondition()
{
return Main.hardMode;
}
//This condition returns true if the world is in superhardmode
public static bool SuperHardModeCustomCondition()
{
return tsorcRevampWorld.SuperHardMode;
}
public static bool RemixMapCondition()
{
return tsorcRevampWorld.RemixMap;
}
public static bool OnlyAdventureMapCondition()
{
return tsorcRevampWorld.OnlyAdventureMap;
}
public static bool MarilithCustomCondition()
{
if (tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<FireFiendMarilith>())) || NPC.AnyNPCs(ModContent.NPCType<FireFiendMarilith>()) || NPC.AnyNPCs(ModContent.NPCType<MarilithIntro>()))
{
return false;
}
else
{
return true;
}
}
public static bool PrimeCustomCondition()
{
if (tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<NPCs.Bosses.PrimeV2.TheMachine>())) || NPC.AnyNPCs(ModContent.NPCType<NPCs.Bosses.PrimeV2.TheMachine>()) || NPC.AnyNPCs(ModContent.NPCType<NPCs.Bosses.PrimeV2.PrimeIntro>()))
{
return false;
}
else
{
return true;
}
}
public static bool GwynsTombVisionCustomCondition()
{
if (tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<NPCs.Bosses.SuperHardMode.Gwyn>())) || NPC.AnyNPCs(ModContent.NPCType<NPCs.Special.GwynBossVision>()))
{
return false;
}
else
{
return true;
}
}
public static bool AbyssPortalCustomCondition()
{
if (tsorcRevampWorld.SuperHardMode && !NPC.AnyNPCs(ModContent.NPCType<NPCs.Special.AbyssPortal>()) && !NPC.AnyNPCs(ModContent.NPCType<NPCs.Bosses.Okiku.FinalForm.Attraidies>()))
{
return true;
}
else
{
return false;
}
}
public static bool GolemDownedCustomCondition()
{
return NPC.downedGolemBoss;
}
public static bool EoLDownedCondition()
{
return !NPC.downedEmpressOfLight;
}
public static bool CultistDownedCondition()
{
return !NPC.downedAncientCultist;
}
//This condition returns true if the player is in The Abyss
public static bool TheAbyssCustomCondition()
{
if (tsorcRevampWorld.SuperHardMode && Main.bloodMoon)
{
return true;
}
else
{
return false;
}
}
public static bool TwinEoWCustomCondition()
{
if (NPC.AnyNPCs(NPCID.EaterofWorldsHead) || NPC.AnyNPCs(NPCID.EaterofWorldsBody) || NPC.AnyNPCs(NPCID.EaterofWorldsTail))
{
return false;
}
else
{
return true;
}
}
public static bool UndeadMerchantCondition()
{
return !NPC.AnyNPCs(ModContent.NPCType<NPCs.Friendly.UndeadMerchant>());
}
public static bool TinkererCondition()
{
return !NPC.AnyNPCs(NPCID.GoblinTinkerer);
}
public static bool SlograGaibonCondition()
{
if (NPC.AnyNPCs(ModContent.NPCType<NPCs.Bosses.Slogra>()) || (NPC.AnyNPCs(ModContent.NPCType<NPCs.Bosses.Gaibon>())) || (tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<NPCs.Bosses.Slogra>())) && tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<NPCs.Bosses.Gaibon>()))))
{
return false;
}
return true;
}
public static bool SerrisCustomCondition()
{
if (tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<NPCs.Bosses.Serris.SerrisX>())) || NPC.AnyNPCs(ModContent.NPCType<NPCs.Bosses.Serris.SerrisHead>()) || NPC.AnyNPCs(ModContent.NPCType<NPCs.Bosses.Serris.SerrisX>()))
{
return false;
}
else
{
return true;
}
}
public static bool AttraidiesTheSorrowCondition()
{
if (!tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<NPCs.Bosses.TheSorrow>())) && !NPC.AnyNPCs(ModContent.NPCType<NPCs.Bosses.TheSorrow>()))
{
return true;
}
else
{
return false;
}
}
public static bool LeonhardPhase1Undefeated()
{
if (!tsorcRevampWorld.NewSlain.ContainsKey(new NPCDefinition(ModContent.NPCType<NPCs.Special.LeonhardPhase1>())))
{
return true;
}
else
{
return false;
}
}
public static bool MechanicCondition()
{
return !NPC.AnyNPCs(NPCID.Mechanic);
}
public static bool WizardCondition()
{
return !NPC.AnyNPCs(NPCID.Wizard);
}
#endregion
#region customactions
//You can make custom actions like this, and pass them as arguments to the event!
public static EventActionStatus ExampleCustomAction(ScriptedEvent thisEvent)
{
for (int i = 0; i < Main.maxPlayers; i++)
{
Dust.NewDust(Main.player[i].position, 30, 30, DustID.GreenFairy, Main.rand.Next(-5, 5), Main.rand.Next(-5, 5), 255);
}
if (thisEvent.eventTimer > 900)
{
//UsefulFunctions.BroadcastText("The example scripted event ends...", Color.Green);
return EventActionStatus.CompletedEvent;
}
return EventActionStatus.Continue;
}