Commit graph

5795 commits

Author SHA1 Message Date
Kurt
4703a3d364 Fix incorrect method call
IVs for regular trade gifts can have random IVs; only VC-era have purely
fixed IVs.
Closes #2300
2019-05-11 17:03:22 -07:00
Kurt
4b770e62d9 Simplify and relocate wurmple evo logic 2019-05-11 14:25:58 -07:00
Kurt
feb36f58b5 Minor simplification
#2298
#2299
2019-05-11 13:10:51 -07:00
Andrew Johnson
b1ad10d8ad Add shiny check for Ash-Greninja (#2299) 2019-05-11 13:08:22 -07:00
Kurt
21e7f4317e Minor updates
increase readability, simplifly some expressions
relocate hot path for legality report string creation
2019-05-11 10:12:14 -07:00
Kurt
332784d34b Misc updates
parameter name lowercase
simplify some comparisons/calcs
reuse comparison methods
wrap memory dump into readonly struct
2019-05-11 00:59:07 -07:00
Kurt
55189a6967 Extract most common location numbers to class 2019-05-10 20:46:49 -07:00
Kurt
72edb6aa72 Misc tweaks to 3->4+ branching
more lines, a little clearer
2019-05-09 22:47:37 -07:00
Kurt
b51bdc9230 Add another vc nature checks
transfer level exp and current exp not being different enough, which
limits the amount of natures possible. Could handle the 100&<=2 cases
the same way, but keep the branches for faster cases.

fix bad test cases
2019-05-09 01:56:44 -07:00
Kurt
b5b4b67263 Fix template IVs getting overwritten on startup
Closes #2296
setting datasource triggers a changed event, which updates IVs
set flag to indicate this isn't the user doing this change
2019-05-05 12:57:56 -07:00
Matt
316430985a Unban Shiny Seel (#2293) 2019-05-01 14:23:08 -07:00
Kurt
042e5176a6 Remove hardy shuckie & version split
Not version specific; I'm assuming the 00020003 PID is a result of
hacking the save file to change OT gender. Legitimate saves haven't
yielded the Hardy PID. Changing gender probably results in a bad
pointer, fetching the wrong value.

Closes #2290
2019-04-30 17:03:12 -07:00
Kurt
520c9da5c9 Update string loading
Remove usage of linq for sorting, use array.sort for in-place sorting.
Wasteful creating temp sorted buffers then enumerating them to dump into
the list.
2019-04-29 21:55:43 -07:00
Kurt
7094132eac Fix b2w2 fr trade OT name
Closes #2291 ty @WEERSOQUEER
2019-04-29 17:42:39 -07:00
Kurt
be50830975 Relocate method to extension logic class
GetLocationString is now right below GetPotentialString
PKX no longer has extension methods aside from the two CopyTo sugar
2019-04-29 17:36:29 -07:00
Kurt
706a9f2555 Disallow setting EVs for pb7 via label click shortcut
apply AVs instead
2019-04-29 17:35:31 -07:00
Kurt
300ef4d60a Minor simplifications
Use "SetData" method to automatically apply the Edited flag
Use appropriate method for CopyTo
simplify expressions a tad
2019-04-29 17:21:19 -07:00
Kurt
7c380a29c3 Make sort skip delegate more general 2019-04-29 17:20:16 -07:00
Kurt
9838ea9a2b Merge branch 'master' of https://github.com/kwsch/PKHeX 2019-04-29 16:40:58 -07:00
Matt
091e64571b Update GO shiny banlist (#2292) 2019-04-29 15:32:17 -07:00
Kurt
0dc45c00ec Check block index before calculating
Missing/Duplicate blocks (???) result in -1, so skip them.

https://projectpokemon.org/home/forums/topic/52437-cant-export-unmodified-sav-file/

replace linq with manual allocation
2019-04-27 17:19:54 -07:00
Kurt
a220970124 Fix wallpaper resource display fetch
CB_BG is the background selection, not the box.
https://twitter.com/yajegamer/status/1120717928322748420
2019-04-23 18:37:51 -07:00
Kurt
0bd6caf927 Fix male-only dex bit wiping
only wipe the index specific bits, don't wipe everything but the index
specific bits
2019-04-22 22:25:14 -07:00
Kurt
9861128b63 Minor img processing update
Extract magic pixel shifting numbers for layering imgs -- SWSH will
likely use the large boxsprites, as hinted by LGPE's upsizing.
Remove new[] color array creation, just pass byte values
break up glowedges into steps
2019-04-22 22:25:14 -07:00
Matt
963cb1aa99 Unban GO Shiny Lapras (#2287) 2019-04-17 22:49:58 -07:00
Kurt
d8f064409f Fix pk1->pk2 conversion parameters
https://projectpokemon.org/home/forums/topic/52273-replicable-issue-cant-inject-pk1-in-silvercrystal-save/

Thanks Maddaren!
2019-04-17 18:35:51 -07:00
Matt
b8c490ae2e Update GO shiny banlist (#2286) 2019-04-17 12:53:13 -07:00
Kurt
35851fcf5c Simplify and enhance expression
cache fetch of PersonalInfo (avoid re-fetching)
If event, the pkm wasn't bred with ditto
If genderless or male-only (except nido/volb), assume ditto
2019-04-16 23:07:47 -07:00
Kurt
ab64eb5850 Trim unused 2019-04-16 22:58:37 -07:00
Kurt
a481757b45 Relocate CheckEncrypted to PKX
PKX references within the method; no dependence on anything in
PKMConverter
2019-04-16 22:51:01 -07:00
Kurt
5a53c2490a Simplify expression, emit inner error messages
existing logic had been overwriting the inner error messages with the
generic fail message

Remove backwards conversion precondition check; the ConvertPKM method
has no branches that allow conversion so it'll naturally fail -- end
result is the same with less upfront logic.
2019-04-16 22:38:50 -07:00
Kurt
86d10af78b Minor clean
cache Generation value, store arceus stuff as ushort
2019-04-16 22:14:21 -07:00
Matt
7e553155e1 Fix PKM conversion prompt order (#2285) 2019-04-16 10:54:29 -07:00
Kurt
5da9051431 More accurate sound option names
Deviating from official option names, reflect the end result instead.
clarity > accuracy
#2283
2019-04-15 15:46:03 -07:00
Kurt
934595126f Simplify qr gender
use personalinfo object to do majority of work,
end result has the 4 sequential bytes set neatly
2019-04-15 15:43:48 -07:00
Kurt
286df71c5a Hide sound type for nonyellow gen1 saves
Closes #2283
Fix label name & update translation file for them
2019-04-15 15:38:49 -07:00
Kurt
9736efd332 Updates continued
Use clone track bool
could instead track the result for each pkm step instead, for extending
functionality to mass-delete any flagged entry (cleanup).
2019-04-14 16:04:36 -07:00
Kurt
95267afb2d Add bulk check to Checksums button
Hold control to have the Bulk Legality analysis spit out its results to
the clipboard.
2019-04-14 09:08:33 -07:00
Kurt
34ea56c2a7 Minor updates
Fresh day, fresh tests of the new code :)
Fix assert conditions
Add extra considerations
Detected clones should be skipped for PID/EC/TID checks -- should
probably detect this a different way rather than checking a computed
string (bool array of flags for the clone check results)
2019-04-14 09:06:43 -07:00
Kurt
0fdd9d98e6 Fix xmldoc typo 2019-04-14 09:04:40 -07:00
Kurt
3d60bea245 Add savefile-wide pkm legality checks
clone checks, duplicate PID/EC/TID
untested & no gui access for now
2019-04-14 01:06:34 -07:00
Kurt
74a45c436a Remove machoke trade catchrate restriction
reverts to 90
Closes #2282, also evident in RoC's PC files (as 90 catch rate).
2019-04-12 22:46:05 -07:00
Kurt
289a36cbd4 Relocate tables to folder
less overpopulated folders
2019-04-12 14:12:30 -07:00
Kurt
ba2b9ace8d Use byte for pp value storage
more appropriate storage; for 3887 indexes -> saves 11.3KB
2019-04-10 22:05:57 -07:00
Kurt
27dfffd5b2 Add model-gender/starter-gender get/set
https://projectpokemon.org/home/forums/topic/52127-lgpe-save-research/?tab=comments#comment-243751
Thanks theSlayer!

(starter gender not modifiable via gui)
2019-04-10 17:03:05 -07:00
Kurt
82fb95b436 Add ConfigSave language get/set
This value is what determines what language the game runs with
2019-04-09 21:19:08 -07:00
Kurt
f4740bbe52 Capture reused variables 2019-04-09 20:58:19 -07:00
Kurt
1a343c3b21 Add more xmldoc 2019-04-09 20:57:44 -07:00
Kurt
2f2512b09c Reduce allocations for checking file write time
FileInfo inherits from FileSystemInfo, which initializes a bunch of
strings that we don't need
this isn't a great optimization, just a fun exercise finding a quicker
approach to get these values
2019-04-05 18:45:59 -07:00
Kurt
054d498619 Add vc transfer nature checks
Closes #2279 thanks @SadisticMystic !
2019-04-03 20:13:35 -07:00