Commit graph

342 commits

Author SHA1 Message Date
Kurt
de840f40d4 Invert some "!is" to "is not" 2020-12-29 00:58:08 -08:00
Kurt
e8c23f6644 Simplify some repeated comparisons with expressions
Less prone for bugs since it uses the same value for all comparisons without re-specifying
2020-12-29 00:37:59 -08:00
Kurt
c119f18af3 spec->species 2020-12-28 22:22:52 -08:00
Kurt
a4ccca7980 Add battle-only known move memory bypass 2020-12-26 09:27:41 -08:00
Kurt
ee5349ff98 moar is or 2020-12-25 12:30:26 -08:00
Kurt
4a8a495d04 Condense some switch expressions
Should be it for now; exhaustively searched for all that made sense to change
2020-12-25 10:58:33 -08:00
Kurt
749fef0ac6 Minor clean 2020-12-24 15:23:38 -08:00
Kurt
afdd2bd57e Mark EncounterSlot/Static types as immutable record types 2020-12-23 20:40:59 -08:00
Kurt
0a3f45218f Add OT gender check for N's Pokemon
Closes #3110 ty @FeralFalcon !
2020-12-23 18:03:05 -08:00
Kurt
93910df2c6 Use new switch statements 2020-12-23 17:14:38 -08:00
Kurt
736564be8c Merge EncounterStatic4 back together 2020-12-23 12:15:49 -08:00
Kurt
53e0046a48 SWSH has some form entries with different base friendship (stunfisk) 2020-12-22 09:09:49 -08:00
Kurt
997e0751f3 Minor clean
Handle remainder of c#9 sugar
Fix some spelling mistakes
2020-12-21 23:37:07 -08:00
Kurt
514b60b447 Merge type check with usage in if statements
if x is y with z property true, then :D
2020-12-21 22:33:48 -08:00
Kurt
cd76e49388 Strengthen know move check 2020-12-21 19:50:56 -08:00
Kurt
351637900f Downgrade swsh move memory verification severity
Some special encounters don't set the Relearn Moves, so we can't really check the memory-moves unless we somehow late-reject a matching encounter. Not really worth the effort to try and verify cosmetic mismatches; just tag them as Fishy.
2020-12-21 19:20:11 -08:00
Kurt
98be0f6739 Target type'd new 2020-12-21 17:17:56 -08:00
Kurt
0303eada32 this is not that
clearer than before, yay
2020-12-21 17:12:39 -08:00
Kurt
b71df7b064 Allow shared moves from daycare as "can know move"
See b58f3bbc22
2020-12-21 16:49:42 -08:00
Kurt
b58f3bbc22 Add memory checks for GO->HOME transfers
Also add checks for the new memory types introduced in swsh
2020-12-21 14:22:24 -08:00
Kurt
62018cce1a Unify concepts with different names
AltForm & Form & Forme => Form
GenNumber & Generation => Generation

Extract out SpeciesForm interface, and re-add IGeneration

For those using PKHeX as a dependency, this should be a pretty straightforward manual replacement... GenNumber and AltForm should be quick find-replace`s.
2020-12-10 20:42:30 -08:00
Kurt
e72c80613e Extract metadata/state tracking from SaveFile obj 2020-12-05 05:36:23 -08:00
Kurt
9cd6d34f1d Disregard ability bit checks if was shadow
only really pertains to xk3/ck3 and this doesn't really impact legality once transferred
2020-12-02 21:40:35 -08:00
Kurt
d5bd36143e Add language check for jp-blue gameversion, non-crystal female
Closes #3099
Ty @CarlosofKalos !
2020-12-01 16:55:10 -08:00
Kurt
5e32e64ac8 Handle MANôA and FALCçN SPA->FRE Gen2 Trades
Transporter remaps certain locale specific chars depending on the source ROM's version.
Since VC can trade between languages, there are 2 Spanish in-game trades that have glyphs subject to remapping, if it's transferred from a French game.

If the spanish trade is transferred from a french game, it must match the mutated string.

ty @Lusamine & helpers :D
2020-11-29 18:17:15 -08:00
Kurt
016ebb86ad Update AbilityVerifier.cs 2020-11-27 20:44:44 -08:00
Kurt
8eb582c997 Move species/move names to parsesettings 2020-11-27 18:45:06 -08:00
Kurt
26d6143325 Indicate static encounters disallowed from marks
Includes gifts by default
2020-11-27 12:48:47 -08:00
Kurt
fa36b70b29 Split Analysis into two separate classes
Will rename in next commit
2020-11-27 12:00:49 -08:00
Kurt
9b178fefe2 Xmldoc, minor tweaks
Move form-info logic from FormConverter to AltFormInfo; now FormConverter is entirely form=>string[]
Add a bunch of xmldoc
Make pogo no-end-date cmp agaisnt UTCnow rather than local now.
2020-11-27 11:51:02 -08:00
Kurt
771086a222 Show all valid yamask-1 formarg values
from 319 (max HP-1) to 9999 (max saved value).

Causes a little bit of GUI lag when loading 10k items to the combobox; could be a number entry but meh. Lazily allocate the 10k strings; wait until it's requested.
2020-11-24 12:40:56 -08:00
Kurt
37782f0ce4 Consolidate EncounterTrade1 level objects
Adds Nickname checks, thanks @ShadowMario3 for grabbing these into separate text files from Bulbapedia.

I reordered all the encounters to match Bulbapedia; each level is denoted if different if it can be sourced from RBY.
2020-11-22 16:19:03 -08:00
Kurt
037db7b8a3 Add xmldoc for new obj/func related to GO legality 2020-11-16 21:17:45 -08:00
Kurt
377ec02c9b Minor clean
Remove GoPark as a "Type" since it is now baked into the encounter object type
2020-11-14 12:55:30 -08:00
Kurt
ad9e9ddfa0 Relocate go encounter maintenance outside of pkhex.core
PKHeX.Core now accepts generated pkl binaries from PoGoEncounterTool (PGET).

Refer to pporg's repo. This will be treated like event data; occasionally updated.
2020-11-14 12:51:24 -08:00
Kurt
01c597cba7 GO checks round 2 2020-11-12 20:41:01 -08:00
Kurt
98f602fc87 Require tracker for HOME gifts too 2020-11-11 21:27:33 -08:00
Kurt
72e209a156 Split some methods, handle flow for go enc 2020-11-11 21:22:13 -08:00
Kurt
edd9ace51e More pogo rules 2020-11-11 21:03:47 -08:00
Kurt
ae85097c2d Allow go shiny xor!0
Thanks @Lusamine for bruteforce testing to confirm
2020-11-04 20:55:47 -08:00
Kurt
c5b6c20c7b Update MarkVerifier.cs 2020-11-04 12:58:56 -08:00
Kurt
8b25af5f85 Enforce xor=0 for go shiny transfers
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2020-11-03 18:56:58 -08:00
Kurt
d78424a3ad Hande Ability Patch edge case
4 legends have A/A/H on form-0, and B/B/B on form-1. You can get a form-1 by applying the patch on the form-0, and changing it to form-1 will retain the AbilityNumber=4.

Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2020-11-03 18:48:29 -08:00
Kurt
c60ae57ab0 Handle Ranked Battle Series 7 permissions
Closes #3070
Exclude all classified as Legends; everything else is permitted assuming it can exist in SW/SH.

Co-Authored-By: Chris <28743231+Bappsack@users.noreply.github.com>
2020-11-02 16:38:00 -08:00
Kurt
7cb6ee0060 Move some static arrays closer to where they're used
Split EvolutionRestrictions to its own class
Can probably refine things further to clamp down access to these arrays
2020-11-02 13:11:51 -08:00
Kurt
4db6661ffd Handle JP-Blue trade quirks + stadium2 trade bypass
Co-Authored-By: ShadowMario3 <36941677+ShadowMario3@users.noreply.github.com>
2020-11-01 15:27:54 -08:00
Kurt
15348d3fdd Bypass crustle flag 2020-10-31 11:43:17 -07:00
Kurt
975c4f8a4a Prevent nickname change for fateful encounter trades
Handle empty nickname trades for gen6+ assuming there's a nickname
2020-10-30 20:31:12 -07:00
Kurt
bb60b140e2 Allow Gen8 balls on gen3-species eggs originating in Gen8 2020-10-25 18:07:13 -07:00
Kurt
2bb399c8e7 Check egg state before allowing gmax toggle
eggs can't toggle gmax state
2020-10-25 13:41:49 -07:00