Commit graph

64 commits

Author SHA1 Message Date
Kurt
c006c0cad9 Update pid/ect on showdownset import
closes #1745
2018-01-06 09:35:22 -08:00
Kurt
985883e6ae Refactoring
pull out ability list generating
refactor showdown set to an Action that can be overwritten from
elsewhere
2017-12-21 22:55:33 -08:00
Kurt
9429bc6961 Fix showdown import on gen3
https://projectpokemon.org/home/forums/topic/43126-problems-with-importing-rse-showdown-files-from-clipboard-in-pkhex/

Sceptile @ Leftovers
EVs: 4 Def / 252 SpA / 252 Spe
Timid Nature
- Leaf Blade
- Leech Seed
- Substitute
- Hidden Power Ice

also fix apricorn form title
2017-12-19 15:33:23 -08:00
Kurt
18796d6f92 Misc tweaks
fix bk4 ribbon checks (lacked interface inheritance)
change MN -> UM for get blank save (unused in PKHeX solution)
prevent inheriting from derived pkm classes
2017-12-16 14:11:41 -08:00
Kurt
e5aa39a6bb Refactoring
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)
2017-12-14 20:58:55 -08:00
Kurt
d57b5a343a sync missing change
nj resharper; changed sig -> didn't update
2017-11-22 22:06:08 -08:00
Kurt
b8a5657d5a misc tweaks
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!)
2017-11-22 21:45:30 -08:00
Kurt
1e5fc96e8e fix gs met location errors
override current location if format is GB
update GS transfer location ID
2017-11-20 09:11:37 -08:00
Kurt
2970348de6 fix vc transfer location suggesting
also fix linux builds case sensitivity
2017-11-19 20:35:36 -08:00
Kurt
a39f92cac6 Add rockruff forme list items
revert form selection filtering, screwed up scatterbug and other
forced-forme lists. behavior works fine without the list filtering
2017-11-10 04:01:36 -08:00
Kurt
b3436cb791 Add totem forms selection/spritemod and req changes 2017-11-09 21:52:11 -08:00
Kurt
24121553b4 Add savegame sensitive pkm legality checking
uses the forme count of the savefile (rather than a futureproofed
same-gen forme count)
Closes #1559
2017-11-06 19:31:24 -08:00
Kurt
021ecbfe47 move pkm load compat check to pkmconverter
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).
2017-10-28 14:26:27 -07:00
Kurt
32abc6daf4 speed up pkm loading slightly
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
2017-10-25 19:37:31 -07:00
Kurt
3458924446 Restrict data sources per savefile not pkm
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
2017-10-24 21:06:21 -07:00
Kurt
515a694afa Add LanguageID enum
no functional change, just less-magic-numbers for easier to understand
src
2017-10-22 21:01:08 -07:00
Kurt
f85910abe2 Show Time of Day for gen2
apparently both controls were hidden
also hide encountertype control panel when not applicable (shifts time
of day up beneath other controls)
2017-10-20 19:53:38 -07:00
Kurt
762b55e957 handle invalid nature stat amps
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
2017-10-06 18:44:14 -07:00
Kurt
a9892203c7 Refactoring
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.
2017-10-02 23:13:40 -07:00
Kurt
1e377c2963 interpolation++
no functional change (assumed)
2017-09-29 22:58:25 -07:00
Kurt
ed1b934374 Misc refactoring
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
2017-09-28 22:20:27 -07:00
Kurt
c270479bf9 Show SID7 on hover
Closes #1494
2017-09-26 23:14:29 -07:00
Kurt
da8ba46d22 Fix gen1/2 shinify/gender change behavior
Closes #1488
also fixes female->shinify starters not flipping back to male gender
(changingFields was set back to the same value)
2017-09-23 16:50:38 -07:00
Kurt
6e579abfc3 Misc changes
* 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 !
2017-09-22 17:54:43 -07:00
Kurt
3a3ffe0d00 Fix hacked stats clearing on save
UpdateStats would ovewrite stats when saving a pkm; only overwrite stat
values if hacked stats is not checked or no stats have been loaded yet.
2017-09-22 16:03:51 -07:00
Kurt
b63e53af95 misc tweaks
no functional changes
2017-09-19 23:19:22 -07:00
Kurt
863220655e gen1/2 shiny button fix
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
2017-09-06 17:10:15 -07:00
Kurt
cbda637981 Remove old (GF fixed) shiny correlation
Transporter was updated
2017-09-06 09:12:56 -07:00
Kurt
492e378101 Disable auto-hyper on showdown import (lvl 100)
only hyper train if currently loaded pkm is level 100 (can be hyper
trained).
closes #1439
2017-09-04 19:01:04 -07:00
Kurt
229d752d7a Update showdown form parsing
Closes #1437 (should have been handled in PKHeX.Core not winforms);
extracted the two sanitization methods and sprinkled in some c#7
2017-09-02 08:26:51 -07:00
Kurt
072f1ba83d Refactor level-evolution checks slightly
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
2017-08-28 18:12:57 -07:00
Kurt
41482af052 Add auto hyper train on showdown set import 2017-08-27 20:39:11 -07:00
Kurt
183164a197 Add batch edit pk1/2 .PID=$shiny
Closes #1419
2017-08-25 17:44:15 -07:00
Kurt
37c858b6ad Update validation tweak
prior commit reverted incorrect behavior fix, force something within the
control to validate (not everything else)
2017-08-17 16:43:54 -07:00
Kurt
cadf3134d9 Misc fixes
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 #1398
Closes #1397
2017-08-16 22:12:28 -07:00
Kurt
9864d84704 Misc fixes/improvements
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
2017-08-13 00:21:42 -07:00
Kurt
07690e2919 Unhide language for gen1/2 saves
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.
2017-08-05 20:30:33 -07:00
Kurt
2d18440445 Fix wurmple evo gen3/4
yeah it was never the lowest 16 bits as every-internet-source claims.

1D9C9130 silcoon => 3716[8] = cascoon (nope)
#1330 was correct!
2017-07-17 15:58:15 -07:00
Kurt
569873701b Fix antishiny 3-5=>6+ check
uint SID = Util.ToUInt32(TB_TID.Text);
uint TID = Util.ToUInt32(TB_TID.Text);
first line should have been TB_SID.Text not TID

pull out method

Thanks wejhvabewjty!

https://projectpokemon.org/forums/forums/topic/41110-problem-with-pok%C3%A9mon-caught-w-cute-charm-lead/
2017-07-15 09:48:08 -07:00
Kurt
70b5832dff Change g7tid format
d6 not d7
Closes #1291
2017-07-02 11:02:16 -07:00
Kurt
1c4a1af633 Misc updates
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.
2017-06-29 19:32:29 -07:00
Kurt
bf6ef284b1 Move contest stat to separate usercontrol
#1272
Smart label now appears for gen 3-5
2017-06-25 10:57:35 -07:00
Kurt
36b75179f3 Update level/egg behavior
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
2017-06-20 22:57:22 -07:00
Kurt
1a9da12404 Misc updates
fields->properties, capitalize
fix pkm fields toggle referencing old pkm file, simplify that process
instead of constantly referencing Format
2017-06-20 17:57:23 -07:00
Kurt
b4222c756a Refactoring
reduce cross-class chatter, simplifly large methods to smaller pieces
some speed improvements
2017-06-18 22:27:40 -07:00
Kurt
5b4cedf14b Refactoring
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)
2017-06-18 13:02:02 -07:00
Kurt
da6f880c16 Add Shiny Leaf editing
Closes #1236
pk4/bk4 only, obviously

side note, using static events is no-no, designer auto-removed them.
just manually reapply (as well to others that used it)
2017-06-17 21:49:14 -07:00
Kurt
3f38b123a3 Refactoring
mostly renaming things, includes a little bit of added sugar and
splitting methods to simplify the codebase.

all methods are now PascalCase
2017-06-17 18:37:19 -07:00
Kurt
5d50f58d86 Add pk1 catchrate refresher to current species
Label_Species already has a click event for showdown sets with a
modifierkey; add a default behavior which checks for pk1 and if so, sets
the catch rate to the current species.

Users shouldn't have to look up catch rate values or be responsible for
editing them; they are currently handled by the pk1 object. Setting a
species ID checks if the catch rate is within the species lineage, and
only updates it to the current species if the rate doesn't match any.
With this change, the user can force the catchrate to match the current
species (then change back to the evo form) instead of having to change
the species to a separate lineage that does not have the current (not
displayed) catch rate value.

Closes #1235
2017-06-16 18:56:17 -07:00
Kurt
cf8f6573f2 Use savefile for personalinfo form count
BW has forms that aren't present in b2w2; expect the same for usum<->sm

splash screen opacity change for fanciness
2017-06-11 18:23:18 -07:00