SoE: fix logic for drain cave with OoB (#4496)

Also adds py3.13 compat and missing hash for sdist
This commit is contained in:
black-sliver
2025-01-17 01:27:36 +01:00
committed by GitHub
parent c7810823e8
commit 5c56dc0357
2 changed files with 75 additions and 43 deletions

View File

@@ -12,13 +12,13 @@ class OoBTest(SoETestBase):
# some locations that just need a weapon + OoB
oob_reachable = [
"Aquagoth", "Sons of Sth.", "Mad Monk", "Magmar", # OoB can use volcano shop to skip rock skip
"Levitate", "Fireball", "Drain", "Speed",
"Levitate", "Fireball", "Speed",
"E. Crustacia #107", "Energy Core #285", "Vanilla Gauge #57",
]
# some locations that should still be unreachable
oob_unreachable = [
"Tiny", "Rimsala",
"Barrier", "Call Up", "Reflect", "Force Field", "Stop", # Stop guy doesn't spawn for the other entrances
"Barrier", "Drain", "Call Up", "Reflect", "Force Field", "Stop", # Stop guy only spawns from one entrance
"Pyramid bottom #118", "Tiny's hideout #160", "Tiny's hideout #161", "Greenhouse #275",
]
# OoB + Diamond Eyes
@@ -31,11 +31,42 @@ class OoBTest(SoETestBase):
"Tiny's hideout #161",
]
self.assertLocationReachability(reachable=oob_reachable, unreachable=oob_unreachable, satisfied=False)
self.collect_by_name("Gladiator Sword")
self.assertLocationReachability(reachable=oob_reachable, unreachable=oob_unreachable, satisfied=in_logic)
self.collect_by_name("Diamond Eye")
self.assertLocationReachability(reachable=de_reachable, unreachable=de_unreachable, satisfied=in_logic)
with self.subTest("No items", oob_logic=in_logic):
self.assertLocationReachability(reachable=oob_reachable, unreachable=oob_unreachable, satisfied=False)
with self.subTest("Cutting Weapon", oob_logic=in_logic):
self.collect_by_name("Gladiator Sword")
self.assertLocationReachability(reachable=oob_reachable, unreachable=oob_unreachable, satisfied=in_logic)
with self.subTest("Cutting Weapon + DEs", oob_logic=in_logic):
self.collect_by_name("Diamond Eye")
self.assertLocationReachability(reachable=de_reachable, unreachable=de_unreachable, satisfied=in_logic)
def test_real_axe(self) -> None:
in_logic = self.options["out_of_bounds"] == "logic"
# needs real Bronze Axe+, regardless of OoB
real_axe_required = [
"Drain",
"Drain Cave #180",
"Drain Cave #181",
]
also_des_required = [
"Double Drain",
]
with self.subTest("No Axe", oob_logic=in_logic):
self.collect_by_name("Gladiator Sword")
self.assertLocationReachability(reachable=real_axe_required, satisfied=False)
with self.subTest("Bronze Axe", oob_logic=in_logic):
self.collect_by_name("Bronze Axe")
self.assertLocationReachability(reachable=real_axe_required, satisfied=True)
with self.subTest("Knight Basher", oob_logic=in_logic):
self.remove_by_name("Bronze Axe")
self.collect_by_name("Knight Basher")
self.assertLocationReachability(reachable=real_axe_required, satisfied=True)
self.assertLocationReachability(reachable=also_des_required, satisfied=False)
with self.subTest("Knight Basher + DEs", oob_logic=in_logic):
self.collect_by_name("Diamond Eye")
self.assertLocationReachability(reachable=also_des_required, satisfied=True)
def test_oob_goal(self) -> None:
# still need Energy Core with OoB if sequence breaks are not in logic