Pokemon Emerald: Fix scorched slab missing surf requirement (#2465)
This commit is contained in:
parent
cb0412e011
commit
3619abc7ca
|
@ -1074,19 +1074,29 @@
|
||||||
"events": [],
|
"events": [],
|
||||||
"exits": [
|
"exits": [
|
||||||
"REGION_FORTREE_CITY/MAIN",
|
"REGION_FORTREE_CITY/MAIN",
|
||||||
"REGION_ROUTE120/NORTH_POND",
|
"REGION_ROUTE120/NORTH_POND_SHORE",
|
||||||
"REGION_ROUTE120/SOUTH"
|
"REGION_ROUTE120/SOUTH"
|
||||||
],
|
],
|
||||||
"warps": []
|
"warps": []
|
||||||
},
|
},
|
||||||
"REGION_ROUTE120/NORTH_POND": {
|
"REGION_ROUTE120/NORTH_POND_SHORE": {
|
||||||
"parent_map": "MAP_ROUTE120",
|
"parent_map": "MAP_ROUTE120",
|
||||||
"locations": [
|
"locations": [
|
||||||
"ITEM_ROUTE_120_NEST_BALL"
|
"ITEM_ROUTE_120_NEST_BALL"
|
||||||
],
|
],
|
||||||
"events": [],
|
"events": [],
|
||||||
"exits": [
|
"exits": [
|
||||||
"REGION_ROUTE120/NORTH"
|
"REGION_ROUTE120/NORTH",
|
||||||
|
"REGION_ROUTE120/NORTH_POND"
|
||||||
|
],
|
||||||
|
"warps": []
|
||||||
|
},
|
||||||
|
"REGION_ROUTE120/NORTH_POND": {
|
||||||
|
"parent_map": "MAP_ROUTE120",
|
||||||
|
"locations": [],
|
||||||
|
"events": [],
|
||||||
|
"exits": [
|
||||||
|
"REGION_ROUTE120/NORTH_POND_SHORE"
|
||||||
],
|
],
|
||||||
"warps": [
|
"warps": [
|
||||||
"MAP_ROUTE120:1/MAP_SCORCHED_SLAB:0"
|
"MAP_ROUTE120:1/MAP_SCORCHED_SLAB:0"
|
||||||
|
|
|
@ -615,13 +615,17 @@ def set_rules(world: "PokemonEmeraldWorld") -> None:
|
||||||
|
|
||||||
# Route 120
|
# Route 120
|
||||||
set_rule(
|
set_rule(
|
||||||
get_entrance("REGION_ROUTE120/NORTH -> REGION_ROUTE120/NORTH_POND"),
|
get_entrance("REGION_ROUTE120/NORTH -> REGION_ROUTE120/NORTH_POND_SHORE"),
|
||||||
lambda state: state.has("Devon Scope", world.player)
|
lambda state: state.has("Devon Scope", world.player)
|
||||||
)
|
)
|
||||||
set_rule(
|
set_rule(
|
||||||
get_entrance("REGION_ROUTE120/NORTH_POND -> REGION_ROUTE120/NORTH"),
|
get_entrance("REGION_ROUTE120/NORTH_POND_SHORE -> REGION_ROUTE120/NORTH"),
|
||||||
lambda state: state.has("Devon Scope", world.player)
|
lambda state: state.has("Devon Scope", world.player)
|
||||||
)
|
)
|
||||||
|
set_rule(
|
||||||
|
get_entrance("REGION_ROUTE120/NORTH_POND_SHORE -> REGION_ROUTE120/NORTH_POND"),
|
||||||
|
can_surf
|
||||||
|
)
|
||||||
|
|
||||||
# Route 121
|
# Route 121
|
||||||
set_rule(
|
set_rule(
|
||||||
|
|
|
@ -11,6 +11,37 @@ class TestBasic(PokemonEmeraldTestBase):
|
||||||
self.assertTrue(self.can_reach_location(location_name_to_label("ITEM_ROUTE_115_SUPER_POTION")))
|
self.assertTrue(self.can_reach_location(location_name_to_label("ITEM_ROUTE_115_SUPER_POTION")))
|
||||||
|
|
||||||
|
|
||||||
|
class TestScorchedSlabPond(PokemonEmeraldTestBase):
|
||||||
|
options = {
|
||||||
|
"enable_ferry": Toggle.option_true,
|
||||||
|
"require_flash": Toggle.option_false
|
||||||
|
}
|
||||||
|
|
||||||
|
def test_with_neither(self) -> None:
|
||||||
|
self.collect_by_name(["S.S. Ticket", "Letter", "Stone Badge", "HM01 Cut"])
|
||||||
|
self.assertTrue(self.can_reach_region("REGION_ROUTE120/NORTH"))
|
||||||
|
self.assertFalse(self.can_reach_location(location_name_to_label("ITEM_ROUTE_120_NEST_BALL")))
|
||||||
|
self.assertFalse(self.can_reach_location(location_name_to_label("ITEM_SCORCHED_SLAB_TM11")))
|
||||||
|
|
||||||
|
def test_with_surf(self) -> None:
|
||||||
|
self.collect_by_name(["S.S. Ticket", "Letter", "Stone Badge", "HM01 Cut", "HM03 Surf", "Balance Badge"])
|
||||||
|
self.assertTrue(self.can_reach_region("REGION_ROUTE120/NORTH"))
|
||||||
|
self.assertFalse(self.can_reach_location(location_name_to_label("ITEM_ROUTE_120_NEST_BALL")))
|
||||||
|
self.assertFalse(self.can_reach_location(location_name_to_label("ITEM_SCORCHED_SLAB_TM11")))
|
||||||
|
|
||||||
|
def test_with_scope(self) -> None:
|
||||||
|
self.collect_by_name(["S.S. Ticket", "Letter", "Stone Badge", "HM01 Cut", "Devon Scope"])
|
||||||
|
self.assertTrue(self.can_reach_region("REGION_ROUTE120/NORTH"))
|
||||||
|
self.assertTrue(self.can_reach_location(location_name_to_label("ITEM_ROUTE_120_NEST_BALL")))
|
||||||
|
self.assertFalse(self.can_reach_location(location_name_to_label("ITEM_SCORCHED_SLAB_TM11")))
|
||||||
|
|
||||||
|
def test_with_both(self) -> None:
|
||||||
|
self.collect_by_name(["S.S. Ticket", "Letter", "Stone Badge", "HM01 Cut", "Devon Scope", "HM03 Surf", "Balance Badge"])
|
||||||
|
self.assertTrue(self.can_reach_region("REGION_ROUTE120/NORTH"))
|
||||||
|
self.assertTrue(self.can_reach_location(location_name_to_label("ITEM_ROUTE_120_NEST_BALL")))
|
||||||
|
self.assertTrue(self.can_reach_location(location_name_to_label("ITEM_SCORCHED_SLAB_TM11")))
|
||||||
|
|
||||||
|
|
||||||
class TestSurf(PokemonEmeraldTestBase):
|
class TestSurf(PokemonEmeraldTestBase):
|
||||||
options = {
|
options = {
|
||||||
"npc_gifts": Toggle.option_true
|
"npc_gifts": Toggle.option_true
|
||||||
|
|
Loading…
Reference in New Issue