3434 "Heavily Armed Pokey" : 0xEF49AA ,
3535 "Starman Junior" : 0xEF3A59 ,
3636 "Diamond Dog" : 0xEF3D08 ,
37- "Giygas (4) " : 0xEF40F2
37+ "Giygas" : 0xEF40F2
3838
3939}
4040
41+ boss_plando_keys = {
42+ "Frank" ,
43+ "Frankystein Mark II" ,
44+ "Frankystein" ,
45+ "Captain Strong" ,
46+ "Strong" ,
47+ "Everdred" ,
48+ "Mr. Carpainter" ,
49+ "Mr Carpainter" ,
50+ "Carpainter" ,
51+ "Mondo Mole" ,
52+ "Boogey Tent" ,
53+ "Mini Barf" ,
54+ "Master Belch" ,
55+ "Belch" ,
56+ "Trillionage Sprout" ,
57+ "Guardian Digger" ,
58+ "Dept. Store Spook" ,
59+ "Dept Store Spook" ,
60+ "Evil Mani Mani" ,
61+ "Mani Mani" ,
62+ "Clumsy Robot" ,
63+ "Shrooom!" ,
64+ "Shrooom" ,
65+ "Shroom!" ,
66+ "Shroooooom!" ,
67+ "Shroom" ,
68+ "Plague Rat of Doom" ,
69+ "Thunder and Storm" ,
70+ "Kraken" ,
71+ "The Kraken" ,
72+ "Guardian General" ,
73+ "Master Barf" ,
74+ "Starman Deluxe" ,
75+ "Starman DX" ,
76+ "Electro Specter" ,
77+ "Carbon Dog" ,
78+ "Ness's Nightmare" ,
79+ "Nesss Nightmare" ,
80+ "Heavily Armed Pokey" ,
81+ "Pokey"
82+ "Starman Junior" ,
83+ "Diamond Dog" ,
84+ "Giygas"
85+ }
86+
87+ boss_typo_key = {
88+ "Frankystein" : "Frankystein Mark II" ,
89+ "Strong" : "Captain Strong" ,
90+ "Mr Carpainter" : "Mr. Carpainter" ,
91+ "Carpainter" : "Mr. Carpainter" ,
92+ "Belch" : "Master Belch" ,
93+ "Dept Store Spook" : "Dept. Store Spook" ,
94+ "Evil Mani Mani" : "Evil Mani-Mani" ,
95+ "Mani Mani" : "Evil Mani-Mani" ,
96+ "Shroom" : "Shrooom!" ,
97+ "Shrooom" : "Shrooom!" ,
98+ "Shroom!" : "Shrooom!" ,
99+ "Shroooooom!" : "Shrooom!" ,
100+ "The Kraken" : "Kraken" ,
101+ "Starman DX" : "Starman Deluxe" ,
102+ "Nesss Nightmare" : "Ness's Nightmare" ,
103+ "Pokey" : "Heavily Armed Pokey"
104+ }
105+
41106banned_transformations = ["Master Belch" , "Master Barf" , "Kraken" , "Heavily Armed Pokey" ]
42- hard_final_bosses = ["Carbon Dog" , "Kraken" , "Clumsy Robot" , "Starman Junior" , "Starman Deluxe" , "Giygas (4) " , "Thunder and Storm" , "Electro Specter" ,
107+ hard_final_bosses = ["Carbon Dog" , "Kraken" , "Clumsy Robot" , "Starman Junior" , "Starman Deluxe" , "Giygas" , "Thunder and Storm" , "Electro Specter" ,
43108 "Evil Mani-Mani" , "Ness's Nightmare" , "Shrooom!" , "Master Belch" ]
44109
45110
@@ -60,6 +125,11 @@ class BossData(NamedTuple):
60125
61126
62127def initialize_bosses (world : "EarthBoundWorld" ) -> None :
128+ from ..Options import BossShuffle
129+
130+ world .spoil_dog_shuffle = world .options .decouple_diamond_dog .value
131+ world .spoil_giygas_shuffle = world .options .boss_shuffle_add_giygas .value
132+
63133 world .boss_list = [
64134 "Frank" ,
65135 "Frankystein Mark II" ,
@@ -89,7 +159,7 @@ def initialize_bosses(world: "EarthBoundWorld") -> None:
89159 "Heavily Armed Pokey" ,
90160 "Starman Junior" ,
91161 "Diamond Dog" ,
92- "Giygas (4) "
162+ "Giygas"
93163 ]
94164
95165 world .boss_slots = {
@@ -138,7 +208,7 @@ def initialize_bosses(world: "EarthBoundWorld") -> None:
138208 "Heavily Armed Pokey" : SlotInfo ([0x09C2EC ], [0x2EEEC3 , 0x2EEECC ], [], []),
139209 "Starman Junior" : SlotInfo ([], [], [], []),
140210 "Diamond Dog" : SlotInfo ([], [], [], []),
141- "Giygas (4) " : SlotInfo ([0x09C2BF , 0x09C2E5 ], [0x2EF0A9 ], [0x2EF09F ], [])
211+ "Giygas" : SlotInfo ([0x09C2BF , 0x09C2E5 ], [0x2EF0A9 ], [0x2EF09F ], [])
142212 }
143213
144214 world .boss_info = {
@@ -170,29 +240,32 @@ def initialize_bosses(world: "EarthBoundWorld") -> None:
170240 "Heavily Armed Pokey" : BossData (0x01CA , 0xEEF064 , 0xEEF056 , 0x000E , 0xD8 , 0x69 ),
171241 "Starman Junior" : BossData (0x012F , 0xEEF082 , 0xEEF07A , 0x01DA , 0xD6 , 0x94 ),
172242 "Diamond Dog" : BossData (0x014A , 0xEEF052 , 0xEEF089 , 0x01D9 , 0x53 , 0x61 ),
173- "Giygas (4) " : BossData (0x0172 , 0xEEF095 , 0xEEF095 , 0x01DD , 0xDC , 0x49 )
243+ "Giygas" : BossData (0x0172 , 0xEEF095 , 0xEEF095 , 0x01DD , 0xDC , 0x49 )
174244 }
175245
176246 if world .options .skip_prayer_sequences :
177247 # Boss shuffle sprites needs to apply to the skip prayer cleanup too
178- world .boss_slots ["Giygas (4) " ].sprite_addrs .append (0x07B9AC )
248+ world .boss_slots ["Giygas" ].sprite_addrs .append (0x07B9AC )
179249 world .boss_slots ["Heavily Armed Pokey" ].sprite_addrs .append (0x07B9A7 )
180250
181251 # mole/rat text
182252 # todo; Giygas sprites/text
183253
184254 world .boss_slot_order = world .boss_list .copy ()
255+ boss_plando = world .options .boss_shuffle .value .split (";" )
256+ shuffle_result = boss_plando .pop ()
185257
186- if world . options . boss_shuffle :
258+ if shuffle_result :
187259 world .random .shuffle (world .boss_list )
188260
189261 if not world .options .decouple_diamond_dog :
190262 world .boss_list .remove ("Diamond Dog" )
191263 insert_index = 28 if not world .options .boss_shuffle_add_giygas else 27
192264 world .boss_list .insert (insert_index , "Diamond Dog" )
265+
193266 if not world .options .boss_shuffle_add_giygas :
194- world .boss_list .remove ("Giygas (4) " )
195- world .boss_list .insert (29 , "Giygas (4) " )
267+ world .boss_list .remove ("Giygas" )
268+ world .boss_list .insert (29 , "Giygas" )
196269
197270 if world .boss_list [25 ] == "Carbon Dog" and world .boss_list [27 ] in banned_transformations :
198271 original_boss = world .boss_list [27 ]
@@ -204,11 +277,36 @@ def initialize_bosses(world: "EarthBoundWorld") -> None:
204277 while world .boss_list [25 ] in hard_final_bosses :
205278 i = world .random .randrange (len (world .boss_list ))
206279 if (world .boss_list [i ] == "Diamond Dog" and not world .options .decouple_diamond_dog ) or (
207- world .boss_list [i ] == "Giygas (4) " and not world .options .boss_shuffle_add_giygas
280+ world .boss_list [i ] == "Giygas" and not world .options .boss_shuffle_add_giygas
208281 ):
209282 continue
210283 world .boss_list [25 ], world .boss_list [i ] = world .boss_list [i ], world .boss_list [25 ]
211284
285+ print (f"Old: { world .boss_list } " )
286+ for item in boss_plando :
287+ boss_block = item .split ("-" )
288+ boss = boss_block [0 ].title ()
289+ slot = boss_block [1 ].title ()
290+ if boss in boss_typo_key :
291+ boss = boss_typo_key [boss ]
292+
293+ if slot in boss_typo_key :
294+ slot = boss_typo_key [boss ]
295+
296+ if slot == "Diamond Dog" :
297+ world .spoil_dog_shuffle = True
298+
299+ if slot == "Giygas" :
300+ world .spoil_dog_shuffle = True
301+
302+ world .boss_list .remove (boss )
303+ world .boss_list .insert (world .boss_slot_order .index (slot ), boss )
304+
305+
306+ print (f"New { world .boss_list } " )
307+
308+
309+
212310def write_bosses (world : "EarthBoundWorld" , rom : "LocalRom" ) -> None :
213311 rom .write_bytes (0x15E527 , bytearray ([0x00 , 0x00 ])) # Blank out Pokey's end battle action
214312 rom .write_bytes (0x15B8B9 , bytearray ([0x00 , 0x00 ]))
@@ -298,7 +396,7 @@ def write_bosses(world: "EarthBoundWorld", rom: "LocalRom") -> None:
298396 rom .write_bytes (0x2FFF17 , struct .pack ("H" , world .boss_info [world .boss_list [27 ]].enemy_id )) # Add diamond dog
299397 rom .write_bytes (0x2FFF19 , bytearray ([0xFF ]))
300398 rom .write_bytes (world .enemies [world .boss_list [27 ]].address + 91 , bytearray ([0x00 ])) # Force to front row
301- elif world .boss_list [25 ] == "Giygas (4) " :
399+ elif world .boss_list [25 ] == "Giygas" :
302400 rom .write_bytes (0x0121DF , bytearray ([0x00 ]))
303401 rom .write_bytes (0x2FFF16 , bytearray ([0xFF ]))
304402 else :
0 commit comments