egg moves also can be taught in gen1, which causes the learn source to
be locked to a tradeback (removing egg moves that have IDs greater than
RBY's moves). Simplify gen<=2 parse preference ordering with this
addition to force egg moves to be acknowledged.
only tested for gen7 egg->pkm (not to eventual set)
pretty sure a good chunk of the egg generation logic can be pulled out
for reuse in other IEncounterable generators (IEncounterable
extensions?)
Test parsing glaceon, input must equal output
Test generating encounters for a specific version (exists only on Moon)
Test generating encounters for the same version (add handling trainer
data to permit Tutors)
fixes error in VC generations-present fetch which allowed movesets from
generations 3-6 lul
exclude negative/invalid gameversions
party stats set when setting a slot to a save file
simplify set/delete slotchange duplicate logic
suggest better met locations beyond VC transfers
hatching a gen6 egg applies memories automatically
Two checks are performed for Gen 3 & 4:
A: Encounterability (wurmple, ball, ability)
B: RNG Compatibility (frame)
Original code only checked 'A'
Recent code ordered by 'A', but returned anything that matched 'B'. If
'B was not satisfied, an 'A' match would get deferred, allowing for an
eventual B & !A to be returned before a A & !B being returned.
yay bool logic
we want to prefer a RNGFrameMatch as well as a SlotCompatible match
original code (no RNG checks) retrieves with SlotCompatible just fine
recent adding in framematch resulted in deferring compatible if not RNG
frame, yielding !A matches before A & !B
maintain 3 queues (A & B get yielded immediately) to track A!B, !AB, and
!A!B
not necessary to check unown case anymore as it'll fall into the A!B
group. better performant to skip that check in favor of only adding for
fail.
thanks theSlayer!
Gen5 does not follow the same convention, 0 = non, 1 = rnd, 2 = always;
not gonna bother updating for just that one
bool? occupies 2 bytes; enum:byte is 1 byte.
should probably move validity checking logic into the IEncounterable
objects instead...
faster to do:
null check & comparison for each
vs
collection add (especially if growing collection)
don't evaluate all slots (faster), capturing the dexlevel[] object is
fine until the enumerable is discarded
WinForms->Core logic absorbing (CommonEdits)
loading ShowdownSet now applies properties to PKM instead of PKMEditor
Contest/IVs for Static/Trades are no longer set by default (less object
allocations), and are now checked by the encounter generator
great job gamefreak
allow current handler to be 0, remove static encounter as the data was
sneakily faked as a WC7 in the events gallery.
Closes#1817 ; still needs to update with new pikachu pid method
allowing shinies (next update).