@@ -32,7 +32,7 @@ def randomize(args):
32
32
rom_data = bytearray (input_file .read ())
33
33
34
34
if args .force :
35
- print ("Verifying checksums ..." )
35
+ print ("Verifying checksum ..." )
36
36
result = verify_checksum (rom_data )
37
37
if result is False :
38
38
print ("Checksum does not match any known ROM, aborting." )
@@ -43,7 +43,7 @@ def randomize(args):
43
43
prg = "PRG%d" % result
44
44
45
45
else :
46
- print ("Skipping checksums ..." )
46
+ print ("Skipping checksum ..." )
47
47
48
48
print ("Fixing functionality of the fighter's ring (+2 atk)..." )
49
49
rom_data = fix_fighters_ring (rom_data )
@@ -202,11 +202,12 @@ def shuffle_towns(warp_data):
202
202
warp_data [210 :213 ]]
203
203
random .shuffle (towns )
204
204
random .shuffle (caves )
205
- # if rimuldar is in the normal spot...
206
- if (towns [3 ][0 ] == 11 ):
207
- #make sure the rimuldar cave doesn't end up in garinham or tantegel
208
- while (24 in (caves [3 ][0 ], caves [5 ][0 ], caves [6 ][0 ])):
209
- random .shuffle (caves )
205
+ # make sure the rimuldar cave isn't inaccessible
206
+ # this could happen if it ends up in southern shrine position or
207
+ # behind a locked door when rimuldar is in it's normal location.
208
+ while (caves [3 ][0 ] == 24 or
209
+ (towns [3 ][0 ] == 11 and 24 in (caves [5 ][0 ], caves [6 ][0 ]))):
210
+ random .shuffle (caves )
210
211
warp_data [153 :156 ] = towns [0 ]
211
212
warp_data [159 :162 ] = towns [1 ]
212
213
warp_data [162 :165 ] = towns [2 ]
0 commit comments