Incorporates files from #190
Skeleton added for future implementations; currently missing gifts,
encounter info, and the fine tuning that follows.
Basically sets up areas for future implementation... feel free to submit
pull requests filling in the EncounterStatic/EncounterTrade blocks with
the basic info. I'll probably focus on gen5->4->3 in terms of priority.
Encounter slots need to be marked up for encounter slot legality (yay
32bit RNG), and will be used for PIDIV detection too.
XD/C is not in this round of implementation. Pretty much every pkm 3-5
will show up as invalid until this round of dev is finished.
Remove duplicated SAV pkm set method (byte[] instead of PKM, was unused.
All it did was getPKM(decryptPKM(data)).)
Tweak Seen/Caught count expression body to use the HasPokeDex bool, as
GB(A) games did not use the PokeDex int offset. Things were simpler back
then :)
Remove unnecessary toarrays
fix 3->4 items being deleted even if they were valid
be nice and allow held item to transfer 4->5 if it can still be held
invert purification values, heart gauge is [-100,0] not [0,100]
Add ability to get SeenCount & CaughtCount
switch gen1/2/3 get/set to use int species (since that's all they end up
using), removes the need to create a pk6 template for setting the flag
via the dex editor.
lowest 4 bits are used for something else; stamps are bits 4-18
exposes wardrobe (fashion item list) as a tuple (IsOwned, IsNew)
reduce nesting in tr7, add comment on fashion bitflag setup, inb4
someone sets it the array to 01 and crossdresses ;)
Legends weren't in inherit table (no breeding)
Move lineage fetch into check so that it is not calculated & unused for
other pkms
Instead of iterating over inherit table, just use a precomputed list
only 5 possible encounters are stored in the int[], there's more cases
where heavy ball is invalid but there's no possible encounter for them
which would already be flagged by another check.
Apply same logic to PKM exporting; the existing setup was manually
triggering validation by changing focus; now just call the
ValidateChildren method on the form.
Closes#936
Thanks @Storm-Eagle20 !
Closes#860 by adding in prompt for Gen1 saves to determine if the save
originated from VC. Will disable Gen2 legality sources when checking pk1
files.
--
Fixes froslass/gallade evolution tree pruning movesets. For whatever
reason, the level argument of the Evolution is not 0 when using the
item; I manually edited the evos_sm.pkl binary to set the 2 evolutions
from [XX] -> 00.
Fixes gen1 ingame trades slipping through the getEncounter12 preference.
Gen2 has set TIDs, so check if TID is set.
Loosens checks for Gen7 trades (including prior transfers) as trading
between games clears the memory.
Add 3 more g7 trainer stat records too.
Thanks Holla!
--
Add getMoves(100) optimization as gen7 learnsets can grab 1->100, better
than looping over the range every time it's checked.
Use actual max record type
65535 is unused (no type=4), there's one 6 hidden in there 👍
I noticed there's some copying to Festa stats going on (see
Savedata::AddRecord)
6 "Pokemon Caught"
8 "Eggs Hatched"
33 "Trades at the GTS"
100 "Champion Title Defense"
173 "Bubbling Spot Encounters/Items"
175
176
177
182
183
Looks like the setter increments data over at the Festa block if the
active Mission is the recordID.
Rather than re-mapping the other pkm format language IDs, just make GC
games conform to the main series for uniform handling.
Closes#935
Thanks @javierhimura!
Also fix gen1/2 evo tree trimming error, thanks BeyondTheHorizon!
Also fix an exception when no static encounter can be generated for
1->7, match is now generated by checking gen1 and reusing the static
encounter creation info (now moved to core).