Code cleanup and more tests
This commit is contained in:
1
Main.py
1
Main.py
@@ -82,7 +82,6 @@ def main(args, seed=None, fish=None):
|
|||||||
for i in zip(args.logic.values(), args.door_shuffle.values()):
|
for i in zip(args.logic.values(), args.door_shuffle.values()):
|
||||||
if i[0] == 'hybridglitches' and i[1] != 'vanilla':
|
if i[0] == 'hybridglitches' and i[1] != 'vanilla':
|
||||||
raise RuntimeError(BabelFish().translate("cli","cli","hybridglitches.door.shuffle"))
|
raise RuntimeError(BabelFish().translate("cli","cli","hybridglitches.door.shuffle"))
|
||||||
# print(args)
|
|
||||||
world = World(args.multi, args.shuffle, args.door_shuffle, args.logic, args.mode, args.swords,
|
world = World(args.multi, args.shuffle, args.door_shuffle, args.logic, args.mode, args.swords,
|
||||||
args.difficulty, args.item_functionality, args.timer, args.progressive, args.goal, args.algorithm,
|
args.difficulty, args.item_functionality, args.timer, args.progressive, args.goal, args.algorithm,
|
||||||
args.accessibility, args.shuffleganon, args.custom, args.customitemarray, args.hints)
|
args.accessibility, args.shuffleganon, args.custom, args.customitemarray, args.hints)
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -621,13 +621,11 @@ Hybrid Major Glitches logic includes the following:
|
|||||||
* All Overworld Glitches logic
|
* All Overworld Glitches logic
|
||||||
* Kikiskip to access PoD wihtout MP or DW access
|
* Kikiskip to access PoD wihtout MP or DW access
|
||||||
* IP Lobby clip to skip fire requirement
|
* IP Lobby clip to skip fire requirement
|
||||||
|
* Traversal between TT -> Desert
|
||||||
|
* Traversal between Spec rock upper -> Spec rock mid
|
||||||
|
* Traversal between Paradox lower -> Paradox mid + upper
|
||||||
* Traversal between Mire -> Hera -> Swamp
|
* Traversal between Mire -> Hera -> Swamp
|
||||||
* Stealing SK from Mire to open SP
|
* Stealing SK from Mire to open SP
|
||||||
* Using the Mire big key to open Hera doors and big chest
|
* Using the Mire big key to open Hera doors and big chest
|
||||||
* Traversal between TT -> Desert
|
|
||||||
* Traveral between Spec rock upper -> Spec rock mid
|
|
||||||
* Traveral between Paradox lower -> Paradox mid + upper
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
All traversals mentioned are considered connectors in entrance shuffle
|
||||||
|
|||||||
19
Rules.py
19
Rules.py
@@ -1907,12 +1907,6 @@ def set_bunny_rules(world, player, inverted):
|
|||||||
|
|
||||||
# Is it possible to do bunny pocket here
|
# Is it possible to do bunny pocket here
|
||||||
def can_bunny_pocket_skull_woods(world, player):
|
def can_bunny_pocket_skull_woods(world, player):
|
||||||
# return world.get_entrance(
|
|
||||||
# "Skull Woods Second Section Door (West)", player
|
|
||||||
# ).connected_region.type != RegionType.Dungeon and (
|
|
||||||
# not world.state.can_reach_from("Skull Woods Forest (West)", "Light World", 1)
|
|
||||||
# or not world.state.can_reach_from("Light World", "Skull Woods Forest (West)", 1)
|
|
||||||
# )
|
|
||||||
return world.get_entrance(
|
return world.get_entrance(
|
||||||
"Skull Woods Second Section Door (West)", player
|
"Skull Woods Second Section Door (West)", player
|
||||||
).connected_region.type == RegionType.Dungeon or (
|
).connected_region.type == RegionType.Dungeon or (
|
||||||
@@ -1921,12 +1915,6 @@ def set_bunny_rules(world, player, inverted):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def can_bunny_pocket_voo_shop(world, player):
|
def can_bunny_pocket_voo_shop(world, player):
|
||||||
# return world.get_entrance(
|
|
||||||
# "Dark World Shop", player
|
|
||||||
# ).connected_region.type != RegionType.Dungeon and (
|
|
||||||
# not world.state.can_reach_from("West Dark World", "Light World", 1)
|
|
||||||
# or not world.state.can_reach_from("Light World", "West Dark World", 1)
|
|
||||||
# )
|
|
||||||
return (
|
return (
|
||||||
world.state.can_reach_from("West Dark World", "Light World", 1)
|
world.state.can_reach_from("West Dark World", "Light World", 1)
|
||||||
and world.state.can_reach_from("Light World", "West Dark World", 1)
|
and world.state.can_reach_from("Light World", "West Dark World", 1)
|
||||||
@@ -1963,13 +1951,6 @@ def set_bunny_rules(world, player, inverted):
|
|||||||
new_region = entrance.parent_region
|
new_region = entrance.parent_region
|
||||||
if new_region.type in (RegionType.Cave, RegionType.Dungeon) and new_region in seen:
|
if new_region.type in (RegionType.Cave, RegionType.Dungeon) and new_region in seen:
|
||||||
continue
|
continue
|
||||||
# We don't need to navigate through single entrance dungeons. HMG has more multi-entrance dungeons
|
|
||||||
# if (region.type == RegionType.Dungeon and new_region.type == RegionType.Dungeon):
|
|
||||||
# if (
|
|
||||||
# world.logic[player] == 'hybridglitches' and new_region.dungeon != None and new_region.dungeon.name in hmg_single_exit_dungeons) or (
|
|
||||||
# world.logic[player] not in ['hybridglitches', 'nologic'] and new_region.dungeon != None and new_region.dungeon.name in all_single_exit_dungeons
|
|
||||||
# ):
|
|
||||||
# continue
|
|
||||||
new_path = path + [entrance.access_rule]
|
new_path = path + [entrance.access_rule]
|
||||||
new_seen = seen.union({new_region})
|
new_seen = seen.union({new_region})
|
||||||
if not is_link(new_region):
|
if not is_link(new_region):
|
||||||
|
|||||||
20
test/suite/hmg/flippers_locked_flippers.yaml
Normal file
20
test/suite/hmg/flippers_locked_flippers.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
meta:
|
||||||
|
players: 1
|
||||||
|
settings:
|
||||||
|
1:
|
||||||
|
logic: hybridglitches
|
||||||
|
start_inventory:
|
||||||
|
1:
|
||||||
|
- Pegasus Boots
|
||||||
|
- Moon Pearl
|
||||||
|
- Progressive Sword
|
||||||
|
advanced_placements:
|
||||||
|
1:
|
||||||
|
- type: Verification
|
||||||
|
item: Flippers
|
||||||
|
locations:
|
||||||
|
Zora's Ledge: True
|
||||||
|
Hobo: True
|
||||||
|
Ice Palace - Boss: True
|
||||||
|
Swamp Palace - Entrance: False
|
||||||
|
|
||||||
29
test/suite/hmg/flippers_wraps.yaml
Normal file
29
test/suite/hmg/flippers_wraps.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
meta:
|
||||||
|
players: 1
|
||||||
|
settings:
|
||||||
|
1:
|
||||||
|
logic: owglitches
|
||||||
|
start_inventory:
|
||||||
|
1:
|
||||||
|
- Pegasus Boots
|
||||||
|
- Moon Pearl
|
||||||
|
- Progressive Sword
|
||||||
|
- Flippers
|
||||||
|
placements:
|
||||||
|
1:
|
||||||
|
Peg Cave: Magic Mirror
|
||||||
|
advanced_placements:
|
||||||
|
1:
|
||||||
|
- type: Verification
|
||||||
|
item: Hammer
|
||||||
|
locations:
|
||||||
|
Link's House: True
|
||||||
|
Magic Bat: False
|
||||||
|
advanced_placements:
|
||||||
|
1:
|
||||||
|
- type: Verification
|
||||||
|
item: Progressive Glove
|
||||||
|
locations:
|
||||||
|
Link's House: True
|
||||||
|
Ice Palace - Freezor Chest: False
|
||||||
|
|
||||||
Reference in New Issue
Block a user