forked from LeHulk1/RandoBlazer
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Log.cpp
779 lines (753 loc) · 27.8 KB
/
Log.cpp
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
#include "Log.h"
#include "Map.h"
#include "ROMData.h"
#include <fstream>
#include <iomanip>
#include <iostream>
#include <stdio.h>
#define SPOILER_LOG_FILE_NAME "SpoilerLog.txt"
#define NPC_NAME_SIZE 45
#define ITEM_NAME_SIZE 20
namespace Log {
static int Act1NPCs[16] =
{NPC_BRIDGE_GUARD,
NPC_IVY_CHEST_ROOM,
NPC_WATER_MILL,
NPC_ARCHITECT,
NPC_LEOS_HOUSE,
NPC_LISA,
NPC_TOOL_SHOP_OWNER,
NPC_TEDDY,
NPC_GOAT_HERB,
NPC_IVY,
NPC_IVY_EMBLEM_A,
NPC_TULIP_PASS,
NPC_BOY_CAVE,
NPC_IVY_RECOVERY_SWORD,
NPC_OLD_WOMAN,
NPC_VILLAGE_CHIEF};
static int Act2NPCs[18] =
{NPC_CROCODILE,
NPC_CROCODILE2,
NPC_BIRD_GREENWOOD_LEAF,
NPC_MOLE_SOUL_OF_LIGHT,
NPC_MONMO,
NPC_MOLE3,
NPC_MOLE,
NPC_DOG3,
NPC_DEER,
NPC_SQUIRREL3,
NPC_SQUIRREL_PSYCHO_SWORD,
NPC_SQUIRREL_EMBLEM_C,
NPC_SQUIRREL_ICE_ARMOR,
NPC_MOLE_SHIELD_BRACELET,
NPC_CROCODILE3,
NPC_DEER_MAGIC_BELL,
NPC_BIRD_RED_HOT_MIRROR,
NPC_GREENWOODS_GUARDIAN};
static int Act3NPCs[15] =
{NPC_MERMAID_BUBBLE_ARMOR,
NPC_MERMAID_PEARL,
NPC_DOLPHIN_PEARL,
NPC_MERMAID_STATUE_ROCKBIRD,
NPC_MERMAID_STATUE_DUREAN,
NPC_MERMAID_STATUE_BLESTER,
NPC_MERMAID_STATUE_GHOST_SHIP,
NPC_LUE,
NPC_DOLPHIN_SAVES_LUE,
NPC_DOLPHIN_SECRET_CAVE,
NPC_DOLPHIN2,
NPC_MERMAID,
NPC_MERMAID_MAGIC_FLARE,
NPC_MERMAID_RED_HOT_STICK,
NPC_MERMAID_QUEEN};
static int Act4NPCs[14] =
{NPC_BOY_MUSHROOM_SHOES,
NPC_GIRL3,
NPC_GRANDPA4,
NPC_GRANDPA_LUNE,
NPC_MUSHROOM2,
NPC_GRANDPA5,
NPC_SNAIL_EMBLEM_E,
NPC_MUSHROOM_EMBLEM_F,
NPC_BOY,
NPC_GRANDPA3,
NPC_DANCING_GRANDMA,
NPC_DANCING_GRANDMA2,
NPC_NOME,
NPC_MOUNTAIN_KING};
static int Act5NPCs[18] =
{NPC_GREAT_DOOR_ZANTETSU_SWORD,
NPC_STEPS_UPSTAIRS,
NPC_GREAT_DOOR_MODEL_TOWNS,
NPC_MODEL_TOWN1,
NPC_MODEL_TOWN2,
NPC_STAIRS_POWER_PLANT,
NPC_STEPS_MARIE,
NPC_CAT,
NPC_CAT2,
NPC_MOUSE,
NPC_MOUSE_SPARK_BOMB,
NPC_PLANT_HERB,
NPC_PLANT_ACTINIDIA_LEAVES,
NPC_CAT_DOOR_KEY,
NPC_GREAT_DOOR,
NPC_CHEST_OF_DRAWERS_MYSTIC_ARMOR,
NPC_CHEST_OF_DRAWERS2,
NPC_MARIE};
static int Act6NPCs[12] =
{NPC_SINGER_CONCERT_HALL,
NPC_SOLDIER_PLATINUM_CARD,
NPC_SOLDIER_LEFT_TOWER,
NPC_SOLDIER_RIGHT_TOWER,
NPC_SOLDIER_CASTLE,
NPC_SOLDIER_WITH_LEO,
NPC_SOLDIER_DOK,
NPC_DR_LEO,
NPC_SOLDIER_ELEMENTAL_MAIL,
NPC_MAID_HERB,
NPC_QUEEN_MAGRIDD,
NPC_KING_MAGRIDD};
static ItemID LoggedItems[62] = {
ItemID::SWORD_OF_LIFE,
ItemID::PSYCHO_SWORD,
ItemID::CRITICAL_SWORD,
ItemID::LUCKY_BLADE,
ItemID::ZANTETSU_SWORD,
ItemID::SPIRIT_SWORD,
ItemID::RECOVERY_SWORD,
ItemID::SOUL_BLADE,
ItemID::IRON_ARMOR,
ItemID::ICE_ARMOR,
ItemID::BUBBLE_ARMOR,
ItemID::MAGIC_ARMOR,
ItemID::MYSTIC_ARMOR,
ItemID::LIGHT_ARMOR,
ItemID::ELEMENTAL_MAIL,
ItemID::SOUL_ARMOR,
ItemID::FLAME_BALL,
ItemID::LIGHT_ARROW,
ItemID::MAGIC_FLARE,
ItemID::ROTATOR,
ItemID::SPARK_BOMB,
ItemID::FLAME_PILLAR,
ItemID::TORNADO,
ItemID::PHOENIX,
ItemID::GOATS_FOOD,
ItemID::HARP_STRING,
ItemID::PASS,
ItemID::DREAM_ROD,
ItemID::LEOS_BRUSH,
ItemID::GREENWOOD_LEAF,
ItemID::MOLES_RIBBON,
ItemID::BIG_PEARL,
ItemID::MERMAIDS_TEARS,
ItemID::MUSHROOM_SHOES,
ItemID::MOBILE_KEY,
ItemID::THUNDER_RING,
ItemID::DELICIOUS_SEEDS,
ItemID::ACTINIDIA_LEAF,
ItemID::DOOR_KEY,
ItemID::PLATINUM_CARD,
ItemID::VIP_CARD,
ItemID::EMBLEM_A,
ItemID::EMBLEM_B,
ItemID::EMBLEM_C,
ItemID::EMBLEM_D,
ItemID::EMBLEM_E,
ItemID::EMBLEM_F,
ItemID::EMBLEM_G,
ItemID::EMBLEM_H,
ItemID::RED_HOT_MIRROR,
ItemID::RED_HOT_BALL,
ItemID::RED_HOT_STICK,
ItemID::POWER_BRACELET,
ItemID::SHIELD_BRACELET,
ItemID::SUPER_BRACELET,
ItemID::BROWN_STONE,
ItemID::GREEN_STONE,
ItemID::BLUE_STONE,
ItemID::SILVER_STONE,
ItemID::PURPLE_STONE,
ItemID::BLACK_STONE,
ItemID::MAGIC_BELL
};
static const char* LoggedItemNames[62] =
{"Sword of Life",
"Psycho Sword",
"Critical Sword",
"Lucky Blade",
"Zantetsu Sword",
"Spirit Sword",
"Recovery Sword",
"Soul Blade",
"Iron Armor",
"Ice Armor",
"Bubble Armor",
"Magic Armor",
"Mystic Armor",
"Light Armor",
"Elemental Mail",
"Soul Armor",
"Flame Ball",
"Light Arrow",
"Magic Flare",
"Rotator",
"Spark Bomb",
"Flame Pillar",
"Tornado",
"Phoenix",
"Goat's Food",
"Harp String",
"Pass",
"Dream Rod",
"Leo's Brush",
"Greenwood Leaf",
"Mole's Ribbon",
"Big Pearl",
"Mermaid's Tears",
"Mushroom Shoes",
"Mobile Key",
"Thunder Ring",
"Delicious Seeds",
"Actinidia Leaf",
"Door Key",
"Platinum Card",
"VIP Card",
"Emblem A",
"Emblem B",
"Emblem C",
"Emblem D",
"Emblem E",
"Emblem F",
"Emblem G",
"Emblem H",
"Red-Hot Mirror",
"Red-Hot Ball",
"Red-Hot Stick",
"Power Bracelet",
"Shield Bracelet",
"Super Bracelet",
"Brown Stone",
"Green Stone",
"Blue Stone",
"Silver Stone",
"Purple Stone",
"Black Stone",
"Magic Bell"};
static const char* ItemLocations[NUMBER_OF_ITEMS] =
{"Trial Room at the start",
"Grass Valley secret cave (left chest)",
"Grass Valley secret cave (right chest)",
"Underground Castle (12-gem chest)",
"Underground Castle (Herb chest)",
"Underground Castle (Dream Rod chest)",
"Underground Castle (Leo's Brush chest)",
"Leo's Paintings (Herb chest)",
"Leo's Paintings (Tornado chest)",
"Greenwood (Ice Armor chest)",
"Greenwood tunnels (Mole's Ribbon chest)",
"Water Shrine 1st screen (50-gem chest)",
"Water Shrine 2nd screen (north, 150-gem chest)",
"Water Shrine 2nd screen (Herb chest)",
"Water Shrine 3rd screen (south-west chest)",
"Water Shrine 3rd screen (south-east chest)",
"Fire Shrine 1st screen (Herb chest)",
"Fire Shrine 2nd screen disappearing chest",
"Fire Shrine 2nd screen (Scorpions' Lair)",
"Fire Shrine 3rd screen (100-gem chest)",
"Fire Shrine 3rd screen (60-gem chest)",
"Light Shrine (Flame Pillar chest)",
"St Elles (Mermaid's Tears chest)",
"St Elles (Big Pearl chest)",
"Seabed secret cave (top-left chest)",
"Seabed secret cave (top-right chest)",
"Seabed secret cave (bottom-left chest)",
"Seabed secret cave (bottom-right chest)",
"Southerta (Herb chest)",
"Rockbird (Herb chest)",
"Rockbird (60-gem chest)",
"Durean (Critical Sword chest)",
"Durean (Strange Bottle chest)",
"Ghost Ship (1-gem chest)",
"Seabed, way to Ghost Ship (Power Bracelet chest)",
"Mountain of Souls 1st screen (40-gem chest)",
"Mountain of Souls 2nd screen (left-most chest)",
"Mountain of Souls 2nd screen (2nd chest from the left)",
"Mountain of Souls 2nd screen (2nd chest from the right)",
"Mountain of Souls 2nd screen (right-most chest)",
"Laynole 2nd screen (Lucky Blade chest)",
"Laynole 2nd screen (north-east, Herb chest)",
"Laynole 2nd screen (north-east, Rotator chest)",
"Leo's Lab (Zantetsu Sword chest)",
"Leo's Lab Power Plant (Light Armor chest)",
"Model Town 1 (south-east, 50-gem chest)",
"Model Town 1 (north part, left chest)",
"Model Town 1 (north part, right chest)",
"Model Town 2 (top chest)",
"Model Town 2 (bottom chest)",
"Magridd Castle Basement 1st screen (west chest)",
"Magridd Castle Basement 1st screen (Spirit Sword chest)",
"Magridd Castle Basement 2nd screen (north chest)",
"Magridd Castle Basement 2nd screen (south-west chest)",
"Magridd Castle Basement 2nd screen (middle, 100-gem chest)",
"Magridd Castle Basement 3rd screen (north-west chest)",
"Magridd Castle Right Tower 2nd screen (left chest)",
"Magridd Castle Right Tower 2nd screen (right chest)",
"Magridd Castle Right Tower 3rd screen (top-left chest)",
"Magridd Castle Right Tower 3rd screen (bottom-right chest)",
"World of Evil 1st screen (south-east chest)",
"World of Evil 1st screen (south-west chest)",
"World of Evil 1st screen (Red-Hot Ball chest)",
"World of Evil 2nd screen (Soul Armor chest)",
"Dazzling Space (south-east, Soul Blade chest)",
"Dazzling Space (south-west, 100-gem chest)",
"Tool Shop Owner's item",
"Emblem A tile (south-east of Grass Valley)",
"Goat Pen (bottom-right corner tile)",
"Teddy's item (Tool Shop)",
"Item under sleeping Tulip (south-east of Grass Valley)",
"Secret hideout tile (to the right after exiting the grotto)",
"Village Chief's item",
"Magician's item (start of the game)",
"Recovery Sword crystal fairy (in secret hideout)",
"Crystal fairy in 2-chest room of Grass Valley",
"First crystal fairy in Underground Castle",
"Red-Hot Mirror bird",
"Magic Bell crystal fairy (requires all 8 emblems)",
"Woodstin Trio's prize",
"Greenwood's Guardian's item",
"Greenwood Leaf tile (under Turbo's bones)",
"Shield Bracelet mole's item",
"Psycho Sword squirrel's item (requires Delicious Seeds)",
"Emblem C squirrel's item",
"Water Shrine basement's Strange Bottle tile",
"Light Arrow crystal fairy in Fire Shrine",
"Lost Marsh crystal fairy (near Light Shrine entrance)",
"Water Shrine 2nd screen crystal fairy",
"Fire Shrine 1st screen crystal fairy",
"Mountain King's item",
"Mushroom Shoes boy's item",
"Nome's item",
"Emblem E snail's item (in secret room)",
"Emblem F tile in Lune (unlocked in mushroom's dream)",
"Mountain of Souls 3rd screen crystal fairy",
"Lune crystal fairy",
"Under Chest of Drawers in locked room",
"Inside Chest of Drawers in locked room",
"Medical Herb plant in Leo's Lab main room",
"Leo's Cat's item",
"Actinidia Leaf plant's item",
"Inside Chest of Drawers in the attic",
"Marie's item",
"Spark Bomb Mouse's item (in mouse hole)",
"Leo's Lab basement 2nd screen crystal fairy",
"Model Town 1 crystal fairy",
"Leo's Lab Power Plant crystal fairy",
"Sleeping Soldier's item",
"Super Bracelet tile in Queen Magridd's house",
"Queen Magridd's item",
"Platinum Card Soldier's item (in concert hall)",
"Medical Herb Maid's item",
"Emblem H tile outside Magridd Castle",
"King Magridd's item",
"Dr. Leo's item",
"Harp String tile (Magridd Castle Basement 1st screen)",
"Medical Herb Mermaid (St. Elles north-eastern house)",
"Bubble Armor Mermaid's item",
"Magic Flare Mermaid's item (south-west of St. Elles)",
"Mermaid Queen's item",
"Red-Hot Stick Mermaid's item",
"Lue's item",
"Crystal fairy in Rockbird",
"Seabed crystal fairy (near Blester entrance)",
"Seabed crystal fairy (near Durean entrance)"};
int GetAreaNumber(const Lair &Lair) {
switch (Lair.Act) {
case ActID::ACT_1:
return 1;
case ActID::ACT_2:
return 2;
case ActID::ACT_3:
return 3;
case ActID::ACT_4:
return 4;
case ActID::ACT_5:
return 5;
case ActID::ACT_6:
return 6;
default:
/* Should not happen */
return 0;
}
}
const char* GetKeyNPCName(int NPC_ID) {
switch (NPC_ID) {
case NPC_BRIDGE_GUARD:
return "Bridge Guard";
case NPC_IVY_CHEST_ROOM:
return "Ivy (leads to the 2-chest room)";
case NPC_WATER_MILL:
return "Watermill Keeper";
case NPC_ARCHITECT:
return "Architect (stairs to Leo's house)";
case NPC_LEOS_HOUSE:
return "Old Man (Leo's house with painting)";
case NPC_LISA:
return "Lisa";
case NPC_TOOL_SHOP_OWNER:
return "Tool Shop Owner";
case NPC_TEDDY:
return "Teddy (Tool Shop Owner's son)";
case NPC_GOAT_HERB:
return "Goat (unlocks Goat Pen)";
case NPC_IVY:
return "Ivy (to south-eastern Grass Valley)";
case NPC_IVY_EMBLEM_A:
return "Ivy (to Emblem A tile)";
case NPC_TULIP_PASS:
return "Tulip (push for Pass)";
case NPC_BOY_CAVE:
return "Boy (guards Grass Valley hideout)";
case NPC_IVY_RECOVERY_SWORD:
return "Ivy (to Recovery Sword crystal)";
case NPC_OLD_WOMAN:
return "Old Woman (Village Chief's house)";
case NPC_VILLAGE_CHIEF:
return "Village Chief (leads to Act 2)";
case NPC_CROCODILE:
return "First Crocodile (to sleepy bird)";
case NPC_CROCODILE2:
return "Second Crocodile (to sleepy bird)";
case NPC_BIRD_GREENWOOD_LEAF:
return "Sleepy Bird (unlocks Greenwood Leaf)";
case NPC_MOLE_SOUL_OF_LIGHT:
return "Mole / Soul of Light (Greenwood Leaf)";
case NPC_MONMO:
return "Monmo the Mole";
case NPC_MOLE3:
return "Monmo's hole";
case NPC_MOLE:
return "Hole leading to dreaming stump";
case NPC_DOG3:
return "Woodstin Trio dog";
case NPC_DEER:
return "Woodstin Trio deer";
case NPC_SQUIRREL3:
return "Woodstin Trio squirrel";
case NPC_SQUIRREL_PSYCHO_SWORD:
return "Squirrel (trades Psycho Sword)";
case NPC_SQUIRREL_EMBLEM_C:
return "Squirrel (gives Emblem C)";
case NPC_SQUIRREL_ICE_ARMOR:
return "Squirrel (leads to Ice Armor chest)";
case NPC_MOLE_SHIELD_BRACELET:
return "Mole (gives Shield Bracelet)";
case NPC_CROCODILE3:
return "Crocodile (to Deer)";
case NPC_DEER_MAGIC_BELL:
return "Deer (unlocks Magic Bell crystal)";
case NPC_BIRD_RED_HOT_MIRROR:
return "Bird (gives Red-Hot Mirror)";
case NPC_GREENWOODS_GUARDIAN:
return "Greenwood's Guardian (leads to Act 3)";
case NPC_MERMAID_BUBBLE_ARMOR:
return "Mermaid (gives Bubble Armor)";
case NPC_MERMAID_PEARL:
return "Mermaid (unlocks Lue's prison)";
case NPC_DOLPHIN_PEARL:
return "Dolphin (leading to Big Pearl chest)";
case NPC_MERMAID_STATUE_ROCKBIRD:
return "Mermaid Statue (leading to Rockbird)";
case NPC_MERMAID_STATUE_DUREAN:
return "Mermaid Statue (leading to Durean)";
case NPC_MERMAID_STATUE_BLESTER:
return "Mermaid Statue (leading to Blester)";
case NPC_MERMAID_STATUE_GHOST_SHIP:
return "Mermaid Statue (leading to Ghost Ship)";
case NPC_LUE:
return "Lue (gives Thunder Ring)";
case NPC_DOLPHIN_SAVES_LUE:
return "Dolphin (saves Lue from prison)";
case NPC_DOLPHIN_SECRET_CAVE:
return "Sleeping Dolphin (unlocks secret cave)";
case NPC_DOLPHIN2:
return "Dolphin (unlocks north-eastern platform)";
case NPC_MERMAID:
return "Mermaid (gives Medical Herb)";
case NPC_MERMAID_TEARS:
return "Mermaid by the Mermaid Tears chest";
case NPC_MERMAID_MAGIC_FLARE:
return "Mermaid (gives Magic Flare)";
case NPC_MERMAID_RED_HOT_STICK:
return "Mermaid (gives Red-Hot Stick)";
case NPC_MERMAID_QUEEN:
return "Mermaid Queen (leads to Act 4)";
case NPC_BOY_MUSHROOM_SHOES:
return "Boy (gives Mushroom Shoes)";
case NPC_GIRL3:
return "Girl (unlocks eastern tunnel)";
case NPC_GRANDPA4:
return "Grandpa (unlocks south-eastern lake)";
case NPC_GRANDPA_LUNE:
return "Grandpa (leads to Lune)";
case NPC_MUSHROOM2:
return "Mushroom (unlocks southern tunnel)";
case NPC_GRANDPA5:
return "Grandpa (unlocks Nome's prison)";
case NPC_SNAIL_EMBLEM_E:
return "Snail in secret room (gives Emblem E)";
case NPC_MUSHROOM_EMBLEM_F:
return "Sleeping Mushroom (unlocks lair in Lune)";
case NPC_BOY:
return "Boy (unlocks western tunnel)";
case NPC_GRANDPA3:
return "Grandpa (unlocks south-western tunnel)";
case NPC_DANCING_GRANDMA:
return "Dancing Grandma 1";
case NPC_DANCING_GRANDMA2:
return "Dancing Grandma 2";
case NPC_NOME:
return "Nome (leads to Act 5)";
case NPC_MOUNTAIN_KING:
return "Mountain King (gives Phoenix)";
case NPC_GREAT_DOOR_ZANTETSU_SWORD:
return "Great Door (to Zantetsu Sword chest)";
case NPC_STEPS_UPSTAIRS:
return "Steps (to second floor)";
case NPC_GREAT_DOOR_MODEL_TOWNS:
return "Great Door (to Model Town room)";
case NPC_MODEL_TOWN1:
return "Model Town 1";
case NPC_MODEL_TOWN2:
return "Model Town 2";
case NPC_STAIRS_POWER_PLANT:
return "Stairs (to Power Plant)";
case NPC_STEPS_MARIE:
return "Steps (to Marie's attic)";
case NPC_CAT:
return "First Cat in Leo's Lab main room";
case NPC_CAT2:
return "Second Cat in Leo's Lab main room";
case NPC_MOUSE:
return "Mouse (unlocks Mouse hole)";
case NPC_MOUSE_SPARK_BOMB:
return "Mouse (gives Spark Bomb)";
case NPC_PLANT_HERB:
return "Plant (gives Medical Herbs)";
case NPC_PLANT_ACTINIDIA_LEAVES:
return "Plant (gives Actinidia Leaves)";
case NPC_CAT_DOOR_KEY:
return "Leo's sleeping Cat (gives Door Key)";
case NPC_GREAT_DOOR:
return "Locked Door to south-western room";
case NPC_CHEST_OF_DRAWERS_MYSTIC_ARMOR:
return "Chest of Drawers (gives Mystic Armor)";
case NPC_CHEST_OF_DRAWERS2:
return "Chest of Drawers (Herb storage)";
case NPC_MARIE:
return "Marie (leads to Act 6)";
case NPC_SINGER_CONCERT_HALL:
return "Singer (unlocks concert hall)";
case NPC_SOLDIER_PLATINUM_CARD:
return "Soldier (has Platinum Card)";
case NPC_SOLDIER_LEFT_TOWER:
return "Soldier (guarding Left Tower)";
case NPC_SOLDIER_RIGHT_TOWER:
return "Soldier (guarding Right Tower)";
case NPC_SOLDIER_CASTLE:
return "Soldier (unlocks Magridd Castle)";
case NPC_SOLDIER_WITH_LEO:
return "Soldier (accompanies Dr. Leo)";
case NPC_SOLDIER_DOK:
return "Soldier (Dok; accompanies Dr. Leo)";
case NPC_DR_LEO:
return "Dr. Leo";
case NPC_SOLDIER_ELEMENTAL_MAIL:
return "Sleeping Soldier (gives Elemental Mail)";
case NPC_MAID_HERB:
return "Maid (gives Medical Herbs)";
case NPC_QUEEN_MAGRIDD:
return "Queen Magridd (gives VIP Card)";
case NPC_KING_MAGRIDD:
return "King Magridd (leads to Act 7)";
default:
/* Should not happen */
return "";
}
}
const char* GetAreaName(const Lair &Lair) {
switch (Lair.PositionData[0]) {
case 0x05:
return "Underground Castle 1st screen";
case 0x06:
return "Underground Castle 2nd screen";
case 0x07:
return "Leo's Paintings 1st screen";
case 0x08:
return "Leo's Paintings 2nd screen";
case 0x09:
return "Leo's Paintings 3rd screen";
case 0x0B:
return "Leo's Paintings 4th screen";
case 0x0C:
return "Solid Arm's Lair";
case 0x0D:
return "Trial Room (start of the game)";
case 0x19:
return "Lost Marshes";
case 0x1A:
return "Water Shrine 1st screen";
case 0x1B:
return "Water Shrine 2nd screen";
case 0x1C:
return "Water Shrine 3rd screen";
case 0x1D:
return "Fire Shrine 1st screen";
case 0x1E:
return "Fire Shrine 2nd screen";
case 0x1F:
return "Fire Shrine 3rd screen";
case 0x20:
return "Light Shrine 1st screen";
case 0x21:
return "Light Shrine 2nd screen";
case 0x22:
return "Elemental Statues' Lair";
case 0x2A:
return "Seabed (south screen)";
case 0x2E:
return "Southerta";
case 0x2F:
return "Rockbird";
case 0x30:
return "Durean";
case 0x31:
return "Blester";
case 0x32:
return "Floating Skull's Lair";
case 0x34:
return "Seabed (north screen)";
case 0x3E:
return "Mountain of Souls 1st screen";
case 0x3F:
return "Mountain of Souls 2nd screen";
case 0x41:
return "Lune 1st screen";
case 0x42:
return "Lune 2nd screen";
case 0x44:
return "Poseidon's Lair";
case 0x45:
return "Mountain of Souls 3rd screen";
case 0x46:
return "Laynole 1st screen";
case 0x47:
return "Laynole 2nd screen";
case 0x56:
return "Leo's Lab Basement 1st screen";
case 0x57:
return "Leo's Lab Basement 2nd screen";
case 0x58:
return "Leo's Lab Power Plant";
case 0x59:
return "Tin Doll's Lair";
case 0x5B:
return "Leo's Lab Model Town 1";
case 0x5C:
return "Leo's Lab Model Town 2";
case 0x66:
return "Magridd Castle Basement 1st screen";
case 0x67:
return "Magridd Castle Basement 2nd screen";
case 0x68:
return "Magridd Castle Basement 3rd screen";
case 0x6A:
return "Magridd Castle Left Tower 1st screen";
case 0x6B:
return "Magridd Castle Left Tower 2nd screen";
case 0x6C:
return "Magridd Castle Left Tower 3rd screen";
case 0x6D:
return "Magridd Castle Right Tower 1st screen";
case 0x6E:
return "Magridd Castle Right Tower 2nd screen";
case 0x6F:
return "Magridd Castle Right Tower 3rd screen";
case 0x72:
return "Demon Bird's Lair";
default:
/* Should not happen */
return "";
}
}
void CreateSpoilerLog(const std::vector<Lair> &RandomizedLairList,
const std::vector<Item> &RandomizedItemList) {
std::ofstream LogFile(SPOILER_LOG_FILE_NAME, std::ios::binary);
int NPCIndex, ItemID, LoggedItemID;
LogFile << "\r\n";
LogFile << " /=============================\\" << "\r\n";
LogFile << " | RandoBlazer Spoiler Log |" << "\r\n";
LogFile << " \\=============================/" << "\r\n";
LogFile << "\r\n";
LogFile << "\r\n";
LogFile << " ----- KEY NPCs -----" << "\r\n";
LogFile << "\r\n";
LogFile << "Act 1: Grass Valley" << "\r\n";
for (NPCIndex = 0; NPCIndex < 16; NPCIndex++) {
LogFile << std::setw(NPC_NAME_SIZE) << std::left << GetKeyNPCName(Act1NPCs[NPCIndex])
<< " -----> Act " << GetAreaNumber(RandomizedLairList[Act1NPCs[NPCIndex]])
<< " - " << GetAreaName(RandomizedLairList[Act1NPCs[NPCIndex]]) << "\r\n";
}
LogFile << "\r\n";
LogFile << "Act 2: Greenwood" << "\r\n";
for (NPCIndex = 0; NPCIndex < 18; NPCIndex++) {
LogFile << std::setw(NPC_NAME_SIZE) << std::left << GetKeyNPCName(Act2NPCs[NPCIndex])
<< " -----> Act " << GetAreaNumber(RandomizedLairList[Act2NPCs[NPCIndex]])
<< " - " << GetAreaName(RandomizedLairList[Act2NPCs[NPCIndex]]) << "\r\n";
}
LogFile << "\r\n";
LogFile << "Act 3: St Elles" << "\r\n";
for (NPCIndex = 0; NPCIndex < 15; NPCIndex++) {
LogFile << std::setw(NPC_NAME_SIZE) << std::left << GetKeyNPCName(Act3NPCs[NPCIndex])
<< " -----> Act " << GetAreaNumber(RandomizedLairList[Act3NPCs[NPCIndex]])
<< " - " << GetAreaName(RandomizedLairList[Act3NPCs[NPCIndex]]) << "\r\n";
}
LogFile << "\r\n";
LogFile << "Act 4: Mountain of Souls" << "\r\n";
for (NPCIndex = 0; NPCIndex < 14; NPCIndex++) {
LogFile << std::setw(NPC_NAME_SIZE) << std::left << GetKeyNPCName(Act4NPCs[NPCIndex])
<< " -----> Act " << GetAreaNumber(RandomizedLairList[Act4NPCs[NPCIndex]])
<< " - " << GetAreaName(RandomizedLairList[Act4NPCs[NPCIndex]]) << "\r\n";
}
LogFile << "\r\n";
LogFile << "Act 5: Leo's Lab" << "\r\n";
for (NPCIndex = 0; NPCIndex < 18; NPCIndex++) {
LogFile << std::setw(NPC_NAME_SIZE) << std::left << GetKeyNPCName(Act5NPCs[NPCIndex])
<< " -----> Act " << GetAreaNumber(RandomizedLairList[Act5NPCs[NPCIndex]])
<< " - " << GetAreaName(RandomizedLairList[Act5NPCs[NPCIndex]]) << "\r\n";
}
LogFile << "\r\n";
LogFile << "Act 6: Magridd Castle" << "\r\n";
for (NPCIndex = 0; NPCIndex < 12; NPCIndex++) {
LogFile << std::setw(NPC_NAME_SIZE) << std::left << GetKeyNPCName(Act6NPCs[NPCIndex])
<< " -----> Act " << GetAreaNumber(RandomizedLairList[Act6NPCs[NPCIndex]])
<< " - " << GetAreaName(RandomizedLairList[Act6NPCs[NPCIndex]]) << "\r\n";
}
LogFile << "\r\n";
LogFile << "\r\n";
LogFile << " ----- EQUIPMENT / KEY ITEMS -----" << "\r\n";
LogFile << "\r\n";
for (LoggedItemID = 0; LoggedItemID < 62; LoggedItemID++) {
for (ItemID = 0; ItemID < NUMBER_OF_ITEMS; ItemID++) {
/* This search method is very inefficient but who cares */
if (RandomizedItemList[ItemID].Contents == LoggedItems[LoggedItemID]) {
break;
}
}
LogFile << std::setw(ITEM_NAME_SIZE) << std::left << LoggedItemNames[LoggedItemID]
<< " -----> " << ItemLocations[ItemID] << "\r\n";
}
LogFile.close();
}
}