forked from mikemayhemdev/DownfallSTS
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdownfallMod.java
More file actions
1780 lines (1498 loc) · 86.4 KB
/
downfallMod.java
File metadata and controls
1780 lines (1498 loc) · 86.4 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
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
package downfall;
/*
This package should contain all content additions strictly related to the
Evil Mode alternate gameplay run. This includes Bosses, Events,
Event Override patches, and other things that only appear during Evil Runs.
*/
import automaton.AutomatonChar;
import automaton.AutomatonMod;
import automaton.EasyInfoDisplayPanel;
import automaton.SuperTip;
import automaton.cardmods.EncodeMod;
import automaton.cards.Defend;
import automaton.cards.Strike;
import automaton.potions.BurnAndBuffPotion;
import automaton.relics.*;
import automaton.util.*;
import basemod.BaseMod;
import basemod.ModLabeledToggleButton;
import basemod.ModPanel;
import basemod.Pair;
import basemod.abstracts.CustomUnlockBundle;
import basemod.eventUtil.AddEventParams;
import basemod.eventUtil.EventUtils;
import basemod.helpers.CardModifierManager;
import basemod.helpers.RelicType;
import basemod.interfaces.*;
import champ.ChampChar;
import champ.ChampMod;
import champ.cards.ModFinisher;
import champ.potions.CounterstrikePotion;
import champ.powers.LastStandModPower;
import champ.relics.ChampStancesModRelic;
import champ.util.TechniqueMod;
import charbosses.actions.util.CharBossMonsterGroup;
import charbosses.bosses.AbstractCharBoss;
import charbosses.bosses.Defect.CharBossDefect;
import charbosses.bosses.Hermit.CharBossHermit;
import charbosses.bosses.Ironclad.CharBossIronclad;
import charbosses.bosses.Merchant.CharBossMerchant;
import charbosses.bosses.Silent.CharBossSilent;
import charbosses.bosses.Watcher.CharBossWatcher;
import collector.CollectorChar;
import collector.CollectorMod;
import collector.potions.TempHPPotion;
import downfall.cards.curses.Sapped;
import collector.util.CollectibleCardReward;
import collector.util.EssenceReward;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.evacipated.cardcrawl.mod.stslib.Keyword;
import com.evacipated.cardcrawl.mod.widepotions.WidePotionsMod;
import com.evacipated.cardcrawl.modthespire.Loader;
import com.evacipated.cardcrawl.modthespire.lib.SpireConfig;
import com.evacipated.cardcrawl.modthespire.lib.SpireEnum;
import com.evacipated.cardcrawl.modthespire.lib.SpireInitializer;
import com.google.gson.Gson;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.MakeTempCardInDiscardAction;
import com.megacrit.cardcrawl.actions.common.MakeTempCardInHandAction;
import com.megacrit.cardcrawl.blights.VoidEssence;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.cards.DamageInfo;
import com.megacrit.cardcrawl.cards.curses.Pride;
import com.megacrit.cardcrawl.cards.status.Slimed;
import com.megacrit.cardcrawl.cards.tempCards.Shiv;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.core.Settings;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.events.beyond.*;
import com.megacrit.cardcrawl.events.city.*;
import com.megacrit.cardcrawl.events.exordium.*;
import com.megacrit.cardcrawl.events.shrines.FaceTrader;
import com.megacrit.cardcrawl.events.shrines.*;
import com.megacrit.cardcrawl.helpers.*;
import com.megacrit.cardcrawl.localization.*;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.monsters.MonsterGroup;
import com.megacrit.cardcrawl.relics.AbstractRelic;
import com.megacrit.cardcrawl.relics.GoldenIdol;
import com.megacrit.cardcrawl.relics.MedicalKit;
import com.megacrit.cardcrawl.relics.VelvetChoker;
import com.megacrit.cardcrawl.rewards.RewardSave;
import com.megacrit.cardcrawl.rooms.AbstractRoom;
import com.megacrit.cardcrawl.screens.custom.CustomMod;
import com.megacrit.cardcrawl.unlock.AbstractUnlock;
import com.megacrit.cardcrawl.unlock.UnlockTracker;
import com.megacrit.cardcrawl.vfx.UpgradeShineEffect;
import com.megacrit.cardcrawl.vfx.cardManip.PurgeCardEffect;
import com.megacrit.cardcrawl.vfx.cardManip.ShowCardAndObtainEffect;
import com.megacrit.cardcrawl.vfx.cardManip.ShowCardBrieflyEffect;
import downfall.actions.MessageCaller;
import downfall.cards.KnowingSkullWish;
import downfall.cards.curses.*;
import downfall.dailymods.*;
import downfall.events.*;
import downfall.events.shrines_evil.DuplicatorEvil;
import downfall.events.shrines_evil.PurificationShrineEvil;
import downfall.events.shrines_evil.TransmogrifierEvil;
import downfall.events.shrines_evil.UpgradeShrineEvil;
import downfall.monsters.*;
import downfall.monsters.gauntletbosses.*;
import downfall.patches.DailyModeEvilPatch;
import downfall.patches.EvilModeCharacterSelect;
import downfall.patches.RewardItemTypeEnumPatch;
import downfall.patches.ui.campfire.AddBustKeyButtonPatches;
import downfall.patches.ui.topPanel.GoldToSoulPatches;
import downfall.potions.CursedFountainPotion;
import downfall.relics.KnowingSkull;
import downfall.relics.*;
import downfall.util.*;
import expansioncontent.cardmods.PropertiesMod;
import expansioncontent.expansionContentMod;
import expansioncontent.patches.CenterGridCardSelectScreen;
import expansioncontent.potions.BossPotion;
import gremlin.GremlinMod;
import gremlin.cards.Wizardry;
import gremlin.characters.GremlinCharacter;
import gremlin.potions.WizPotion;
import gremlin.relics.WizardHat;
import gremlin.relics.WizardStaff;
import guardian.GuardianMod;
import guardian.cards.ExploitGems;
import guardian.characters.GuardianCharacter;
import guardian.potions.BlockOnCardUsePotion;
import guardian.relics.PickAxe;
import guardian.rewards.GemReward;
import guardian.rewards.GemRewardAllRarities;
import hermit.HermitMod;
import hermit.characters.hermit;
import slimebound.SlimeboundMod;
import slimebound.characters.SlimeboundCharacter;
import slimebound.potions.ThreeZeroPotion;
import sneckomod.SneckoMod;
import sneckomod.TheSnecko;
import sneckomod.cards.unknowns.*;
import sneckomod.potions.MuddlingPotion;
import sneckomod.util.ColorfulCardReward;
import sneckomod.util.UpgradedUnknownReward;
import theHexaghost.HexaMod;
import theHexaghost.TheHexaghost;
import theHexaghost.potions.SoulburnPotion;
import theHexaghost.util.SealSealReward;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.charset.StandardCharsets;
import java.util.*;
import static downfall.patches.EvilModeCharacterSelect.evilMode;
import static reskinContent.reskinContent.unlockAllReskin;
@SpireInitializer
public class downfallMod implements OnPlayerDamagedSubscriber, OnStartBattleSubscriber, PostDrawSubscriber, PostDungeonInitializeSubscriber, EditStringsSubscriber, EditKeywordsSubscriber, AddCustomModeModsSubscriber, PostInitializeSubscriber, EditRelicsSubscriber, EditCardsSubscriber, PostUpdateSubscriber, StartGameSubscriber, StartActSubscriber, AddAudioSubscriber, RenderSubscriber, PostDeathSubscriber {
public static final String modID = "downfall";
public static final boolean STEAM_MODE = false;
public static boolean neowtextoverride = false;
public static boolean choosingBossRelic = false;
public static boolean choosingRemoveCard = false;
public static boolean choosingUpgradeCard = false;
public static boolean choosingTransformCard = false;
public static boolean overrideBossDifficulty = false;
public static boolean playedBossCardThisTurn = false; // TODO: remove this and fix related code (abs expansion card)
public static boolean replaceMenuColor = true;
public static boolean tempAscensionHack = false;
public static int tempAscensionOriginalValue = 0;
//Config Menu Stuff
private ModPanel settingsPanel;
public static Properties configDefault = new Properties();
public static boolean contentSharing_relics = true;
public static boolean contentSharing_potions = true;
public static boolean contentSharing_events = false;
public static boolean contentSharing_colorlessCards = false;
public static boolean contentSharing_curses = true;
public static boolean crossoverCharacters = true;
public static boolean crossoverModCharacters = true;
public static boolean unlockEverything = false;
public static boolean noMusic = false;
public static boolean normalMapLayout = false;
public static boolean sneckoNoModCharacters = false;
public static boolean useIconsForAppliedProperties = false;
public static ArrayList<AbstractRelic> shareableRelics = new ArrayList<>();
public static final String PROP_RELIC_SHARING = "contentSharing_relics";
public static final String PROP_POTION_SHARING = "contentSharing_potions";
public static final String PROP_EVENT_SHARING = "contentSharing_events";
public static final String PROP_CARD_SHARING = "contentSharing_colorlessCards";
public static final String PROP_CURSE_SHARING = "contentSharing_curses";
public static final String PROP_CHAR_CROSSOVER = "crossover_characters";
public static final String PROP_MOD_CHAR_CROSSOVER = "crossover_mod_characters";
public static final String PROP_UNLOCK_ALL = "unlockEverything";
public static final String PROP_NORMAL_MAP = "normalMapLayout";
public static final String PROP_SNECKO_MODLESS = "sneckoNoModCharacters";
public static final String PROP_NO_MUSIC = "disableMusicOverride";
public static final String PROP_ICONS_FOR_APPLIED_PROPERTIES = "useIconsForAppliedProperties";
public static String Act1BossFaced = "";
public static String Act2BossFaced = "";
public static String Act3BossFaced = "";
public static boolean[] unseenTutorials = new boolean[]{true, // Hermit
true, // Guardian
true, // Hexa
true, // Charboss Info
true, // COLLECTOR info. Wow, it's hard to believe how much has gone on since the last tutorial was made
true // THE T&T ADVERTISEMENT!!! ADVERTISING!! To be fair we worked really hard both on T&T and this project
};
public static Properties tutorialSaves = new Properties();
public static Map<String, String> keywords_and_proper_names = new HashMap<>();
@SpireEnum
public static AbstractCard.CardTags CHARBOSS_ATTACK;
@SpireEnum
public static AbstractCard.CardTags CHARBOSS_SETUP;
@SpireEnum
public static AbstractCard.CardTags DOWNFALL_CURSE;
public static final boolean EXPERIMENTAL_FLIP = false;
public static Settings.GameLanguage[] SupportedLanguages = {
// Insert other languages here
// DONT FORGET TO TOGGLE AT reskinContent.getLanguageString() TOO
Settings.GameLanguage.ENG, Settings.GameLanguage.ZHS,
Settings.GameLanguage.JPN,
Settings.GameLanguage.KOR,
Settings.GameLanguage.FRA,
// Settings.GameLanguage.ZHT,
Settings.GameLanguage.RUS,
// Settings.GameLanguage.PTB
};
public static ReplaceData[] wordReplacements;
public static SpireConfig bruhData = null;
private static ArrayList<AbstractCard> downfallCurses = new ArrayList<>();
public static CustomMod evilWithinSingleton = null;
public static Texture soulsImage;
public downfallMod() {
BaseMod.subscribe(this);
configDefault.setProperty(PROP_CURSE_SHARING, "FALSE");
configDefault.setProperty(PROP_RELIC_SHARING, "TRUE");
configDefault.setProperty(PROP_EVENT_SHARING, "TRUE");
configDefault.setProperty(PROP_POTION_SHARING, "TRUE");
configDefault.setProperty(PROP_CARD_SHARING, "TRUE");
configDefault.setProperty(PROP_CHAR_CROSSOVER, "FALSE");
configDefault.setProperty(PROP_NORMAL_MAP, "TRUE");
configDefault.setProperty(PROP_UNLOCK_ALL, "FALSE");
configDefault.setProperty(PROP_NO_MUSIC, "FALSE");
configDefault.setProperty(PROP_ICONS_FOR_APPLIED_PROPERTIES, "FALSE");
loadConfigData();
}
public static void initialize() {
new downfallMod();
try {
for (int i = 0; i < unseenTutorials.length; i++) {
tutorialSaves.setProperty("activeTutorials" + i, "true");
}
SpireConfig config = new SpireConfig("downfall", "TutorialsViewed", tutorialSaves);
for (int j = 0; j < unseenTutorials.length; j++) {
unseenTutorials[j] = config.getBool("activeTutorials" + j);
}
} catch (IOException e) {
e.printStackTrace();
}
}
public static void saveTutorialsSeen() throws IOException {
SpireConfig config = new SpireConfig("downfall", "TutorialsViewed");
int i;
for (i = 0; i < unseenTutorials.length; i++) {
config.setBool("activeTutorials" + i, unseenTutorials[i]);
}
config.save();
}
public static final String makeID(String id) {
return modID + ":" + id;
}
public static String assetPath(String path) {
return "downfallResources/" + path;
}
public static String assetPath(String path, otherPackagePaths otherPath) {
switch (otherPath) {
case PACKAGE_GUARDIAN:
return "guardianResources/" + path;
case PACKAGE_SLIME:
return "slimeboundResources/" + path;
case PACKAGE_SNECKO:
return "sneckomodResources/" + path;
case PACKAGE_HEXAGHOST:
return "hexamodResources/" + path;
case PACKAGE_EXPANSION:
return "expansioncontentResources/" + path;
case PACKAGE_CHAMP:
return "champResources/" + path;
case PACKAGE_AUTOMATON:
return "bronzeResources/" + path;
case PACKAGE_GREMLIN:
return "gremlinResources/" + path;
case PACKAGE_HERMIT:
return "hermitResources/" + path;
case PACKAGE_COLLECTOR:
return "collectorResources/" + path;
}
return "downfallResources/" + path;
}
public static void saveData() {
try {
if (bruhData == null) {
bruhData = new SpireConfig("downfall", "TrapSaveData");
}
SpireConfig config = new SpireConfig("downfall", "downfallSaveData", configDefault);
config.setBool(PROP_CURSE_SHARING, contentSharing_curses);
config.setBool(PROP_RELIC_SHARING, contentSharing_relics);
config.setBool(PROP_EVENT_SHARING, contentSharing_events);
config.setBool(PROP_POTION_SHARING, contentSharing_potions);
config.setBool(PROP_CARD_SHARING, contentSharing_colorlessCards);
config.setBool(PROP_CHAR_CROSSOVER, crossoverCharacters);
config.setBool(PROP_MOD_CHAR_CROSSOVER, crossoverModCharacters);
config.setBool(PROP_NORMAL_MAP, normalMapLayout);
config.setBool(PROP_UNLOCK_ALL, unlockEverything);
config.setBool(PROP_SNECKO_MODLESS, sneckoNoModCharacters);
config.setBool(PROP_NO_MUSIC, noMusic);
config.setBool(PROP_ICONS_FOR_APPLIED_PROPERTIES, useIconsForAppliedProperties);
config.save();
GoldenIdol_Evil.save();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void loadOtherData() {
try {
bruhData = new SpireConfig("downfall", "TrapSaveData");
GoldenIdol_Evil.load();
} catch (IOException e) {
e.printStackTrace();
}
}
private String makeLocalizationPath(Settings.GameLanguage language, String filename) {
String langPath = getLangString();
return assetPath("localization/" + langPath + "/" + filename + ".json");
}
private String makeLocalizationPath(Settings.GameLanguage language, String filename, otherPackagePaths otherPackage) {
String langPath = getLangString();
return assetPath("localization/" + langPath + "/" + filename + ".json", otherPackage);
}
private String getLangString() {
for (Settings.GameLanguage lang : SupportedLanguages) {
if (lang.equals(Settings.language)) {
return Settings.language.name().toLowerCase();
}
}
if (Settings.language.equals(Settings.GameLanguage.ZHT)) {
return "zhs";
}
return "eng";
}
private void loadLocalization(Settings.GameLanguage language, Class<?> stringType) {
if (stringType != TutorialStrings.class) {
//SlimeboundMod.logger.info("loading loc:" + language + "downfall" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName()));
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_EXPANSION" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_EXPANSION));
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_GUARDIAN" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_GUARDIAN));
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_HEXAGHOST" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_HEXAGHOST));
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_SLIME" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_SLIME));
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_SNECKO" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_SNECKO));
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_CHAMP" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_CHAMP));
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_AUTOMATON" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_AUTOMATON));
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_GREMLIN" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_GREMLIN));
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_HERMIT" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_HERMIT));
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_COLLECTOR));
} else {
//SlimeboundMod.logger.info("loading loc:" + language + " PACKAGE_HERMIT" + stringType);
BaseMod.loadCustomStringsFile(stringType, makeLocalizationPath(language, stringType.getSimpleName(), otherPackagePaths.PACKAGE_HERMIT));
}
}
private void loadLocalization(Settings.GameLanguage language) {
loadLocalization(language, UIStrings.class);
loadLocalization(language, EventStrings.class);
loadLocalization(language, RelicStrings.class);
loadLocalization(language, MonsterStrings.class);
loadLocalization(language, PotionStrings.class);
loadLocalization(language, CharacterStrings.class);
loadLocalization(language, CardStrings.class);
//loadLocalization(language, KeywordStrings.class);
loadLocalization(language, OrbStrings.class);
loadLocalization(language, RunModStrings.class);
loadLocalization(language, PowerStrings.class);
loadLocalization(language, RunModStrings.class);
loadLocalization(language, TutorialStrings.class);
}
@Override
public void receiveEditCards() {
BaseMod.addCard(new KnowingSkullWish());
// BaseMod.addCard(new Antidote());
// BaseMod.addCard(new ShieldSmash());
// BaseMod.addCard(new Debug());
//BaseMod.addCard(new PeaceOut());
BaseMod.addCard(new Malfunctioning());
BaseMod.addCard(new Bewildered());
BaseMod.addCard(new Haunted());
BaseMod.addCard(new Icky());
BaseMod.addCard(new Aged());
BaseMod.addCard(new Pride());
BaseMod.addCard(new Scatterbrained());
BaseMod.addCard(new Sapped());
/*
BaseMod.addCard(new Slug());
BaseMod.addCard(new Defend_Crowbot());
BaseMod.addCard(new Boom());
BaseMod.addCard(new Pellet());
BaseMod.addCard(new Barrier());
BaseMod.addCard(new Ricochet());
BaseMod.addCard(new HeavySlug());
BaseMod.addCard(new Cannonball());
BaseMod.addCard(new FullMetalJacket());
BaseMod.addCard(new Beam());
BaseMod.addCard(new FanTheHammer());
BaseMod.addCard(new CompressionMold());
BaseMod.addCard(new Desperado());*/
}
@Override
public void receiveEditStrings() {
loadLocalization(Settings.GameLanguage.ENG);
if (Settings.language != Settings.GameLanguage.ENG) {
loadLocalization(Settings.language);
}
try {
String lang = getLangString();
Gson gson = new Gson();
String json = Gdx.files.internal(assetPath("localization/" + lang + "/replacementStrings.json")).readString(String.valueOf(StandardCharsets.UTF_8));
wordReplacements = gson.fromJson(json, ReplaceData[].class);
} catch (Exception e) {
e.printStackTrace();
}
}
private void loadModKeywords(String modID, otherPackagePaths otherPath) {
String lang = getLangString();
//SlimeboundMod.logger.info("loading loc:" + lang + " " + otherPath + " keywords");
Gson gson = new Gson();
String json = Gdx.files.internal(assetPath("localization/" + lang + "/KeywordStrings.json", otherPath)).readString(String.valueOf(StandardCharsets.UTF_8));
com.evacipated.cardcrawl.mod.stslib.Keyword[] keywords = gson.fromJson(json, com.evacipated.cardcrawl.mod.stslib.Keyword[].class);
if (keywords != null) {
for (Keyword keyword : keywords) {
BaseMod.addKeyword(modID + "", keyword.PROPER_NAME, keyword.NAMES, keyword.DESCRIPTION);
if(!keyword.ID.isEmpty()){ // currently only used by hexa cards, could be expanded to potions too
keywords_and_proper_names.put(keyword.ID, keyword.NAMES[0]);
}
}
}
}
@Override
public void receiveEditKeywords() {
loadModKeywords(HexaMod.getModID(), otherPackagePaths.PACKAGE_HEXAGHOST);
loadModKeywords(expansionContentMod.getModID(), otherPackagePaths.PACKAGE_EXPANSION);
loadModKeywords(SneckoMod.getModID(), otherPackagePaths.PACKAGE_SNECKO);
loadModKeywords(SlimeboundMod.getModID(), otherPackagePaths.PACKAGE_SLIME);
loadModKeywords(GuardianMod.getModID(), otherPackagePaths.PACKAGE_GUARDIAN);
loadModKeywords(ChampMod.getModID(), otherPackagePaths.PACKAGE_CHAMP);
loadModKeywords(AutomatonMod.getModID(), otherPackagePaths.PACKAGE_AUTOMATON);
loadModKeywords(GremlinMod.getModID(), otherPackagePaths.PACKAGE_GREMLIN);
loadModKeywords(HermitMod.getModID(), otherPackagePaths.PACKAGE_HERMIT);
loadModKeywords(CollectorMod.getModID(), otherPackagePaths.PACKAGE_COLLECTOR);
loadModKeywords(modID, otherPackagePaths.PACKAGE_DOWNFALL);
}
public static AbstractCard getRandomDownfallCurse() {
Collections.shuffle(downfallCurses, AbstractDungeon.cardRandomRng.random);
return downfallCurses.get(0);
}
public static ArrayList<AbstractCard> getRandomDownfallCurse(int count) {
ArrayList<AbstractCard> ac = new ArrayList<>();
Collections.shuffle(downfallCurses, AbstractDungeon.cardRandomRng.random);
for (int i = 0; i < count; i++) {
ac.add(downfallCurses.get(i));
}
return ac;
}
public void receivePostInitialize() {
UnlockTracker.betaCardPref = new IndividualBetaArtEnablerPref(UnlockTracker.betaCardPref);
soulsImage = TextureLoader.getTexture(downfallMod.assetPath("images/ui/Souls.png"));
loadOtherData();
this.initializeMonsters();
// this.addPotions();
this.initializeEvents();
this.initializeConfig();
ArrayList<AbstractCard> tmp = CardLibrary.getAllCards();
for (AbstractCard c : tmp) {
if (c.hasTag(DOWNFALL_CURSE)) {
downfallCurses.add(c);
}
}
//Init save stuff for custom rewards.
//Automaton
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.DAZINGPULSE, (rewardSave) -> new DazingPulseReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.DECABEAM, (rewardSave) -> new DecaBeamReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.DONUBEAM, (rewardSave) -> new DonuBeamReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.EXPLODE, (rewardSave) -> new ExplodeReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.SPIKE, (rewardSave) -> new SpikeReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
//Downfall
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.BOSSCARD, (rewardSave) -> new BossCardReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.JAXCARD, (rewardSave) -> new JaxReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.REMOVECARD, (rewardSave) -> new RemoveCardReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.TRANSFORMCARD, (rewardSave) -> new TransformCardReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.UPGRADECARD, (rewardSave) -> new UpgradeCardReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
//Snecko
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.COLORFULCARD, (rewardSave) -> new ColorfulCardReward(AbstractCard.CardColor.valueOf(rewardSave.id)), (customReward) -> new RewardSave(customReward.type.toString(), customReward instanceof ColorfulCardReward ? ((ColorfulCardReward) customReward).myColor.toString() : "COLORLESS"));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.UPGRADEDUNKNOWNCARD, (rewardSave) -> new UpgradedUnknownReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
//Hexaghost
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.SEALCARD, (rewardSave) -> new SealSealReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.THIRDSEALCARDREWARD, (rewardSave) -> new ThirdSealReward(), (customReward) -> new RewardSave(customReward.type.toString(), null));
//Collector
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.COLLECTOR_COLLECTIBLECARDREWARD, (rewardSave) -> new CollectibleCardReward(rewardSave.id), reward -> {
String s = ((CollectibleCardReward) reward).card.cardID;
return new RewardSave(reward.type.toString(), s);
});
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.COLLECTOR_ESSENCE, (rewardSave) -> new EssenceReward(rewardSave.amount), (customReward) -> new RewardSave(customReward.type.toString(), null, customReward instanceof EssenceReward ? ((EssenceReward) customReward).amount : 0, 0));
//Guardian
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.GEM, (rewardSave) -> { //on load
GuardianMod.logger.info("gems loaded");
return new GemReward();
}, (customReward) -> { //on save
GuardianMod.logger.info("gems saved");
return new RewardSave(customReward.type.toString(), null);
});
BaseMod.registerCustomReward(RewardItemTypeEnumPatch.GEMALLRARITIES, (rewardSave) -> { //on load
GuardianMod.logger.info("gems loaded");
return new GemRewardAllRarities();
}, (customReward) -> { //on save
GuardianMod.logger.info("gems saved");
return new RewardSave(customReward.type.toString(), null);
});
}
private void initializeConfig() {
UIStrings configStrings = CardCrawlGame.languagePack.getUIString("downfall:ConfigMenuText");
// Load the Mod Badge
Texture badgeTexture = new Texture(assetPath("images/badge.png"));
// Create the Mod Menu
settingsPanel = new ModPanel();
int configPos = 750;
int configStep = 40;
ModLabeledToggleButton characterCrossoverBtn = new ModLabeledToggleButton(configStrings.TEXT[4], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, crossoverCharacters, settingsPanel, (label) -> {
}, (button) -> {
crossoverCharacters = button.enabled;
CardCrawlGame.mainMenuScreen.charSelectScreen.options.clear();
CardCrawlGame.mainMenuScreen.charSelectScreen.initialize();
saveData();
});
// configPos -= configStep;
// ModLabeledToggleButton useIconsForAppliedCardPropertiesBtn = new ModLabeledToggleButton(configStrings.TEXT[13], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, useIconsForAppliedProperties, settingsPanel, (label) -> {
// }, (button) -> {
// useIconsForAppliedProperties = button.enabled;
// saveData();
// });
settingsPanel.addUIElement(characterCrossoverBtn);
//settingsPanel.addUIElement(useIconsForAppliedCardPropertiesBtn);
if (!STEAM_MODE) {
configPos -= configStep;
ModLabeledToggleButton characterModCrossoverBtn = new ModLabeledToggleButton(configStrings.TEXT[5], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, crossoverModCharacters, settingsPanel, (label) -> {
}, (button) -> {
crossoverModCharacters = button.enabled;
CardCrawlGame.mainMenuScreen.charSelectScreen.options.clear();
CardCrawlGame.mainMenuScreen.charSelectScreen.initialize();
saveData();
});
configPos -= configStep;
ModLabeledToggleButton contentSharingBtnRelics = new ModLabeledToggleButton(configStrings.TEXT[0], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, contentSharing_relics, settingsPanel, (label) -> {
}, (button) -> {
contentSharing_relics = button.enabled;
saveData();
});
configPos -= configStep;
ModLabeledToggleButton contentSharingBtnEvents = new ModLabeledToggleButton(configStrings.TEXT[2], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, contentSharing_events, settingsPanel, (label) -> {
}, (button) -> {
contentSharing_events = button.enabled;
saveData();
});
configPos -= configStep;
ModLabeledToggleButton contentSharingBtnPotions = new ModLabeledToggleButton(configStrings.TEXT[1], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, contentSharing_potions, settingsPanel, (label) -> {
}, (button) -> {
contentSharing_potions = button.enabled;
saveData();
});
configPos -= configStep;
ModLabeledToggleButton contentSharingBtnColorless = new ModLabeledToggleButton(configStrings.TEXT[3], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, contentSharing_colorlessCards, settingsPanel, (label) -> {
}, (button) -> {
contentSharing_colorlessCards = button.enabled;
saveData();
});
configPos -= configStep;
ModLabeledToggleButton contentSharingBtnCurses = new ModLabeledToggleButton(configStrings.TEXT[6], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, contentSharing_curses, settingsPanel, (label) -> {
}, (button) -> {
contentSharing_curses = button.enabled;
saveData();
});
configPos -= configStep;
ModLabeledToggleButton normalMapBtn = new ModLabeledToggleButton(configStrings.TEXT[7], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, normalMapLayout, settingsPanel, (label) -> {
}, (button) -> {
normalMapLayout = button.enabled;
saveData();
});
configPos -= configStep;
ModLabeledToggleButton sneckoNoModConfig = new ModLabeledToggleButton(configStrings.TEXT[10], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, sneckoNoModCharacters, settingsPanel, (label) -> {
}, (button) -> {
sneckoNoModCharacters = button.enabled;
saveData();
});
configPos -= configStep;
ModLabeledToggleButton unlockAllBtn = new ModLabeledToggleButton(configStrings.TEXT[8], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, unlockEverything, settingsPanel, (label) -> {
}, (button) -> {
unlockEverything = button.enabled;
saveData();
});
configPos -= configStep;
ModLabeledToggleButton noMusicBtn = new ModLabeledToggleButton(configStrings.TEXT[11], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, noMusic, settingsPanel, (label) -> {
}, (button) -> {
noMusic = button.enabled;
saveData();
});
configPos -= configStep;
ModLabeledToggleButton unlockAllSkinBtn = new ModLabeledToggleButton(configStrings.TEXT[12], 350.0f, configPos, Settings.CREAM_COLOR, FontHelper.charDescFont, unlockAllReskin, settingsPanel, (label) -> {
}, (button) -> {
unlockAllReskin = button.enabled;
unlockAllReskin();
});
settingsPanel.addUIElement(contentSharingBtnCurses);
settingsPanel.addUIElement(contentSharingBtnEvents);
settingsPanel.addUIElement(contentSharingBtnPotions);
settingsPanel.addUIElement(contentSharingBtnRelics);
settingsPanel.addUIElement(contentSharingBtnColorless);
settingsPanel.addUIElement(normalMapBtn);
settingsPanel.addUIElement(sneckoNoModConfig);
settingsPanel.addUIElement(unlockAllBtn);
settingsPanel.addUIElement(noMusicBtn);
settingsPanel.addUIElement(unlockAllSkinBtn);
settingsPanel.addUIElement(characterModCrossoverBtn);
}
BaseMod.registerModBadge(badgeTexture, "downfall", "Downfall Team", "A very evil Expansion.", settingsPanel);
}
public static void loadConfigData() {
try {
SpireConfig config = new SpireConfig("downfall", "downfallSaveData", configDefault);
config.load();
if (!STEAM_MODE) {
contentSharing_curses = config.getBool(PROP_CURSE_SHARING);
contentSharing_relics = config.getBool(PROP_RELIC_SHARING);
contentSharing_events = config.getBool(PROP_EVENT_SHARING);
contentSharing_potions = config.getBool(PROP_POTION_SHARING);
contentSharing_colorlessCards = config.getBool(PROP_CARD_SHARING);
normalMapLayout = config.getBool(PROP_NORMAL_MAP);
sneckoNoModCharacters = config.getBool(PROP_SNECKO_MODLESS);
unlockEverything = config.getBool(PROP_UNLOCK_ALL);
noMusic = config.getBool(PROP_NO_MUSIC);
}
crossoverCharacters = config.getBool(PROP_CHAR_CROSSOVER);
crossoverModCharacters = config.getBool(PROP_MOD_CHAR_CROSSOVER);
useIconsForAppliedProperties = config.getBool(PROP_ICONS_FOR_APPLIED_PROPERTIES);
} catch (Exception e) {
e.printStackTrace();
clearData();
}
}
public static void clearData() {
saveData();
}
private void initializeEvents() {
BaseMod.addEvent(new AddEventParams.Builder(GremlinMatchGame_Evil.ID, GremlinMatchGame_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Prevent from appearing too early//
.bonusCondition(() -> (AbstractDungeon.floorNum > 6))
//Event ID to Override//
.overrideEvent(GremlinMatchGame.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(GremlinWheelGame_Evil.ID, GremlinWheelGame_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Prevent from appearing too early//
.bonusCondition(() -> (AbstractDungeon.floorNum > 6))
//Event ID to Override//
.overrideEvent(GremlinWheelGame.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
//Event only used in Gremlin Wheel relic. Is not initialized into any Act.
BaseMod.addEvent(new AddEventParams.Builder(GremlinWheelGame_Rest.ID, GremlinWheelGame_Rest.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> false)
//Act//
.dungeonID("").create());
BaseMod.addEvent(new AddEventParams.Builder(WomanInBlue_Evil.ID, WomanInBlue_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Prevent from appearing too early//
.bonusCondition(() -> (AbstractDungeon.floorNum > 6))
//Event ID to Override//
.overrideEvent(WomanInBlue.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(LivingWall_Evil.ID, LivingWall_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Prevent from appearing too early//
.bonusCondition(() -> (AbstractDungeon.floorNum > 6))
//Event ID to Override//
.overrideEvent(LivingWall.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(Augmenter_Evil.ID, Augmenter_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Prevent from appearing too early//
.bonusCondition(() -> (AbstractDungeon.floorNum > 6))
//Event ID to Override//
.overrideEvent(DrugDealer.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(BonfireSpirits_Evil.ID, BonfireSpirits_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(Bonfire.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(GoldenShrine_Evil.ID, GoldenShrine_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(GoldShrine.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(FaceTrader_Evil.ID, FaceTrader_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(FaceTrader.ID)
//Prevent from appearing too early//
.bonusCondition(() -> AbstractDungeon.floorNum > 6 && (AbstractDungeon.id.equals("TheCity") || AbstractDungeon.id.equals("Exordium")))
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(CursedFountain.ID, CursedFountain.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(FountainOfCurseRemoval.ID)
//Additional Condition//
.bonusCondition(() -> AbstractDungeon.player.isCursed())
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(WeMeetAgain_Evil.ID, WeMeetAgain_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(WeMeetAgain.ID)
//Event Type//
.bonusCondition(() -> (AbstractDungeon.player.relics.size() > 2))
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(Designer_Evil.ID, Designer_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(Designer.ID)
//Event Type//
.bonusCondition(() -> (AbstractDungeon.id.equals("TheCity") || AbstractDungeon.id.equals("TheBeyond"))).eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(DeadGuy_Evil.ID, DeadGuy_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Prevent from appearing too early//
.bonusCondition(() -> (AbstractDungeon.floorNum > 6))
//Event ID to Override//
.overrideEvent(DeadAdventurer.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(ShiningLight_Evil.ID, ShiningLight_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(ShiningLight.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(WorldOfGoop_Evil.ID, WorldOfGoop_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(GoopPuddle.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(Serpent_Evil.ID, Serpent_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(Sssserpent.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(WingStatue_Evil.ID, WingStatue_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(GoldenWing.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(GoldenIdol_Evil.ID, GoldenIdol_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(GoldenIdol.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(Cleric_Evil.ID, Cleric_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(Cleric.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(CouncilOfGhosts_Evil.ID, CouncilOfGhosts_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(Ghosts.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(CursedTome_Evil.ID, CursedTome_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(CursedTome.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(ForgottenAltar_Evil.ID, ForgottenAltar_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(ForgottenAltar.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(Bandits_Evil.ID, Bandits_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
.overrideEvent(MaskedBandits.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(KnowingSkull_Evil.ID, KnowingSkull_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)
//Event ID to Override//
//Additional Condition//
.bonusCondition(() -> (AbstractDungeon.player.currentHealth > 12) && AbstractDungeon.id.equals("TheCity")).overrideEvent(com.megacrit.cardcrawl.events.city.KnowingSkull.ID)
//Event Type//
.eventType(EventUtils.EventType.FULL_REPLACE).create());
BaseMod.addEvent(new AddEventParams.Builder(Vagrant_Evil.ID, Vagrant_Evil.class) //Event ID//
//Event Spawn Condition//
.spawnCondition(() -> evilMode)