Commit graph

2808 commits

Author SHA1 Message Date
Kurt
a590d3713b Refine enum with TypeCode names
Add GetValue/SetValue/GetType extension methods
2020-01-17 18:59:45 -08:00
Kurt
ff466826af Flip hgss trade flag state meaning
Closes #2640
2020-01-17 16:39:19 -08:00
Kurt
bd9ec72d98 Misc tweaks
Add more direct legality analysis constructors
evo count is >= 1
fix invalid test message
disallow gen2 moves if transferred from gen1
use ^1 instead of len-1 for netcore test project
2020-01-16 23:22:54 -08:00
Kurt
c739af4767 Extract item restrictions to separate class
Move similar classes to folder
2020-01-16 19:27:29 -08:00
Kurt
baf46f9a3a cache form/species/format on first get
very minor perf consideration, since those values are immutable (except for cross thread shenanigans)
2020-01-16 19:23:29 -08:00
Kurt
e97970023a Add swsh battle-only forms 2020-01-16 19:03:47 -08:00
Kurt
8315f740cb Merge branch 'master' of https://github.com/kwsch/PKHeX 2020-01-16 18:54:11 -08:00
Kurt
857124acf0 Swap zen galar -> galar zen
ty showdown for changing your convention over a month ago
a01e2a26bc (diff-58e367765263b7e21df251b3e7619b70L9307)
2020-01-16 18:54:09 -08:00
Egzon Qukovci Jusufi
deece433a5 Add SWSH Legends to the Tables (#2637) 2020-01-15 20:49:19 -08:00
Archit Date
22ed59d6a3 sanity check necrozma forms (#2638)
smogon allows Dusk Mane as well as Dusk-Mane as their form argument
2020-01-15 20:48:53 -08:00
Kurt
41f909c08a Add Roto Rally score, copy Jersey # to other block
Closes #2635
2020-01-15 20:48:19 -08:00
Kurt
aecc08f65c Remove duplicate electrode encounter
3IV requirement isn't required for wild slots that are also at the same level-location
Closes #2636

ty @dstevenson12 !
2020-01-14 18:39:25 -08:00
Kurt
f4162d2dce Add another corviknight location
ty anubis
Closes #2633
2020-01-13 22:36:00 -08:00
Kurt
726947eaf5 Add HGSS starter const/flags
Closes #2634 ty @asterysx !
2020-01-13 20:40:44 -08:00
Kurt
a6aabcdc96 Split out a method before crypto step
Allows for capturing the obtaining the raw decrypted data via the PKHeX.Core api
2020-01-13 19:03:27 -08:00
Kurt
2e16fb058c Show form arguments in gen6/7
Clamp form argument load to current list bounds (used to throw arg range exception if invalid)
2020-01-13 17:09:03 -08:00
Kurt
11978dab4f Make pgt ranger manaphy IsEgg true 2020-01-12 23:00:32 -08:00
Kurt
81f280f4d1 Update EncounterSuggestion.cs
weaken legality check, we only check moves
2020-01-12 20:49:33 -08:00
Kurt
5a20dc707d Rewrite encounter suggestions
Don't clone legality templates, and keep suggested information minimal -- this isn't automod
2020-01-12 19:40:36 -08:00
Kurt
eaeebea923 Remove another method shortcut
EncounterSuggestion needs a facelift anyway
2020-01-12 17:00:03 -08:00
Kurt
3b5c7062ac Minor perf improvement
pass in, don't constantly fetch
helps generated IL code be slightly more efficient
2020-01-12 16:49:12 -08:00
Kurt
a8c28369b6 Add Yamask-1 max hp calc for formArg compare
Closes #2632 ty @CanoeHope
2020-01-12 16:22:56 -08:00
Kurt
d5948b9dbe Add relearn moves to Except comparison
Burn Up ho-oh is dumb
2020-01-12 16:09:35 -08:00
Kurt
48fd36a9a2 Handle g4 shedinja learn case too
change 291/292 to Shedinja/Ninjask for easy enum reference check
2020-01-12 14:34:29 -08:00
Kurt
61ecb52347 Remove unnecessary allocation 2020-01-12 12:06:33 -08:00
Kurt
a305c00ac4 Reorder feebas evo for swsh, patch data
Updated comment in #2394 with byte swap info
Forgot to check tests when importing patched data :)
2020-01-12 11:48:42 -08:00
Kurt
82eaf39d45 Remove method alias for init mysterygift db 2020-01-12 11:41:23 -08:00
Kurt
9ed441885a Remove manual personal info fix
Change FDDC from 47 -> 41
SM is 40, as the tutor isn't possible in that game.
2020-01-12 11:39:43 -08:00
Kurt
f6fb54aecc Move shedinja/egg evo chain short circuit
Some routes use the evolutiontree directly instead of this method (with the same name); should probably consolidate but meh

This causes Shedinja to yield the correct evolution chain when called directly (because nothing naturally evolves to shedinja; it's created out of thin air as a clone)

Take the egg short circuit with it to keep things simple
2020-01-11 21:43:58 -08:00
Kurt
0eca1bbd1c g3 shedinja api usage fix
see comments in src for justification
need ninjask moves if gen3; dl.Count is guaranteed to be >= 1
2020-01-11 21:41:24 -08:00
Kurt
7cbf8d0fcf Set gen3 count ribbons appropriately
ty anubis
2020-01-11 15:51:25 -08:00
Kurt
7e6edbaded Remove unnecessary constructor
Make key readonly
2020-01-11 14:18:11 -08:00
Kurt
95f24a9d36 Revise suggested AV set logic
Closes #2630
2020-01-11 11:43:53 -08:00
Kurt
62c35194c3 Remove unnecessary form duration code
probably misinterpreted the furfrou/hoopa stuff; probably is "SetMaxFormDuration"
d3f6d5935f (commitcomment-36754955)

ty @CanoeHope
2020-01-10 22:16:30 -08:00
Kurt
d3f6d5935f Add form argument legality checks
Closes #2611 (Alcremie)
Closes #2604 (Runerigus)
2020-01-10 16:33:40 -08:00
Kurt
507868ce58 Merge branch 'master' of https://github.com/kwsch/PKHeX 2020-01-10 16:08:51 -08:00
Kurt
fdd321dd8c Make memory 6 fishy if textvar present
Closes #2621
2020-01-10 16:08:34 -08:00
Egzon Qukovci Jusufi
fe13b3374d Spanish Translations (#2625)
* Update LegalityCheckStrings_es.txt

* Update lang_es.txt
2020-01-10 16:03:28 -08:00
Kurt
be92d4436e Rearrange argument check order
USUM evo table has Meowstic with Arg=-1, which early aborted.
Closes #2627
2020-01-10 16:02:22 -08:00
Kurt
f291da8f32 Add 2 bw flags
Closes #2628
2020-01-10 15:53:26 -08:00
Kurt
718d00f970 Ban ha slowpoke-1 2020-01-09 23:50:15 -08:00
Kurt
cf06335a22 Update 20.01.10
Update with latest events from EventsGallery
2020-01-09 21:13:07 -08:00
Kurt
2915692daa Use more performant block lookup strategy
Rather than storing a dictionary of keys, we can abuse the fact that the SCBlock[] is stored in order of ascending block key.
Binary Search doesn't require extra memory like a Dictionary would; also, we only need to find a few blocks.
2020-01-09 19:00:49 -08:00
Kurt
51d2fc9d93 Update with slowpoke-1/new raid data
TransferVerifier: Revise transfer check to allow slowpoke-1 (slowpoke-0 is flagged via next check)
2020-01-09 18:44:45 -08:00
Kurt
3fa44361e6 Update block fetch & blank init
blanks: {key,size}
fetch: get block by key (index isnt the same between patches, as blocks with different keys get added). The savefile stores them as a SortedDictionary (by key), hence the shifting.
2020-01-09 08:59:26 -08:00
Kurt
bbd1aff5fe Add new lengths
new format still crashes as block absolute index is now different
should do a different way of loading blocks (key instead of index)
2020-01-09 08:17:41 -08:00
Kurt
0dd4d1fe7a Remove unnecessary casts 2020-01-06 17:50:18 -08:00
Kurt
efbac28b91 Rework accessors for PKMConverter trainer cache
Might break downstream users, for the better. Internal behavior had to change!
2020-01-05 21:51:02 -08:00
Kurt
1906a1040f Relocate console-location data setting to PKMConverter
When adding data, check if the current Trainer has valid console data; if not, use a default value.
2020-01-05 21:41:32 -08:00
Kurt
3d581283c2 Minor clean
move Text.cs manual Courier new() to the designer, have it dispose when form is disposed. Set it as the numericupdown's font and just reuse that :)
2020-01-05 18:46:30 -08:00
Kurt
7caeebd772 Add formcount for scatterbug/spewpa
USUM had 20 for both, but XY/AO/SM had only 1 (vivillon had 20); make
them consistent so that our generated evolution paths behave correctly

Add meowstic specific evolution form modifier... so silly
simpler to have it inlined with the sSpecies, for jit optimization

could probably do this with silvally but meh, things work fine now

Closes #2603
2020-01-04 22:31:46 -08:00
Kurt
e21d108fb2 Split PokeCrypto from PKX
All logic in PokeCrypto is separate from the rest of the PKHeX.Core
library; makes it easy to just rip this portion out and reuse in other
projects without needing the entirety of PKHeX.Core logic

optimize out the CheckEncrypted to the actual path, separate methods.
Only usages of this method were with hardcoded Format values, so no
impact
2020-01-04 14:48:39 -08:00
Kurt
68e6644d40 Split off shared nest class, deduplicate logic
use generics to have shared logic in one spot
Handle downleveled distribution/crystal(soon?) data
2020-01-04 11:44:16 -08:00
Kurt
308e6fa291 Add temp workaround for version encounter fetch
PKX.Generation is 8, which returns SWSH evo tree; evo tree doesn't have
non-galar-native species data, so stuff like Ambipom don't get reversed
properly.

use math.max for tree fetch when appropriate:
- egg generator: pre-evolutions like pichu should be allowed if pk1
- don't fetch format twice, just do math.max
2020-01-04 11:14:25 -08:00
Kurt
ecabbfff53 Add individual Move#_PP $suggest
#2603
add in "secret" heal/healPP actions -- do ".Heal=$suggest" to refresh
all stats like it was healed at the pokecenter. I can't think of a good
way to handle invoking of methods (">", but what about parameters?)
2020-01-03 20:21:02 -08:00
Kurt
15779513f5 Add stubs for raid correlation verifiers/generators
Not going to implement this within the base repo as z3 is too large of a
dependency and is platform specific.

If anyone wants to implement as a plugin project, just inject your new
methods via the setters on the static func/action at the top of the 3
classes.

Since z3's searches aren't instant, I'd recommend caching recent results
in a dictionary, as re-parses are common. Something like the Wordfilter
is what you'd be aiming for :)

Closes #2617
2020-01-03 20:03:04 -08:00
Kurt
a08ebff699 Add gen8 mimikyu form case
Closes #2618
2020-01-03 19:20:16 -08:00
Kurt
0788780404 Add bewear motostoke crossover location
Closes #2619
2020-01-03 19:14:03 -08:00
Kurt
852bd2af20 Relocate gui-only text files to WinForms project
Split up the DataUtil method to load text files so that the caching
functionality can be reused
2020-01-03 15:53:48 -08:00
Kurt
10b2120b93 Update translations with latest translatable fields 2020-01-03 15:29:31 -08:00
Kurt
350895aba6 Use permissive string search, add indeedee-M case
Manually modified showdown sets can contain errors (capitalization,
etc). Use the string search api to permit weaker matches, since there's
not going to be any exact-matches-with-different-caps/spaces.
2020-01-02 15:49:35 -08:00
Kurt
fe8e5e3fd9 Add more string search methods
exposes some common string search operations that can be useful for
parsing user entered data
2020-01-02 12:06:58 -08:00
Kurt
35c7195d77 Add custom int/uint parse tests
Correctly handle negative parsing for int by flipping sign at end
optimize out a compare char digit/hex check
2020-01-02 11:11:31 -08:00
Kurt
b55dc37e05 Extend some logic
make summary more accessible
2020-01-02 10:55:37 -08:00
Kurt
166f8d82e5 Misc clean
Refactor out some logic, make "en" literals reference one spot (where
appropriate)
2020-01-01 19:07:21 -08:00
Kurt
7e490b8dcc Add lanturn/bronzong alt locations
Closes #2613
2019-12-31 21:47:28 -08:00
Kurt
0002f1d1ad Grab CXD location if encounter is COLO or XD 2019-12-31 12:15:48 -08:00
Kurt
14eae5f62d Add magikarp distribution data 2019-12-30 22:32:12 -08:00
Kurt
3b2b86950f Ignore symbols (apostrophe) for string matching
Farfetch'd vs Farfetch’d
2019-12-30 15:39:13 -08:00
Kurt
84c5f6e914 Add another met location for gastro-1
Closes #2612
2019-12-30 15:11:54 -08:00
Kurt
9864f23427 Handle Bridge Field->Stony Wilderness berry tree
Closes #2610
2019-12-29 12:48:34 -08:00
Kurt
d6471e2b3b Add more pelipper & dusclops strong locs
ty anubis
2019-12-29 11:28:29 -08:00
Kurt
ce62d63c5a Fix eggmove fetch for move check
Closes #2609
2019-12-29 10:17:07 -08:00
Kurt
f4bafe0809 Add extension methods for gym team get/set for all
Closes #2607

SAV6XY/AO had GymTeams get/set, this now makes similar logic accessible
for even SAV5BW/B2W2.
2019-12-28 22:32:45 -08:00
Kurt
be50abcc44 Add SubEventLog block object, etc
Adds gym team records, remove from savefile properties
update block list documentation
2019-12-28 21:53:58 -08:00
Kurt
0ce6254cee Add GymTeam records for Gen5 saves 2019-12-28 21:51:10 -08:00
Kurt
bfd9bf6b53 Simplify formchange calls
Don't use the dex chain for certain checks, it's unnecessary.
2019-12-28 19:00:01 -08:00
Kurt
8493471793 Add alcremie form change case 2019-12-28 18:59:00 -08:00
Kurt
3280adcb9f Add another location for Golurk & Galvantula
Closes #2606
2019-12-28 18:03:20 -08:00
Matt
6f1611f360 Add Gen 4-6 Starter Event Constants (#2608) 2019-12-28 17:39:46 -08:00
Kurt
b294eba181 Fix combee gender check
silly convoluted checks
#2603
2019-12-27 19:17:08 -08:00
Kurt
f65e0a96a7 repoint sav4 event constant reads
should work fine now
2019-12-27 18:30:39 -08:00
Kurt
940cdccb6b Restrict downleveled to lvl % 5 == 0 2019-12-27 00:17:59 -08:00
Kurt
c7e396ef14 Update 19.12.26
Update with latest event data from the Events Gallery
2019-12-26 19:07:04 -08:00
Kurt
ceae77c677 Add load-line overlap location for Den 27/42
The nest is situated right next to the load line, and may be accessed
from either map (across the load line), resulting in a Dusty Bowl
Pumpkaboo-0.

Many thanks to Anubis on Discord for figuring this (very silly) thing
out !
2019-12-26 18:59:02 -08:00
Kurt
b255937e86 Revise input parameter names
pk instead of pkm (consistency)
Lowercase anything that started with uppercase (not static state)
2019-12-26 18:47:31 -08:00
Kurt
d736f24bb7 Heal PP on transfer
force everything to their current pp count
2019-12-26 15:28:04 -08:00
Kurt
5cb3556eee Add Move PP verification
Eggs already had it, adding now for regular pkm
Closes #2602
2019-12-26 14:28:01 -08:00
Kurt
9ee2b08ce5 Update rare flag logic
Closes #2601

Add ComponentModel attributes for properties, add u64 typeconverter for
propertygrid
2019-12-26 13:39:07 -08:00
Kurt
6c7065fb7b Fix bool compare
oops
https://github.com/kwsch/PKHeX/issues/2600#issuecomment-569134146
ty @slp32 !
2019-12-26 13:12:10 -08:00
Kurt
bb7c94dadb Add seismitoad location
https://github.com/kwsch/PKHeX/issues/2570#issuecomment-568235086
2019-12-26 13:04:44 -08:00
Kurt
baf0f52f06 Handle downleveled raids
Closes #2573
- self-hosted raids can be downleveled too (see cufant), probably only
by 1 rank
- min-rank check now checks for downleveled cases

- Add extra gyarados/ferrothorn locations
2019-12-26 12:59:16 -08:00
Kurt
4740fab5ec Have separate encounter yielder for gen8
the "Strong" static encounters can be near-matches with wild encounter
slots; example is a evolved Cutiefly->Ribombee with Quiver Dance.

Remove unnecessary IsLink/FriendSafari check for this gen8 method

https://github.com/kwsch/PKHeX/issues/2573#issuecomment-569126371
2019-12-26 12:32:48 -08:00
Kurt
420307d4bf Make non-exportable saves (fake) act as VC saves
https://github.com/kwsch/PKHeX/issues/2600#issuecomment-569125853
2019-12-26 12:21:35 -08:00
Kurt
06348096aa Fix block de-referencing issue
SCBlock is an input to the individual save blocks; changing the SCBlock
byte[] reference won't change the individual save block reference. Just
copy the data and keep the original reference instead.

Repro: trainer data editor, save-close window, then delete a slot.
Export save; reload. Changes to box data were using old byte[]
reference, and didn't get repointed. Works fine with latest commit now.

I think I wanted to avoid copyto since it's slower than just a reference
change; but that didn't work out perfectly :)
2019-12-25 23:24:40 -08:00
Kurt
0a8c791e10 Pad with null terminators rather than 0
Can have a single digit (not forced to 3), so null terminate I assume.
2019-12-25 21:31:49 -08:00
Kurt
0c7d347a29 Add Delibird distribution data, split files
ROM nest data definitions are already pretty hefty and won't be revised;
split out the future content
2019-12-25 14:26:49 -08:00
Kurt
827a7649c1 Export PCD/PGT as encrypted format
add Write method for writing the data outside the program; only use Data
if you know what you're doing!
2019-12-24 23:24:28 -08:00
Kurt
9d1bfd67b5 Add braces
style fix, no functional change
2019-12-24 23:23:42 -08:00
Kurt
e6dcf64abe Disallow Spiky Ear Pichu eggs
sneaky gen4 bad hacks are bad
2019-12-24 13:21:56 -08:00
Kurt
97c3c6b610 Add raid/den detail browser
Hold alt when hitting activate all to dump instead
I've seen DenType=5 Event=2 for at least one raid so far... not sure if
the event/rare properties are accurate.
2019-12-23 23:30:21 -08:00
Kurt
bc3e84d30e Check high bound of language when generating wb7/8
Closes #2599 ty @slp32
2019-12-23 11:27:36 -08:00
Kurt
3b1cab0ab5 Update translation resources
things are pretty stabilized, so it seems like a good time to allow
translations
2019-12-22 13:53:16 -08:00
Kurt
ea5ca7b2d2 Add Ingredients to swsh held item list
Closes #2597
2019-12-22 12:16:06 -08:00
Kurt
3b2ebbb84f Add PID check for gen4/5 Combee->Vespiquen evo
Closes #2593
2019-12-21 16:52:56 -08:00
Kurt
7edfe4543f Flag eggs with HT string
Closes #2586
Modify PKM Info already clears it, but if disabled, will be flagged.
2019-12-21 16:01:51 -08:00
Kurt
ce463d057a Add Pikachu Beach Score editing for YW saves
Closes #2585
2019-12-21 15:17:05 -08:00
Kurt
8309060298 Add more egg verification for statnature/techrecord 2019-12-21 14:51:52 -08:00
Kurt
7889a0abe6 Simplify form egg move handling
Closes #2588
2019-12-21 13:37:20 -08:00
Kurt
d7bc68d7a5 Add HT case for capture memory check
#2570
https://github.com/kwsch/PKHeX/issues/2570#issuecomment-568149050
2019-12-20 19:47:40 -08:00
NotTsunami
a05b38ab39 Legality: Add Nature and Gender to Gen 8 Trades (#2591)
Closes #2589 
https://bulbapedia.bulbagarden.net/wiki/In-game_trade#Sword_and_Shield
2019-12-20 10:48:46 -08:00
Kurt
4bf71de621 Minor clean
automatically update total_watt if insufficient
SAV8 is not SAV8SWSH
#2583
2019-12-12 22:58:18 -08:00
Atzgi
d9c59666e0 Add watt in trainer data editor (#2583) 2019-12-12 16:27:01 -08:00
Kurt
506e64186a Rearrange & re-do "CanHaveMemory" value check
Closes #2581
2019-12-11 19:37:57 -08:00
iiippppk
dfa951d76c Update Gen8 Traditional Chinese Species (#2579) 2019-12-11 06:09:41 -08:00
iiippppk
35c0a4d931 Fix Chinese text error (#2578) 2019-12-11 06:09:12 -08:00
Kurt
802b93bb16 Fix xor order
oops, upper half gets the star/square xor
no real difference since PID is random
2019-12-10 22:05:47 -08:00
Kurt
108233b45f Add glalie/skuntank locations
#2570
2019-12-10 19:54:26 -08:00
Kurt
fcdd7019d3 Add missing shadow yanma location ID
Closes #2577 thanks @HoppyShnell ! -- this looks like the final met
location ID?!

Not sure if Murkrow (locked) is missing one; moved duplicate-location
Heracross and made it use the same locks.
2019-12-10 19:22:46 -08:00
Kurt
e9d127f225 Copy console data, copy OT memories
still hypothetical; we know that memories exist and console data still
has accessors
HT memories should be replaced, so no need to transfer 'em.
2019-12-10 19:13:32 -08:00
Kurt
9a87647409 Add more static encounter locations
Some of these are probably crossovers
#2570
2019-12-09 19:28:57 -08:00
Kurt
c85c8ded5c Fix crossover location compare, add formchange
Rotom can change forms, first time it's available in the wild. Fun.
Fix crossover location comparison (was always returning false).
2019-12-09 19:28:28 -08:00
Kurt
281c1ae744 Skip SWSH untraded link trade eggs if trade-memory
just read the comments & code, this one is an annoying oversight
untraded pkm /should/ never have HT memory data, but sometimes it do be
like that

Closes #2571
2019-12-09 16:23:29 -08:00
Kurt
aa2241ba66 Fix unchangeable OT friendship to compare correctly
Closes #2572 ty @sora10pls for confirming that evo chains are necessary
for VC transfer
2019-12-09 15:50:03 -08:00
Kurt
0fa25b4c8c Fix VC transfer evo chain population
Move EncounterOriginal to Legal info; needed in order to pass the
correct encounter to the EvoChain fetch.

The EncounterOriginal 'hack' might be unnecessary with the current state
of the legality checker... maybe can see if it can be removed later.
2019-12-09 15:48:54 -08:00
Matt
5395cf6bab Update UnreleasedHeldItems_8 (#2575) 2019-12-09 12:35:50 -08:00
Kurt
8e1fe5e305 Don't apply template fake console data if invalid
pkmeditor only for blank data load
2019-12-08 20:09:45 -08:00
Kurt
5e1fd36b96 Account for memory feeling off-by-one bug
If the feeling is zero the game's string formatter will treat it as
null, and will newline before the period.

Gen6 (if I recall correctly) had "it was happy" as index 0
Gen8 (new) has "it was happy" as index 1, with 0 being invalid-bad.

Slice the array differently for gen8 to include the empty line as index
0.

Closes #2549 , ty @crzyc && @architdate for testing index 0 :)
2019-12-08 18:56:37 -08:00
Kurt
f54bc7bf6f Batch editor updates
.PID=$shiny0 will do squares
anything else will do stars

.RelearnMoves=$suggestAll will give ALL TR moves, not just the ones for
its current movepool.
.Ribbons=$suggest will give all valid ribbons
.Ribbons=$suggestNone will remove all ribbons (except required ones like
event ribbons)
Closes #2568
2019-12-08 17:52:17 -08:00
Kurt
8acb336d51 Use enum for species comparisons
slightly easier to read with named values
2019-12-08 17:39:19 -08:00
Kurt
475dc02101 Add edge case handling for indeedee shared egg moves
#2416
2019-12-08 12:08:21 -08:00
Kurt
5ddd59c9aa Fix runerigus/yamask partial load fail
320 is max hp (31IV 252EV), is this just -60 from max HP (threshold to
evolve at?)
might need some more research to see what is going on with this

only trycatch in release builds; was confused until I stepped thru and
saw the crash
2019-12-08 00:03:08 -08:00
Kurt
c6ef2a845d Fix ribbon compare
oops
2019-12-07 23:39:32 -08:00
Kurt
4611146807 Update memory verifier
Adds handling for SW/SH quirks
Closes #2545
2019-12-07 23:36:39 -08:00
Kurt
19b1564eb2 Split history and memory verifiers
Rewrite a bunch of the history verification stuff
Fix a few test cases with incorrect OT Friendship (transferred), and
missing GeoCountry

Need to rewrite memory verification next
(All test cases currently pass)
#2545
2019-12-07 18:12:31 -08:00
Kurt
34452c2818 Add gen8 ribbon verification 2019-12-07 11:58:56 -08:00
Kurt
aa3d63e982 Add Mr. Rime to splitbreed table
Closes #2567
2019-12-07 00:04:46 -08:00
Kurt
861d7b6014 Remove unnecessary parameters for species fetch
#2567
2019-12-07 00:00:49 -08:00
Kurt
2b1aee7c38 Gen8: Update rules for having BestFriends ribbon
Closes #2562
ty @iiippppk
2019-12-06 20:22:23 -08:00
Kurt
d08e3a3f81 Fix form change evolution linking
GetDestinationForm for gen7+ is fine
gen7 and gen8 use the "form" argument as the destination form; -1 means
don't change
espurr-F just gets forced to 1 in gen7 since it's -1

Closes #2564 ty @iiippppk
2019-12-06 19:31:18 -08:00
Kurt
d24a09f7c9 Make level min/max virtual for nest
Closes #2566
be sure to set the correct flawless IV count & dynamax level so that the
encounter matches
2019-12-06 19:17:26 -08:00
Kurt
862a446eb3 Fix form sanitization for de-evolution
Better to handle things this way, we know for sure the form it HAS to
originate as.
Closes #2565
ty @iiippppk !
2019-12-06 19:00:41 -08:00
Kurt
be38a60267 Fix handling for get evolutions method
only used for Zukan7b, but add in handling so that it works for <=gen6
games, and supports form alterations too!

update style to match GetPreEvolutions

could probably update this to yield tuples (species, form) but LGPE/SWSH
only needs species. If there's the need for tuples later, should be ez
tweak.
2019-12-06 18:16:11 -08:00
Kurt
314d8f6b58 Update form destination handling
espurr-F evolves to form-1 from form0, even tho the form arg is -1 (gen7
consideration)
gen8 has 0/1 for the two evolutions, dictating the destination form
2019-12-06 17:36:36 -08:00
Kurt
f7620908df dummy out empty evo species 2019-12-06 17:21:38 -08:00
Kurt
7b6d2bfa48 Fix trainerID trainer card write 2019-12-06 16:59:54 -08:00
Kurt
f07aed904d add missing pokedex offset spoof for gen3 saves
https://projectpokemon.org/home/forums/topic/55704-drag-drop-to-boxes-not-working-in-blank-gen-3-save/
ty ICanSnake
2019-12-05 23:08:01 -08:00
Kurt
eac3804c7b Clean up dexlevel/evocriteria constructor usage
DexLevel was the initial abstraction, which was expanded/reused for
evolution details

I should probably merge the two classes since everything is passed as
EvoCriteria
The encounter generators do some silly form fuzzy match which can now be
more accurately checked since I've moved Form to DexLevel... maybe a
future commit can clean that up.

encounterarea2 was reusing this class, just use a throwaway readonly
struct as our temp value storage
2019-12-05 23:04:24 -08:00
Kurt
b49c5a5a8a Rewrite evolution lineage generating
- Use tail recursion and a lookup table (species | form) for reversing
- generate the reversal lookup by extrapolating all species-form
destination values (EvolutionLink)
All tests pass, and no special handling for forms is required. Kinda
suspicious that it works this simply...

Redo evolution banning (no wormhole for non-Alolan evolutions in SM), in
a style that we can ban the Gigantamax event evolutions
(pika/meowth/eevee). Their evolutions can't be resulted from a pre-evo,
because the in-game routine early aborts if the gigantamax flag is set
for those species.

Update gen4 personal tables (formCount was 0, needs to be a minimum of 1
by default)

Closes #2537
2019-12-05 22:32:47 -08:00
Kurt
786d9c8f18 Handle shedinja encounter balls
nincada -> spawn shedinja = pokeball (wild encounter rules if gen3)
shedinja encounter = wild encounter rules
2019-12-05 16:40:14 -08:00
Kurt
b2fc99e50a Update nest dist/crystal location get/check 2019-12-04 19:04:36 -08:00
Kurt
65b921f806
Only apply 3DS geoloc data for 3DS blank saves
Closes #2560

Different logic in SimpleTrainerInfo applies it to <=Gen5, but that's fine... 414cb2d39e/PKHeX.Core/Legality/Structures/SimpleTrainerInfo.cs
2019-12-04 14:00:53 -08:00
Kurt
414cb2d39e don't apply rib-markings on all
legality concerns
2019-12-03 23:41:24 -08:00
Kurt
d70a234552 Add $suggest for PKM.Ball
sets a legal ball, with preference for color matching
2019-12-03 20:14:36 -08:00
Kurt
e333f9b441 Add orbeetle 65 loc
thanks @sora10pls
2019-12-03 19:59:10 -08:00
Kurt
f45d730faf Add TrainerID for trainer card
Closes #2556
2019-12-03 19:54:34 -08:00
Kurt
71318c9bd5 Add clarification/notes 2019-12-03 19:54:06 -08:00
Kurt
ab7cf3252e Add snorlax raid dist data 2019-12-03 18:25:06 -08:00
Kurt
a0f2aded02 Use more optimized index find 2019-12-03 18:24:28 -08:00
Archit Date
3526c37f1e update forme to showdown strings (#2558)
* update forme to showdown strings

Galarian is represented as Galar on PS!
Polteageist has no form atall
galarian now called Galar by default to match with Alola as a forme. changed darmanitan forme-strings in form converter. Added sinistea to the forme ignore list when converting to showdown
2019-12-03 16:41:52 -08:00
Kurt
e9b9141eda
Fix property name typo
efec331741 (r36246093)

ty @AnalogMan151
2019-12-03 10:39:57 -08:00
Kurt
d3f7e7bf07 Minor simplifications
format >= 6 is always true (early return in entry)
don't double-flag/check memory presence in OTs from gen5 and below (hist
and OT verifier)

rename method; I'll probably rework the flow of things for gen6
verification and gen8 verification since the rules are slightly
different
2019-12-02 16:36:53 -08:00
Frank
efec331741 add some customization options in MyStatus8 (#2552) 2019-12-02 13:40:09 -08:00
Kurt
a844fb5249 Add strong dubwool location
https://projectpokemon.org/home/forums/topic/55654-new-pokemon-to-fix-on-pkhex/?tab=comments#comment-251010
2019-12-01 00:02:02 -08:00
Kurt
594c44f6c0 Set Gender for template
Closes #2548
2019-11-30 23:44:47 -08:00
Matt
7b7a161ac9 Minor fixes (#2547)
Fix Sinistea/Polteageist Form names (as per Strategy Guide)
Add Eternamax menu sprite
2019-11-30 13:19:22 -08:00
Kurt
f3ecff272c Update HA8 banlist
Closes #2544
Closes #2543
2019-11-29 22:33:11 -08:00
Kurt
2ee6fbb7e9 Only flag bred stuff for no-breed
Closes #2542
2019-11-29 18:54:07 -08:00
Kurt
c27224830d Rename rs Mystery Gift -> Mystery Event
Closes #2541

pret pokeruby still calls it Mystery Gift tho

11170ce90c/src/event_data.c (L88)
2019-11-29 18:48:58 -08:00
Kurt
89b4bc81b9 Update raid structure unknowns 2019-11-29 18:48:12 -08:00
Kurt
3c4e668d9a Add alcremie formArg gui
Closes #2538
Standardize nomenclature as FormArgument, add interface for those
exposing the property.
2019-11-29 10:44:52 -08:00
Matt
bc9be36123 Add more Gen 8 static encounter locations (#2540)
Also add West Sea Shellos/Gastrodon to transfer form banlist
2019-11-29 10:03:35 -08:00
Kurt
48a87397ec Split daycare8 to its own file
Add method to fetch daycare seeds from metadata
2019-11-28 21:13:53 -08:00
Matt
faf936bceb Update Gen 8 transfer banlist (#2536)
Alolan Forms can't be obtained yet, same with Hoenn Zigzagoon/Linoone and Unova Stunfisk.
2019-11-28 18:42:22 -08:00
Kurt
f25b36a306 Minor tweaks
Remove unused stuff
add some comments/xmldoc
Move Trainer1 to classes that use it
2019-11-28 14:00:55 -08:00
Kurt
ea2f7f338b Add weather indication to detailed parse output 2019-11-28 12:56:26 -08:00
Kurt
5ba396db6e Update shiny comparisons for (traded)eggs
PID rerolls happen on trade to ensure star/square state is kept
2019-11-28 12:40:33 -08:00
Kurt
2c0b85ef21 Add form banlist for g8
Weezing-0 has no de-evolution path (nothing evolves to it)
Just ban these forms existence in SW/SH
2019-11-28 12:09:55 -08:00
Kurt
f0cf28fbad Flag bred transfer mons
#2416
2019-11-28 11:51:23 -08:00
Kurt
e8bdc34a18 Tweak gift generator
Yield ranger manaphy gift as possible (encmoveset generator)
Move ranger manaphy equals check to PGT
2019-11-28 10:42:24 -08:00
Archit Date
897b97ceed comment typo fix (#2535)
lul
2019-11-28 10:35:18 -08:00
Kurt
7a51e48747 Add wc8 star/square pid types 2019-11-28 09:46:48 -08:00
Kurt
f5307c142b Use format sensitive move knowable check
Closes #2534
2019-11-27 23:07:41 -08:00
Kurt
5a1bffb2ba Split wild encounters for crossover & weather
Certain Mark values (ribbon) are only obtainable if the encounter was
obtained in some weather (I really hope there's no crossover cases for
this), and non-symbol encounters can't wander to another zone.

I wonder if you can wander from one zone with one exclusive weather, to
another zone, and get an 'unobtainable' mark (with the new zone's
weather) on the crossover mon's weather. yikes lmao
2019-11-27 22:46:14 -08:00
Kurt
a0ee7a3e51 Add route 2 lapras location
ty Waves (discord)
https://www.serebii.net/pokearth/galar/route2.shtml#xy-lake
2019-11-27 19:44:14 -08:00
Kurt
5761f03f94 Add OT memory details for gen6 ingame trades 2019-11-27 19:30:28 -08:00
Kurt
c81edac9e5 Fix CGB import
Trainer1 now unused for this class
Closes #2533
2019-11-27 18:33:30 -08:00
Kurt
907f036956 Disregard OT memory values on gen7 origin 2019-11-27 16:01:12 -08:00
Kurt
c4951f1650 Add strong piloswine location
ty wowjinxy
2019-11-27 11:34:20 -08:00
Kurt
d3bd37a950 tweak last saved string format
ty @sora10pls for testing
2019-11-26 23:10:28 -08:00
Kurt
bac6032152 Update last saved parsing
year is years-since-1900
month is months-since-jan (jan=0)
2019-11-26 19:15:05 -08:00
Kurt
4cd358833a Add corvisquire static enc location
https://projectpokemon.org/home/forums/topic/55611-corvisquire-route-3/
thanks ThePunish3D!
2019-11-26 18:20:52 -08:00
Kurt
b95ab53e92 Finalize unreleased item banlist 2019-11-26 17:16:57 -08:00
Kurt
5b932c961f Merge branch 'master' of https://github.com/kwsch/PKHeX 2019-11-26 16:58:44 -08:00
Kurt
08e293dadc Add SimpleTrainerInfo constructor
zeroes out console region data if not present in game
2019-11-26 16:55:28 -08:00
Chris
f23874b1ae
Safari/Sports Ball is also not released 2019-11-27 01:55:15 +01:00
Kurt
4182b22686
Update Unreleased Items(SwSh) (#2529)
https://www.serebii.net/swordshield/items.shtml

only Pixie Plate & Normal Gem are in the Game yet.
2019-11-26 16:13:30 -08:00
Kurt
5883acd5b9 Fix florges/floette evo tree
No personal stats for those evos different from main species
2019-11-26 16:12:35 -08:00
Chris
ba43631d40
Update Unreleased Items(SwSh)
https://www.serebii.net/swordshield/items.shtml

only Pixie Plate & Normal Gem are in the Game yet.
2019-11-27 01:08:31 +01:00
Kurt
9cb56be3dd Add bronzong/galvantula strong loc
previous Bronzong location is likely a crossover case

ty wowjinxy
2019-11-26 11:39:17 -08:00