Closes#1933
if not allowed to be genderless, flag as invalid gender
only permit valid genders after genderless is ruled out
(both done by checking the low bit)
Store 4g giratina held item for enc->pkm legality
revise usages of GetSaneGender
Rearrange some logic
Better handle impossible version encounters (gen4)
gen 1-5 done, stuck on 659 - bunnelby egg...?
updating HP causes SPD to be updated, which is based on SPA; since SPA
is yet to be updated, we trigger constant updates on an SPA > 15 until
we crash.
just use the SPD IV which is already capped by the pkmdata
(this shouldn't refresh fields anyway when loading... whatever).
Closes#1914
Closes#1912 , genderless ~= fixed gender I guess; shouldn't get these
gender-errors unless it's manually tampered data/ShowdownSet
remove unnecessary code in:
* PKMEditor (>=255 is already covered by == 255 and the fact that gt is
always <= 255)
* VerifyGender (3 <= x <= 5) check is already early-returned via
PIDGender check above
Update IsGenderValid knowing that VC mons have a gennumber <= 2
Similar to LegalityCheckStrings
no resource files yet, will generate those tomorrow(?)
some strings are not translatable (useless gen6 passerby export text),
not really worth
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
invalid/unknown usages were incorrectly interchangable; dex-sets were
looking at Unknown which was impossible for some cases.
only use GameVersion.Unknown as a temp placeholder for later resolution
by the user.
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
extract common nature amp logic
generic ienumerable copyto which now returns count of elements copied
(maybe useful later). prior usages never tried to copy an enumerable
larger than the dest array (now length checked).
only way the filter used to execute was if ESV textbox was empty, which
would throw an exception lul
sync dead code removal for prior pkrs commit (never executes)
475acfaeac
fix bk4 ribbon checks (lacked interface inheritance)
change MN -> UM for get blank save (unused in PKHeX solution)
prevent inheriting from derived pkm classes
get language list now doesn't return new objects (or re-enumerate)
update rand usage to be inclusive for top bound, extend shuffle to
collections
remove unnecessary location overrides (already overriden in legal fetch)
pull out transfer locations to const references
add vc2 & crown beast/celebi met location suggesting
add vc2 crystal sensitive detection
add 2 more usum trainer stats (thanks holla!)
closes#1550 , mgdb/pkmdb throw unconverted files which need conversion;
move main file load conversion to a reusable method and have pkmeditor
call it on every load.
add skip argument to ignore the conversion check (ie if the file is
loaded from an undoubtedly same type source).
PreparePKM had the opportunity to be recursive (preparation ->
validating*N -> preparation*N), lock out preview sprite updating (which
calls PreparePKM via Main.cs) while validating all controls
remove uncallable paths (format is checked prior, and checksum check is
never called as fieldsInitialized is forced false)
move gui toggling to loading methods when appropriate
pkm is not restricted from ORAS (etc) values when on an XY (etc) save
file; use the save file maxes and indication values.
no reference to the pkm anymore!
Closes#1546
natures (>25) are invalid and causes IndexOutOfRangeException due to
being greater than the length of the array.
sanity check array length and amped stat prior to applying amplification
Closes#1515
extract pkm loading routines to smaller methods
reduce code duplication (rely on empty setters to ignore some calls)
should be much easier to understand the load/save process; the original
setup (pk6) was following the structure from 0x00-end, no point still
doing that as everything is now abstracted.
expose some useful IEnumerable methods (sorting / bin->pkm / copy) to
simplify some common operations
change some explicit arrays to IList for flexibility
remove old memecrypto bool (no longer necessary as XP is not supported)
rename some methods for more clarity
* allow gen2 to have evolutions on gen1 when transferred to gen7
(Core.cs)
* handle korean strings on transfer slightly better (pk2.cs)
* auto-set johto location when changing game ID
* auto-detect VC saves (all have extensions with .dat)
Closes#1478 , thanks @NinFanBoyFTW !
setting the string to the control causes it to update, use the
changingFields to prevent this update from happening until we want to
(via UpdateIVs)
Closes#1444
Allows evolution met level check to be skipped
Adds minimum level constraint for evolution chain generating
Closes#1430
also adds deferral to the gen3 encounter generator as encounterstatic
gifts can collide with wild encounters when transferred
fix early-verification (introduced in 9864d84), just invert the
fieldsLoaded check. No longer interrupts the pkm loading routine when
changing game locations
fix stadium check (accidentally inverted in bfdf1c5)
Closes#1398Closes#1397
Reduce memory usage for evo method banlist (static banlist references)
Fix gen6 mega evo flag truncation
simplify QR encode/decode logic a little
Don't apply transparency if transparency is already 100% (skip the loop)
Add gen5 wild pid/tid-sid correlation check
Fix validation value reset (loading gen3-4 pkm without looking at met
tab causes the met location to get reset); fixed by prematurely
validating before setting the value
Fix gen3 pkm with gen4 contest ribbons in gen4/5 getting flagged
incorrectly
Closes#1349
Add egg memory wiping when ticking as egg,
Add egg memory setting when suggesting encounter info.
Closes#1350
I'd rather have it this way as to not do cross-tab auto edits that the
user may miss.
necessary for reflection property transferral (ie language)
indirectly fixes mixed-bit properties (ie altform/gender) as they are
reversed bits relative to pk4.
Detect channel, only detect Channel PIDIV for RS origin (only really
care about method1/2/4 being used when it shouldn't)
Channel does this weird thing called not setting the met level.
Refactor set suggested met location to a method that can suppress
popups.
Similar to how anything higher than 255 is dropped to 100, setting level
to 0 will overwrite it to 1. Current level is just a derived property
from EXP, so it's just a display property in the editor.
Toggling IsEgg for gen4 won't flag as nicknamed.
#1257
Rewrote showdown set exporting to be much clearer, added auto-fixing of
relearn moves when importing showdown set (applies suggested relearn
moves)
Simplified main form loading routine (from ~160 to ~25 by extracting
methods)