Skip to content

Commit

Permalink
Pokemon Emerald: Fix incorrect access to slateport water encounters (A…
Browse files Browse the repository at this point in the history
  • Loading branch information
Zunawe authored May 7, 2024
1 parent e04db57 commit 76962b8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
19 changes: 16 additions & 3 deletions worlds/pokemon_emerald/data/regions/cities.json
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@
"REGION_SLATEPORT_CITY/MAIN": {
"parent_map": "MAP_SLATEPORT_CITY",
"has_grass": false,
"has_water": true,
"has_water": false,
"has_fishing": true,
"locations": [
"NPC_GIFT_RECEIVED_POWDER_JAR"
Expand All @@ -1279,9 +1279,9 @@
"EVENT_VISITED_SLATEPORT_CITY"
],
"exits": [
"REGION_SLATEPORT_CITY/WATER",
"REGION_ROUTE109/BEACH",
"REGION_ROUTE110/SOUTH",
"REGION_ROUTE134/WEST"
"REGION_ROUTE110/SOUTH"
],
"warps": [
"MAP_SLATEPORT_CITY:0/MAP_SLATEPORT_CITY_POKEMON_CENTER_1F:0",
Expand All @@ -1296,6 +1296,19 @@
"MAP_SLATEPORT_CITY:10/MAP_SLATEPORT_CITY_HOUSE:0"
]
},
"REGION_SLATEPORT_CITY/WATER": {
"parent_map": "MAP_SLATEPORT_CITY",
"has_grass": false,
"has_water": true,
"has_fishing": true,
"locations": [],
"events": [],
"exits": [
"REGION_SLATEPORT_CITY/MAIN",
"REGION_ROUTE134/WEST"
],
"warps": []
},
"REGION_SLATEPORT_CITY_POKEMON_CENTER_2F/MAIN": {
"parent_map": "MAP_SLATEPORT_CITY_POKEMON_CENTER_2F",
"has_grass": false,
Expand Down
2 changes: 1 addition & 1 deletion worlds/pokemon_emerald/data/regions/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -3294,7 +3294,7 @@
"locations": [],
"events": [],
"exits": [
"REGION_SLATEPORT_CITY/MAIN"
"REGION_SLATEPORT_CITY/WATER"
],
"warps": []
},
Expand Down
2 changes: 1 addition & 1 deletion worlds/pokemon_emerald/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def get_location(location: str):

# Slateport City
set_rule(
get_entrance("REGION_SLATEPORT_CITY/MAIN -> REGION_ROUTE134/WEST"),
get_entrance("REGION_SLATEPORT_CITY/MAIN -> REGION_SLATEPORT_CITY/WATER"),
hm_rules["HM03 Surf"]
)
set_rule(
Expand Down
5 changes: 5 additions & 0 deletions worlds/pokemon_emerald/test/test_accessibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def test_inaccessible_with_no_surf(self) -> None:
self.assertFalse(self.can_reach_entrance("REGION_ROUTE119/UPPER -> REGION_FORTREE_CITY/MAIN"))
self.assertFalse(self.can_reach_entrance("MAP_FORTREE_CITY:3/MAP_FORTREE_CITY_MART:0"))

# Slateport Access
self.collect_by_name(["HM06 Rock Smash", "Dynamo Badge", "Mach Bike"])
self.assertFalse(self.can_reach_region("MAP_SLATEPORT_CITY_WATER_ENCOUNTERS"))

def test_accessible_with_surf_only(self) -> None:
self.collect_by_name(["HM03 Surf", "Balance Badge"])
self.assertTrue(self.can_reach_location(location_name_to_label("ITEM_PETALBURG_CITY_ETHER")))
Expand All @@ -70,6 +74,7 @@ def test_accessible_with_surf_only(self) -> None:
self.assertTrue(self.can_reach_entrance("REGION_ROUTE119/UPPER -> REGION_FORTREE_CITY/MAIN"))
self.assertTrue(self.can_reach_entrance("MAP_FORTREE_CITY:3/MAP_FORTREE_CITY_MART:0"))
self.assertTrue(self.can_reach_location(location_name_to_label("BADGE_4")))
self.assertTrue(self.can_reach_region("MAP_SLATEPORT_CITY_WATER_ENCOUNTERS"))


class TestFreeFly(PokemonEmeraldTestBase):
Expand Down

0 comments on commit 76962b8

Please sign in to comment.