Pokemon Emerald: Change Lilycove access logic #3277
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this fixing or adding?
There's a sort of happy accident in the region connections between Lilycove City and Route 124.
REGION_ROUTE124/MAIN
should connect toREGION_LILYCOVE_CITY/SEA
, but it's instead connected toREGION_LILYCOVE_CITY/MAIN
. It should probably have also had a rule on it preventing traversal from east to west if there are wailmer there, just as you're prevented from going west to east if there are wailmer there.It was unknown to me until recently, but that is, in fact, how the game behaves. The wall does not exist until you load the map on the west side. Then when you clear the story events that remove it, it goes away again. This would have potentially caused a softlock except that the only way to cross from east to west is to have flown (fast traveled) to a city on the east side via your free fly location. And once you've loaded the wall, you have the ability to fly to Lilycove again as well.
So nothing about the current behavior actually causes any problems, but it's so obscure and unintuitive that I'm going to fix it anyway. I thought about waiting until I could find a way to block you in the game as well, but it turns out to not be trivial, and out of logic access isn't a big deal.
So this changes logic to assume the Lilycove wailmer are a 2-way wall. And it adds some tests that I wrote while checking it.
How was this tested?
New test. Generated a game.