Pokemon Emerald: Change Lilycove access logic (#3277)
* Pokemon Emerald: Change logical access to lilycove from east * Pokemon Emerald: Add tests
This commit is contained in:
parent
76962b8b3b
commit
0f1b16d640
|
@ -2475,7 +2475,7 @@
|
|||
],
|
||||
"events": [],
|
||||
"exits": [
|
||||
"REGION_LILYCOVE_CITY/MAIN",
|
||||
"REGION_LILYCOVE_CITY/SEA",
|
||||
"REGION_MOSSDEEP_CITY/MAIN",
|
||||
"REGION_UNDERWATER_ROUTE124/BIG_AREA",
|
||||
"REGION_UNDERWATER_ROUTE124/SMALL_AREA_1",
|
||||
|
|
|
@ -994,6 +994,10 @@ def set_rules(world: "PokemonEmeraldWorld") -> None:
|
|||
get_entrance("REGION_LILYCOVE_CITY/SEA -> REGION_ROUTE124/MAIN"),
|
||||
lambda state: state.has("EVENT_CLEAR_AQUA_HIDEOUT", world.player)
|
||||
)
|
||||
set_rule(
|
||||
get_entrance("REGION_ROUTE124/MAIN -> REGION_LILYCOVE_CITY/SEA"),
|
||||
lambda state: state.has("EVENT_CLEAR_AQUA_HIDEOUT", world.player)
|
||||
)
|
||||
|
||||
# Magma Hideout
|
||||
set_rule(
|
||||
|
|
|
@ -77,6 +77,25 @@ class TestSurf(PokemonEmeraldTestBase):
|
|||
self.assertTrue(self.can_reach_region("MAP_SLATEPORT_CITY_WATER_ENCOUNTERS"))
|
||||
|
||||
|
||||
class TestModify118(PokemonEmeraldTestBase):
|
||||
options = {
|
||||
"modify_118": Toggle.option_true,
|
||||
"bikes": Toggle.option_true,
|
||||
"rods": Toggle.option_true
|
||||
}
|
||||
|
||||
def test_inaccessible_with_nothing(self) -> None:
|
||||
self.assertFalse(self.can_reach_location(location_name_to_label("NPC_GIFT_RECEIVED_GOOD_ROD")))
|
||||
|
||||
def test_inaccessible_with_only_surf(self) -> None:
|
||||
self.collect_by_name(["HM03 Surf", "Balance Badge"])
|
||||
self.assertFalse(self.can_reach_location(location_name_to_label("NPC_GIFT_RECEIVED_GOOD_ROD")))
|
||||
|
||||
def test_accessible_with_surf_and_acro_bike(self) -> None:
|
||||
self.collect_by_name(["HM03 Surf", "Balance Badge", "Acro Bike"])
|
||||
self.assertTrue(self.can_reach_location(location_name_to_label("NPC_GIFT_RECEIVED_GOOD_ROD")))
|
||||
|
||||
|
||||
class TestFreeFly(PokemonEmeraldTestBase):
|
||||
options = {
|
||||
"npc_gifts": Toggle.option_true,
|
||||
|
@ -100,6 +119,26 @@ class TestFreeFly(PokemonEmeraldTestBase):
|
|||
self.assertTrue(self.can_reach_location(location_name_to_label("NPC_GIFT_RECEIVED_TM_BRICK_BREAK")))
|
||||
|
||||
|
||||
class TestLilycoveFromEast(PokemonEmeraldTestBase):
|
||||
options = {
|
||||
"modify_118": Toggle.option_true,
|
||||
"bikes": Toggle.option_true,
|
||||
"free_fly_location": Toggle.option_true
|
||||
}
|
||||
|
||||
def setUp(self) -> None:
|
||||
super(PokemonEmeraldTestBase, self).setUp()
|
||||
|
||||
# Swap free fly to Mossdeep
|
||||
free_fly_location = self.multiworld.get_location("FREE_FLY_LOCATION", 1)
|
||||
free_fly_location.item = None
|
||||
free_fly_location.place_locked_item(self.multiworld.worlds[1].create_event("EVENT_VISITED_MOSSDEEP_CITY"))
|
||||
|
||||
def test_lilycove_inaccessible_from_east(self) -> None:
|
||||
self.collect_by_name(["HM03 Surf", "Balance Badge", "HM02 Fly", "Feather Badge"])
|
||||
self.assertFalse(self.can_reach_region("REGION_LILYCOVE_CITY/MAIN"))
|
||||
|
||||
|
||||
class TestFerry(PokemonEmeraldTestBase):
|
||||
options = {
|
||||
"npc_gifts": Toggle.option_true
|
||||
|
|
Loading…
Reference in New Issue