PKHeX/PKHeX.Core/Legality/Verifiers
Lusamine ab33df2fc9
Enforce weather legality for SWSH (#3221)
* Add weather types by location

Creates a dictionary of possible weather types for each SWSH location.
Unlisted locations may only have Normal weather or do not have any
encounter slots.

* Prune unused weather from static encounters

Some encounters were too permissive with weather, e.g. Sandstorm in
Fields of Honor and Challenge Beach; Snowstorm at Dyna Tree Hill.

A few crossover areas that would have limited the possible weathers were
marked with a "(c)". An example is Nidorina from Giant's Bed crossing
to Frostpoint Field, where Raining and Thunderstorm do not occur.

This additionally organizes encounters by location.

* Move location-weather dictionary to EncounterArea8

* Verify weather marks on encounterslot/static encounters

* Adds some static encounters available through weather bleed

Weathers aren't normally available, but these static encounters are
close enough to the boundary that the weather in an adjacent area can be
used to spawn them.

- Frostpoint Field Snorlax with Raining/Thunderstorm from Giant's Bed
- Snowslide Slope Amaura with Raining/Thunderstorm from Giant's Bed
- Frigid Sea Carracosta with Intense_Sun from Three-Point Pass
- Frigid Sea Magmortar with Intense_Sun from Three-Point Pass
- Ballimere Lake Corviknight with Snowstorm from Giant's Bed
- Ballimere Lake Cryogonal with Snowstorm from Giant's Bed
- Ballimere Lake Tyrunt with all weather from Giant's Bed
- Lakeside Cave Ferrothorn with all weather from Ballimere Lake
- Tunnel to the Top Golbat with all weather from Path to the Peak

* Defer weather marks if incompatible, enforce encounterslot weather

This uses the area weather to check fishing slots and tentatively adds
some tables for weather bleed encounterslots.

* Warm-Up Tunnel gets weather bleed from Training Lowlands

* Update for base PKHeX

* Handle weather bleed for SWSH encounter slots

Co-authored-by: Skadiv <62726360+Skadiv@users.noreply.github.com>

* Minor clean

Having duplicate weather marks is illegal, so just auto-partial match them instead of checking the other marks.

* Rearrange slot weather check logic

* Claim reserved byte in SWSH pkl

* No need for two variable names now

* Valid weather marks on tree/fishing should return with main weather

* Fix tree/fishing deferral and add another surf slot weather bleed

* Disallow tree/fishing encounters from using bleed tables

None are currently known at this time, and only hidden grass encounters
have a weather bleed table

* Condense bleed expression, combine tree/fish flag check

* Move weather-bleed check into EncounterArea8

Makes the dictionaries private instead of internal.

Co-authored-by: Skadiv <62726360+Skadiv@users.noreply.github.com>
2021-07-26 14:28:05 -07:00
..
Ability Change interface for method call to less restricted 2021-07-13 18:22:04 -07:00
Ball Minor clean 2021-05-29 15:31:47 -07:00
Ribbons Change interface for method call to less restricted 2021-07-13 18:22:04 -07:00
ConsoleRegionVerifier.cs this is not that 2020-12-21 17:12:39 -08:00
ContestStatVerifier.cs Flag contest stats if sheen is present on gen5+ origin 2021-02-27 20:02:18 -08:00
CXDVerifier.cs Simplify more expressions 2021-01-04 17:31:43 -08:00
EffortValueVerifier.cs Fracture the encounter matching checks to allow progressive validation (#3137) 2021-01-29 17:55:27 -08:00
FormVerifier.cs Track a PKM's Box,Slot,StorageFlags,Identifier metadata separately (#3222) 2021-06-22 20:23:48 -07:00
GenderVerifier.cs Minor clean 2021-01-16 12:01:40 -08:00
GroundTileVerifier.cs Revise EncounterArea and EncounterType for clarity (#3228) 2021-06-29 20:58:06 -07:00
HistoryVerifier.cs Change interface for method call to less restricted 2021-07-13 18:22:04 -07:00
HyperTrainingVerifier.cs this is not that 2020-12-21 17:12:39 -08:00
IndividualValueVerifier.cs Minor tweaks 2021-01-05 09:58:33 -08:00
ItemVerifier.cs Use more expression return style 2021-01-01 17:08:49 -08:00
LanguageVerifier.cs Change interface for method call to less restricted 2021-07-13 18:22:04 -07:00
LevelVerifier.cs Fracture the encounter matching checks to allow progressive validation (#3137) 2021-01-29 17:55:27 -08:00
MarkVerifier.cs Enforce weather legality for SWSH (#3221) 2021-07-26 14:28:05 -07:00
MedalVerifier.cs moar is or 2020-12-25 12:30:26 -08:00
MemoryPermissions.cs Minor tweaks 2021-07-22 19:08:56 -07:00
MemoryVerifier.cs Minor tweaks 2021-07-22 19:08:56 -07:00
MiscVerifier.cs Revise IsHOMEGift, check Card ID for gift date range 2021-07-13 18:22:04 -07:00
NHarmoniaVerifier.cs Minor clean 2021-01-10 18:15:33 -08:00
NicknameVerifier.cs Change interface for method call to less restricted 2021-07-13 18:22:04 -07:00
ParseSettings.cs Rewrite settings handling; enhance some user experiences (#3193) 2021-04-11 18:09:54 -07:00
PIDVerifier.cs Minor tweaks 2021-06-03 12:04:19 -07:00
TrainerNameVerifier.cs Change interface for method call to less restricted 2021-07-13 18:22:04 -07:00
TransferVerifier.cs Change interface for method call to less restricted 2021-07-13 18:22:04 -07:00
Verifier.cs Target type'd new 2020-12-21 17:17:56 -08:00