fix: bonk fairy used as mandatory connector in standard
fix: hmg multi-player issue
This commit is contained in:
@@ -3,5 +3,7 @@
|
|||||||
* 1.4.8
|
* 1.4.8
|
||||||
- New option: Mirror Scroll - to add the item to the starting inventory in non-doors modes (Thanks Telethar!)
|
- New option: Mirror Scroll - to add the item to the starting inventory in non-doors modes (Thanks Telethar!)
|
||||||
- Fixed a key logic bug with decoupled doors when a big key door leads to a small key door (the small key door was missing appropriate logic)
|
- Fixed a key logic bug with decoupled doors when a big key door leads to a small key door (the small key door was missing appropriate logic)
|
||||||
|
- Fixed an ER bug where Bonk Fairy could be used for a mandatory connector in standard mode (boots could allow escape to be skipped)
|
||||||
- Fixed an issue with flute activation in rain mode. (thanks Codemann!)
|
- Fixed an issue with flute activation in rain mode. (thanks Codemann!)
|
||||||
|
- Fixed an issue with multi-player HMG
|
||||||
- Minor documentation fixes (thanks Codemann!)
|
- Minor documentation fixes (thanks Codemann!)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ def connect_hmg_entrances_regions(world, player):
|
|||||||
connection.connect(target)
|
connection.connect(target)
|
||||||
|
|
||||||
# Add the new Ice path (back of bomb drop to front) to the world and model it properly
|
# Add the new Ice path (back of bomb drop to front) to the world and model it properly
|
||||||
ip_clip_entrance = world.get_entrance('Ice Bomb Drop Clip', 1)
|
ip_clip_entrance = world.get_entrance('Ice Bomb Drop Clip', player)
|
||||||
clip_door = Door(player, "Ice Bomb Drop Clip", DoorType.Logical, ip_clip_entrance)
|
clip_door = Door(player, "Ice Bomb Drop Clip", DoorType.Logical, ip_clip_entrance)
|
||||||
world.doors += [clip_door]
|
world.doors += [clip_door]
|
||||||
world.initialize_doors([clip_door])
|
world.initialize_doors([clip_door])
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ def do_main_shuffle(entrances, exits, avail, mode_def):
|
|||||||
rem_entrances.update(lw_entrances)
|
rem_entrances.update(lw_entrances)
|
||||||
rem_entrances.update(dw_entrances)
|
rem_entrances.update(dw_entrances)
|
||||||
else:
|
else:
|
||||||
# cross world mandantory
|
# cross world mandatory
|
||||||
entrance_list = list(entrances)
|
entrance_list = list(entrances)
|
||||||
if avail.swapped:
|
if avail.swapped:
|
||||||
ban_list = Forbidden_Swap_Entrances_Inv if avail.inverted else Forbidden_Swap_Entrances
|
ban_list = Forbidden_Swap_Entrances_Inv if avail.inverted else Forbidden_Swap_Entrances
|
||||||
@@ -314,13 +314,11 @@ def do_main_shuffle(entrances, exits, avail, mode_def):
|
|||||||
avail.decoupled_exits.remove(bomb_shop)
|
avail.decoupled_exits.remove(bomb_shop)
|
||||||
rem_exits.remove(bomb_shop)
|
rem_exits.remove(bomb_shop)
|
||||||
|
|
||||||
def bonk_fairy_exception(x): # (Bonk Fairy not eligible in standard)
|
|
||||||
return not avail.is_standard() or x != 'Bonk Fairy (Light)'
|
|
||||||
if not cross_world:
|
if not cross_world:
|
||||||
# OM Cave entrance in lw/dw if cross_world off
|
# OM Cave entrance in lw/dw if cross_world off
|
||||||
if 'Old Man Cave Exit (West)' in rem_exits:
|
if 'Old Man Cave Exit (West)' in rem_exits:
|
||||||
world_limiter = DW_Entrances if avail.inverted else LW_Entrances
|
world_limiter = DW_Entrances if avail.inverted else LW_Entrances
|
||||||
om_cave_options = sorted([x for x in rem_entrances if x in world_limiter and bonk_fairy_exception(x)])
|
om_cave_options = sorted([x for x in rem_entrances if x in world_limiter and bonk_fairy_exception(avail, x)])
|
||||||
om_cave_choice = random.choice(om_cave_options)
|
om_cave_choice = random.choice(om_cave_options)
|
||||||
if not avail.coupled:
|
if not avail.coupled:
|
||||||
connect_exit('Old Man Cave Exit (West)', om_cave_choice, avail)
|
connect_exit('Old Man Cave Exit (West)', om_cave_choice, avail)
|
||||||
@@ -334,7 +332,7 @@ def do_main_shuffle(entrances, exits, avail, mode_def):
|
|||||||
if not avail.inverted: # we don't really care where this ends up in inverted?
|
if not avail.inverted: # we don't really care where this ends up in inverted?
|
||||||
for ext in om_house:
|
for ext in om_house:
|
||||||
if ext in rem_exits:
|
if ext in rem_exits:
|
||||||
om_house_options = [x for x in rem_entrances if x in LW_Entrances and bonk_fairy_exception(x)]
|
om_house_options = [x for x in rem_entrances if x in LW_Entrances and bonk_fairy_exception(avail, x)]
|
||||||
om_house_choice = random.choice(om_house_options)
|
om_house_choice = random.choice(om_house_options)
|
||||||
if not avail.coupled:
|
if not avail.coupled:
|
||||||
connect_exit(ext, om_house_choice, avail)
|
connect_exit(ext, om_house_choice, avail)
|
||||||
@@ -351,7 +349,7 @@ def do_main_shuffle(entrances, exits, avail, mode_def):
|
|||||||
lw_entrances, dw_entrances = [], []
|
lw_entrances, dw_entrances = [], []
|
||||||
left = sorted(rem_entrances)
|
left = sorted(rem_entrances)
|
||||||
for x in left:
|
for x in left:
|
||||||
if bonk_fairy_exception(x):
|
if bonk_fairy_exception(avail, x):
|
||||||
lw_entrances.append(x) if x in LW_Entrances else dw_entrances.append(x)
|
lw_entrances.append(x) if x in LW_Entrances else dw_entrances.append(x)
|
||||||
do_same_world_connectors(lw_entrances, dw_entrances, multi_exit_caves, avail)
|
do_same_world_connectors(lw_entrances, dw_entrances, multi_exit_caves, avail)
|
||||||
if avail.world.doorShuffle[avail.player] != 'vanilla':
|
if avail.world.doorShuffle[avail.player] != 'vanilla':
|
||||||
@@ -361,7 +359,7 @@ def do_main_shuffle(entrances, exits, avail, mode_def):
|
|||||||
unused_entrances.update(lw_entrances)
|
unused_entrances.update(lw_entrances)
|
||||||
unused_entrances.update(dw_entrances)
|
unused_entrances.update(dw_entrances)
|
||||||
else:
|
else:
|
||||||
entrance_list = sorted([x for x in rem_entrances if bonk_fairy_exception(x)])
|
entrance_list = sorted([x for x in rem_entrances if bonk_fairy_exception(avail, x)])
|
||||||
do_cross_world_connectors(entrance_list, multi_exit_caves, avail)
|
do_cross_world_connectors(entrance_list, multi_exit_caves, avail)
|
||||||
unused_entrances.update(entrance_list)
|
unused_entrances.update(entrance_list)
|
||||||
|
|
||||||
@@ -1081,6 +1079,8 @@ def do_vanilla_connect(pool_def, avail):
|
|||||||
avail.entrances.remove(entrance)
|
avail.entrances.remove(entrance)
|
||||||
avail.exits.remove(target)
|
avail.exits.remove(target)
|
||||||
|
|
||||||
|
def bonk_fairy_exception(avail, x): # (Bonk Fairy not eligible in standard)
|
||||||
|
return not avail.is_standard() or x != 'Bonk Fairy (Light)'
|
||||||
|
|
||||||
def do_mandatory_connections(avail, entrances, cave_options, must_exit):
|
def do_mandatory_connections(avail, entrances, cave_options, must_exit):
|
||||||
if len(must_exit) == 0:
|
if len(must_exit) == 0:
|
||||||
@@ -1171,7 +1171,8 @@ def do_mandatory_connections(avail, entrances, cave_options, must_exit):
|
|||||||
if len(cave) == 2:
|
if len(cave) == 2:
|
||||||
entrance = next(e for e in entrances[::-1] if e not in invalid_connections[exit]
|
entrance = next(e for e in entrances[::-1] if e not in invalid_connections[exit]
|
||||||
and e not in invalid_cave_connections[tuple(cave)] and e not in must_exit
|
and e not in invalid_cave_connections[tuple(cave)] and e not in must_exit
|
||||||
and (not avail.swapped or rnd_cave[0] != avail.combine_map[e]))
|
and (not avail.swapped or rnd_cave[0] != avail.combine_map[e])
|
||||||
|
and bonk_fairy_exception(avail, e))
|
||||||
entrances.remove(entrance)
|
entrances.remove(entrance)
|
||||||
connect_two_way(entrance, rnd_cave[0], avail)
|
connect_two_way(entrance, rnd_cave[0], avail)
|
||||||
if avail.swapped and avail.combine_map[entrance] != rnd_cave[0]:
|
if avail.swapped and avail.combine_map[entrance] != rnd_cave[0]:
|
||||||
@@ -1191,7 +1192,7 @@ def do_mandatory_connections(avail, entrances, cave_options, must_exit):
|
|||||||
cave_entrances.append(entrance)
|
cave_entrances.append(entrance)
|
||||||
else:
|
else:
|
||||||
entrance = next(e for e in entrances[::-1] if e not in invalid_connections[exit] and e not in must_exit
|
entrance = next(e for e in entrances[::-1] if e not in invalid_connections[exit] and e not in must_exit
|
||||||
and (not avail.swapped or cave_exit != avail.combine_map[e]))
|
and (not avail.swapped or cave_exit != avail.combine_map[e]) and bonk_fairy_exception(avail, e))
|
||||||
cave_entrances.append(entrance)
|
cave_entrances.append(entrance)
|
||||||
entrances.remove(entrance)
|
entrances.remove(entrance)
|
||||||
connect_two_way(entrance, cave_exit, avail)
|
connect_two_way(entrance, cave_exit, avail)
|
||||||
@@ -1222,7 +1223,7 @@ def do_mandatory_connections(avail, entrances, cave_options, must_exit):
|
|||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
entrance = next(e for e in entrances[::-1] if e not in invalid_cave_connections[tuple(cave)]
|
entrance = next(e for e in entrances[::-1] if e not in invalid_cave_connections[tuple(cave)]
|
||||||
and (not avail.swapped or cave_exit != avail.combine_map[e]))
|
and (not avail.swapped or cave_exit != avail.combine_map[e]) and bonk_fairy_exception(avail, e))
|
||||||
invalid_cave_connections[tuple(cave)] = set()
|
invalid_cave_connections[tuple(cave)] = set()
|
||||||
entrances.remove(entrance)
|
entrances.remove(entrance)
|
||||||
connect_two_way(entrance, cave_exit, avail)
|
connect_two_way(entrance, cave_exit, avail)
|
||||||
|
|||||||
Reference in New Issue
Block a user