Launching from args sets the Environment.CurrentDirectory to that of the
files that launched the program; instead we want the
Application.StartupPath (where the exe is, which is where our backup
files are).
Closes#948
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 ;)
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.
Tweak batch editor behavior to show Any first (used by any pk* type),
sort alphabetically too. Highlights the propertytype text if the
property is not present for the type.
Fix form1 offset for getter
move formNames into check (only fetch if forms exist for the dex
entries)
Add all forms to seen side when seen is toggled (behaves like gender)
Fix exceptions / insufficient behavior in pokedex4
change gen2 tutor name to be consistent with other gen variable names
replace gen2 trade checkresult with nothing as all properties are
already checked.
only use it when repopulating move legality
skip repopulation when clicking moves or met location since it's updated
at the end of the respective method
ResetBoxes reduce method calls for new blank/setting, just set data.
160ms->4ms
ComboBox Validation calling SelectedText.Length=0 no longer needed 3y
after it was originally added.
268ms->0ms
speeds up main thread by a third of a second (wowww), but the
selectedtext removal makes the program snappier during regular use
(loading/modifying)
Closes#919
Properties fetched would return PKM.cs properties (not declared in XK3
or PK3), such as Hidden Power Type.
The setter for Hidden Power type is unused everywhere, but was called
via reflection on transfer away from xk3/ck3 format. This caused IVs to
be tampered with in most cases.
By only fetching Declared properties (ie, within XK3.cs only), only the
'real' shared properties will be transferred. Extending this to the
batch editor, we can use this Declared-only filtering to grab more pkm
formats. While things are being updated, throw in pk1/pk2/bk4/ck3/xk3
formats to the dropdown.