Fix misc refactoring errors
Don't early abort gen4->5+ encounter generation (need to check ingame
trades for abra/gengar). Can avoid by PID dictionary to check for trades
first, but unimplemented.
Closes#1377 , not fixing Pokewalker PID mismatch as algorithm needs to
be ironed out separately.
shifts encounter data from Legal's split tables to individual files for
easier maintenance and initialization. Legal Core's init is so much
simpler now.
fix resource name typo
PGF for movie victini has OTgender=3; only eggs are supposed to set OT
details from the SAV.
update pattern matchers to abuse this fact.
Thanks @odaxis !
Rarely ever used, the only case where an unfavorable match is returned
first is Emerald Lati@s transferred to a future generation, as there are
2 encounters (one with and one without Fateful).
Closes#1326
Thanks @sora10pls !
supply met level so the static encounter has a level to work with
instead of 0
Closes#1316
in other areas:
level 48 charizard VC1 transfer changed to mewtwo causes minlvl >
maxlevel, handle instead of throwing exception.
* Added location to encounter slot to make verification againts the location of the encounter when the pokemon has lost met location, like generation 2 heabutt tree, jhoto surfing in route 45 and in the future generation 4 munchlax tree
Added version to generation 1 and 2 encounter locations to filter by catch rate based of the version of the encounter and check initial moves of the encounter only for the game that match the encounter
Filter generation 2 pokemon for crystal who have met location based of the time of day when it was captured
Completed version to static and traded encounters for gen 1 pokemon, to avoid check a red encounter with yellow initial moves, if an encounter is possible in both games with diferent moves it is duplicated (like eevee), if it is possible in both games with the same moves is left as RBY, the encounter will only use red/blue moveset
Verify some invalid gen 2 encounters. Crystall heabutt encounters based on the TID, using the tree selection algorithm of the game to determine if the encounter is possible for the TID (implemented base on https://bulbapedia.bulbagarden.net/wiki/Headbutt_tree#Mechanics). Coordinates of Crystal trees obtained with the programa G2Map
Added checks for fishing encounters for unreacheable water tiles in gen 2, route 14, national park and the beta safari zone.
* Fix gen 1 static encounters and trade encounters filter by version
* Missing strings
* Fixes various gen 3 event templates.
* Adds more checks to PokePark 2005 eggs for DS Download Play.
* Fixes various gen 3 event checks. Still missing japanese events, but will add those another time.
* Adds 10 ANIV Celebi.
* Fixes PCJP 2003 eggs. Still doesn't use the exact formula though, but BACD-R is something to start with.
Add special ribbon detection (for wc3),
speed up seeds from IVs calc (flip top bit of seed to get the result for
other iteration)
Add a bunch of gen3 event data
Switch encounter slot generator to yield style to not require the entire
method to finish iterating
Although the pressure slot may be best-matching, it isn't the typical
match. Defer pressure slot clone to the end (defers the orderby
calculation)
There's probably a better way to do the pre-work (gen 5+ only operate
off one encounterarea... usually. Past Gens end up repeating the same
work for each area tested
slot matching runs slightly faster now due to the deferred execution
reduce 'as' usages for pk1 (cast & check once)
reorder some slot generation checks (early return prior to slot
filtering; not crucial as the linq wasn't evaluated yet).
Closes#1257
Disallow static encounters that aren't eggs or are for eggs (mismatch)
Check egg encounter level for IsWithinRange
Check egg met level while still is egg
Previous approach was 'most likely to find valid', this approach is a
little greedier to try to find a more fitting match. Will result in a
small increase in computation time, but trying out EncounterTrades and
static encounters first is preferred.
Fix Rhydon ingame trade gender. Bulbapedia is wrong, that's a Male
Rhydon with those IVs.
All gens that store version number do not change the version ID on
trade/hatch; this info is preserved and can directly imply which game
generated the egg.
the 'version' is ignored anyway, just useful to track for gen2 eggs.
More elegant handling for PKM without nicknames that have another
language species name; use that language ID instead of the pkm's
language ID. Since ToLower is not called, Ho-Oh from 3/4->6 now
transfers correctly.
fix gen3 encounterstatic eggs while still on gen3 games; only check the
egg location if still an egg
tighten up gen3 PIDIV compatibility checks, roamer glitch is fixed on
Emerald, and static encounters can't get method 2, and can only have
method 4 if under software emulation (RS Box) since the emu speed is
faaaaast 🚤 /s
Fixes HGSS egg moves, and improves encounter detail detection.
example: togepi from FRLG transferred up, old detection couldn't
differentiate the gift egg from a regular egg; however, PIDIVs can lend
a hand -- eggs don't have a PIDIV!
fixed shiny BACD spread detection (in regards to antishiny rerolls).
Shiny WISHMKR now detected correctly.
Add exclusion for gen3/4 balls since met location requires a less
precise match; static encounters will never be in safari/sport balls.
Fix wurmple species ref, isn't smeargle
eevee gen7 egg has no moves; always generate eggs first for gen4+
Closes#1179Closes#1176 (prior commit)
there's probably a better way to optimize this (don't check wild
encounters if 100% sure it's an egg); best left for future optimization
since it's working fine atm.