Commit graph

1640 commits

Author SHA1 Message Date
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
Egzon Qukovci Jusufi
deece433a5 Add SWSH Legends to the Tables (#2637) 2020-01-15 20:49: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
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
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
d3f6d5935f Add form argument legality checks
Closes #2611 (Alcremie)
Closes #2604 (Runerigus)
2020-01-10 16:33:40 -08:00
Kurt
fdd321dd8c Make memory 6 fishy if textvar present
Closes #2621
2020-01-10 16:08:34 -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
718d00f970 Ban ha slowpoke-1 2020-01-09 23:50:15 -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
0dd4d1fe7a Remove unnecessary casts 2020-01-06 17:50:18 -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
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
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
0788780404 Add bewear motostoke crossover location
Closes #2619
2020-01-03 19:14:03 -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
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
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
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
Kurt
b294eba181 Fix combee gender check
silly convoluted checks
#2603
2019-12-27 19:17:08 -08:00
Kurt
940cdccb6b Restrict downleveled to lvl % 5 == 0 2019-12-27 00:17:59 -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
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
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
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
e6dcf64abe Disallow Spiky Ear Pichu eggs
sneaky gen4 bad hacks are bad
2019-12-24 13:21:56 -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
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
506e64186a Rearrange & re-do "CanHaveMemory" value check
Closes #2581
2019-12-11 19:37:57 -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
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
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
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
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
e333f9b441 Add orbeetle 65 loc
thanks @sora10pls
2019-12-03 19:59:10 -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
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
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
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
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
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
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
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
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
Kurt
15ef6555a8 Add WC8 memory & fix fallthrough
ty @sora10pls
2019-11-26 11:22:01 -08:00
Kurt
ef425af835 Add memory / console region checks for pb7/pk8
yeah your initial hacks were hacks

It appears there's a bug (in the game) for link trade memories --
applied to the OT memory instead of HT memory?? Fun!
2019-11-26 11:01:09 -08:00
Kurt
7960f2d748 Don't set console region data for pb7/pk8+ 2019-11-26 10:46:32 -08:00
Kurt
445fdee2ba Add shared memory interface (encounter) 2019-11-26 10:46:16 -08:00
Kurt
0f96b3c4d5 Add Species specific arg memories 2019-11-26 10:44:36 -08:00
Kurt
e8f5ac8a00 Minor clean 2019-11-25 22:51:07 -08:00
Kurt
7a10311207 Unban scrafty/scraggy HA
new EncounterStatic8N(Nest87,3,4,4) { Species = 560, Ability = A4 }, //
Scrafty
2019-11-25 20:31:42 -08:00
Kurt
c416fc5fa1 Update handling for invalid genNumber
all edge case movepool stuff is IGeneration; we're fine just using
IGeneration.Generation
2019-11-25 18:33:38 -08:00
Kurt
5dde0f5c43 Merge Error flag into Parsed
Simplify some logic with ??=
2019-11-25 18:32:50 -08:00
Kurt
c5593470df Add 2 more static enc locations, swap yield order
Private report with 3 specimens, 2 undocumented met locations
The other was a Gigantamax which matched another static encounter,
resulting in a partial match being accepted (the real match came after,
but was never iterated to).

Rather than adding deferrals for Enc8, do nest stuff first since it's
the most restrictive

In the past we didn't really have duplicate static encounters with
slightly different permissions.

Thanks @ReignOfComputer & {reporting user}!
2019-11-25 17:57:25 -08:00
Kurt
b37a0c5bfe Add downleveled regular raid movepool verification
#2416
Not having enough badges pulls the level of the captured mon down

need more info if the other raid types behave similarly
2019-11-25 08:52:03 -08:00
Kurt
5dec94d456 Handle banned form eggs with more flexibility
Closes #2519
better to not generate the encounter as opposed to flagging it after
generation
2019-11-25 00:16:16 -08:00
Kurt
6ca8571759 Add stomp min level for Steenee
Closes #2520
2019-11-24 23:50:10 -08:00
Kurt
b588af8300 Ban meowstic-1 hidden ability
Closes #2521
2019-11-24 23:14:42 -08:00
Kurt
0dcd9b744a Include swsh held items to valid items list
Closes #2518
2019-11-24 22:34:51 -08:00
Kurt
c446ff5b51 Fix non-galar egg moves passing
Closes #2516
2019-11-24 18:18:26 -08:00
Kurt
e1e7bf321b Add South Lake Miloch for den 42
#2416
2019-11-24 11:07:31 -08:00
Kurt
aeb3ee6cec Fix shedinja evo chain logic
#2416
2019-11-24 09:49:54 -08:00
Kurt
64d94903ff Change fixed ability
0=abil1
1=abil2
2=abil4
3=abil1/2
4=any

probably same as WC8 etc

doesn't have any impact as there's other encounters that allow Hidden
2019-11-24 06:26:33 -08:00
Kurt
113d16fa5d Fix darumaka->darmanitan blizzard move
#2416

Looks like the only issues left are:
Shedinja
Crossover/Bleed locations
Static Encounter locations
2019-11-23 22:48:02 -08:00
Kurt
96f6db0e38 Add recognition for distribution raids
Closes #2457
2019-11-23 22:23:43 -08:00
Kurt
52cd8ae855 Revise HA banlist
https://www.smogon.com/forums/threads/sword-shield-battle-mechanics-research.3655528/post-8291236
2019-11-23 20:50:56 -08:00
Kurt
09d1d0e799 Add darumaka to galar origin
lol oops
Closes #2508 thanks @iiippppk !
2019-11-23 19:45:18 -08:00
Kurt
5df6565597 Add fast ball
Closes #2507
2019-11-23 19:12:53 -08:00
Kurt
cccf2a1939 Fix flawless IV count check
#2506 trapinch
2019-11-23 14:46:09 -08:00
Archit Date
f96eafa682 grab correct evo stage 1 from evocriteria list (#2503)
EncounterMovesetGenerator was using the de-evolution order in the passed evocriteria list
2019-11-23 09:01:09 -08:00
Kurt
e70a2f40b8 Add den crossover via online share
fix ability deferral for non-HA (eg. A4 mr rime encounter)
2019-11-23 08:27:50 -08:00
Kurt
b29fc5216e Add shared moveset transfer
Closes #2501 for now
2019-11-23 07:27:06 -08:00
Kurt
c27b1d0bb8 Revise hidden ability banlist
Might need to remove entries once the Distribution raid data is added.
2019-11-23 07:12:50 -08:00
Chris
03ee264d0c Add Vanilluxe Multiple Encounters (#2499)
* Add Vanilluxe Multiple Encounters

Vanilluxe spawns also on any Lake if its snowing
2019-11-22 21:32:39 -08:00
Kurt
9e4c408ac7 Fix galar form egg move fetch
Closes #2500
2019-11-22 21:32:05 -08:00
Kurt
26b21d8603 Rewrite reverse evo lineage rectifier
Closes #2479
Fixes Silvally in swsh not having evo reversal content for each form
2019-11-22 21:04:34 -08:00
Kurt
d25f388bf5 Fix dexnav relearn checks
Closes #2491
Thanks @NinFanBoyFTW !
2019-11-22 19:59:40 -08:00
Chris
97f156364d Update Multiple Encounters for Lakes (#2498)
happens also for:

Drifloon, Wingull, Goldeen, Frillish, Magikarp

but theese aren't listed, feel free to add new encounters.
2019-11-22 18:26:47 -08:00
Chris
e90d2fbc29 Also Seaking have multiple Locations (#2495)
^
2019-11-22 08:05:46 -08:00
Chris
4c9815c17e Add Multiple Gyarados Spawns (#2493)
Gyarados Spawns in Area 1:
North/East/South/West Lake Miloch, 

Area 2:
the Lake of Outrage (in a Wild Area)
2019-11-22 08:04:17 -08:00
Chris
8bdc110e2b Added Multiple Lapras Spawns (#2492)
Lapras Spawns in Area 1:
North/East/South/West Lake Miloch, 

Area 2:
the Lake of Outrage (in a Wild Area)
2019-11-22 08:03:16 -08:00
Kurt
4b3d85d5e6 Add multi-location strong encounter handling
#2484
OH BOY REUSED INDEXES
smart to save space, but a small pain for legality

feels pretty bad breaking up abstractions for every minor difference in
verification...
2019-11-21 21:44:41 -08:00
Kurt
5235c9b252 Revert "Add lapras encounter location?"
This reverts commit e4e516d1c2.
2019-11-21 21:14:45 -08:00
Kurt
e4e516d1c2 Add lapras encounter location?
#2484
The other lapras encounter was found by @sora10pls and was lv56; we're
assuming this other lapras is the encounter (for now).
2019-11-21 20:59:24 -08:00
Kurt
4c8dd0cb3a Defer rather than reject
#2490
2019-11-21 20:05:20 -08:00
Archit Date
e93bc5e67c Misc Nest Fixes (#2490)
* fix A3 and A4 ability values

private > internal so it can be used in Encounter Nest matching

* reject ability number 4 if ability is from A3
2019-11-21 20:03:02 -08:00
Kurt
b9e32c67a0 Add encounter static deferral oop
We've already been doing something similar for the deferral check; just
merge the logic into the base object
Closes #2489
2019-11-21 20:02:08 -08:00
Archit Date
93028b3439 modify nest locations based on serebii (#2483)
https://serebii.net/swordshield/maxraidbattles.shtml
2019-11-20 23:02:54 -08:00
Kurt
f6c6639078 Add online den location
There's still the down-leveled issue with high level moves. fun.
2019-11-20 23:02:31 -08:00
Kurt
f30a14ebf0 Disallow dynamax level on story legends
ty @sora10pls
2019-11-20 18:15:21 -08:00
Kurt
473afb8377 Initial rough draft of nest location matching
nest data doesn't match what's expected, but recognition is ready for
tweaks
2019-11-20 17:07:55 -08:00
Kurt
c6f515c755 Use more performat array join 2019-11-20 17:07:55 -08:00
ReignOfComputer
f19193c66f Static Locations Update (#2475)
* Static Locations Update

- Removed version lock on Motostoke Stadium Vulpix (may want to investigate Growlithe)
- Wild Area Updates
- Other Static Updates

* Squeeze in 2 more Statics

* Rhydon Static Location

Last one I promise.
2019-11-20 11:38:25 -08:00
Kurt
8294d77464 Add Carkol static loc 2019-11-19 20:24:12 -08:00
Kurt
2c5a7cd5de Add linoone strong loc 2019-11-19 19:41:30 -08:00
Kurt
feef1c1122 Add 2 more strong locations 2019-11-19 19:27:57 -08:00
Chris
7ef4fce89e Add Eevveelutions Spawns for Lake of Outrage (#2471)
All Eeveelutions spawns at the Lake of Outrage, based on the weather?
2019-11-19 19:21:41 -08:00
Kurt
18b20e09d2 Add leafeon location 2019-11-19 19:03:39 -08:00
Kurt
e6476e943b Change Gender to OT Gender
ty @sora10pls for confirmation
2019-11-19 18:55:03 -08:00
Kurt
0f4598ff66 Update some comparisons 2019-11-19 18:02:57 -08:00
Kurt
85fa6e0273 Add more strong encounter locations 2019-11-19 17:07:11 -08:00
Matt
ea80718919 Unban GO Shiny Tentacool (#2468)
* Unban GO Shiny Tentacool

* Also unban GO Shiny Meowth
2019-11-19 13:54:29 -08:00
Kurt
fa344208b2 Add crossover location handling
Closes #2461 by implementing slightly differently

Dictionary instead of new[] every area
Checks original met location first before attempting the dictionary
lookup (missing in pull request)
Easy path forward if LGPE crossover is needed

Potential issues: Since encounter types aren't marked, shaking trees and
fishing encounters are allowed to cross over. Maybe need to have some
marking for encounter slots or something...
2019-11-19 08:38:18 -08:00
ReignOfComputer
0230dafe2b Wild Area Updates from RoC's PC (#2460) 2019-11-19 08:13:53 -08:00
Kurt
a368b81519 Minor clean 2019-11-18 22:48:03 -08:00
ReignOfComputer
0ef6f024d6 Wild Area Updates from #2416 (#2459)
https://github.com/kwsch/PKHeX/issues/2416
2019-11-18 22:21:13 -08:00
Kurt
f88388cb70 Add Form (AltForm) to IEncounterable interface
All of the encounterable templates have Form anyway; funny that I was
consistent naming them all differently than pkm.AltForm :)

Closes #2452
2019-11-18 22:20:55 -08:00
ReignOfComputer
6d95fa5884 Wild Area Updates from RoC's PC (#2456) 2019-11-18 20:26:38 -08:00
Kurt
1df90199e3 Rework GetBaseSpecies to return EvoCriteria
#2452
2019-11-18 20:26:11 -08:00
Kurt
5a4c026dc7 Restrict egg related species fetch to EvoCriteria
#2452
2019-11-18 20:10:39 -08:00
Kurt
535397cf5e Consolidate egg ctor with args
Form is an absolute requirement for the encounter data.

#2452
2019-11-18 20:01:48 -08:00
Kurt
2b76fe148d Fix property reference for Darmanitan-G
lul
Closes #2453
2019-11-18 19:29:05 -08:00
Kurt
5e1937d8b4 Fix fossil8 to unbreedable
Not needed in the HA banlist table since it can't breed.

Closes #2451 thanks @iiippppk !
(undiscovered egg group)
2019-11-18 19:26:01 -08:00
Kurt
1ea3976805 Split up Encounters8
Nests in their own file
Encounter types in their own files
2019-11-18 19:23:01 -08:00
Kurt
e9fdc721df Add chewtle 2019-11-18 18:42:10 -08:00
Kurt
3aa3a29264 Add 3 more static enc locations 2019-11-17 22:04:52 -08:00
Kurt
38abafab99 Catch some evolution edge cases 2019-11-17 22:04:41 -08:00
Kurt
47be249331 Rework evo tree chaining to track form
Now recognizes & reverses form-changing evolution chains like Sirfetch'd

basically the whole process is to build the tree but point in the
opposite direction (for de-evolution paths)
2019-11-17 21:45:53 -08:00
Kurt
4bcf60746b Add egg move sharing checks
Was referencing wild caught mons that are given a single egg move; this
logic handles shared egg moves too via daycare.

Probably need to rework SplitBreed into a dictionary; this might not
catch Mime/etc split breeds if they have different tables.
2019-11-17 17:14:21 -08:00
Kurt
c2dce518c2 Invert sign of fake met locations
Suggested encounters check < 0
2019-11-17 16:03:53 -08:00
Kurt
d4c5919e5e Revisions for some static encounters
Identified a few more
2019-11-17 15:50:41 -08:00
Kurt
13adc38ee8 Add elemental tutors
Closes #2443
Capture some array references to avoid re-fetching array -- array
reference is readonly so it probably won't matter
2019-11-17 11:13:57 -08:00
Kurt
ea822e9fcd Add raid flawless IV check (speculation) 2019-11-17 09:55:27 -08:00
Kurt
86a20afe8e Minor style fix 2019-11-17 09:47:10 -08:00
Kurt
23c04cf809 Add beast ball to wild balls 2019-11-16 22:22:21 -08:00
Kurt
f20f6cd4bb Only check east asian script chars on gen7&below
Closes #2437 thanks @iiippppk !
2019-11-16 17:47:26 -08:00
Kurt
31c09c52e8 Add initial nieve check for ball inheritance
Closes #2438
2019-11-16 17:45:51 -08:00
Kurt
31f9a5f4d8 Correctly locate pk8 foreign transfer checks 2019-11-16 16:05:45 -08:00
Kurt
524ceb7bf9 Fix dracozolt species ID
heh dunno how that happened
2019-11-16 15:02:32 -08:00
Kurt
dbda5e6934 Update comments
align all, add location text for motostoke 3(4) encounters
2019-11-16 14:37:00 -08:00
Kurt
e5bd026eec Add static crustle location
ty @ReignOfComputer
2019-11-16 12:46:24 -08:00
Kurt
ce4cd2c60f Add non-levelup evo methods to validator 2019-11-16 11:52:40 -08:00
Kurt
d65e3369c9 Add toxtricity evo check
refer to sub_71007805B0 for algo
2019-11-16 11:01:00 -08:00
Kurt
3be4fde2d5 Prevent non-galar forms for wild match
uses the same logic as the wild area boost lines above
2019-11-16 10:35:08 -08:00
Kurt
29d52e065f Don't generate invalid sister-pair eggs 2019-11-16 09:00:05 -08:00
Kurt
d1e9bc3877 Update evo dictionary and unreleased list
#2416 thanks @AnalogMan151
2019-11-16 08:18:12 -08:00
Kurt
d3b2a798fa Fix evo via move check (tsareena)
Closes #2427
2019-11-16 08:01:49 -08:00
Kurt
981ed9a253 Add technical record flag editor & api 2019-11-15 23:12:28 -08:00
Kurt
848737b2a0 Remove giga gender lock
can be female
2019-11-15 21:05:19 -08:00
Kurt
025e36c5fc Add treasure items to valid held item table 2019-11-15 19:50:22 -08:00
Kurt
ab7e920410 Update toxel static encounter def
flawless attack IVs, yay
2019-11-15 19:43:09 -08:00
Kurt
451694da28 Flag past gen transfers
not valid yet
2019-11-15 19:37:04 -08:00
Kurt
cefb56a749 Sword/Shield Update 2019-11-15 17:52:08 -08:00
Kurt
a6b6383538 Handle more messages
un-nest some classes, tooltip/menu disposing
2019-10-27 20:39:15 -07:00
Kurt
9401b7a790 More readonly struct tweaks
help dat compiler
minor clean elsewhere
2019-10-26 23:18:25 -07:00
Kurt
46640d48a3 Misc clean
un-nest classes,
move some logic to core,
update some get-only properties that return arrays to methods
2019-10-26 12:58:55 -07:00
Kurt
e3efa65160 Cleanup
handle messages for dirty cleaning :)
2019-10-26 12:33:58 -07:00
Kurt
1c418e8394 Add advanced format output
groups together by encounter slottype (grass, water, etc) for a little
more detail
2019-10-25 19:53:32 -07:00
Kurt
f0b320eb28 Remove [Relic Gold] from g7 item banlist
Closes #2404 ty @CaptainBarnaklez (aka Glitch Guide Gabe on Discord)
2019-10-20 15:55:13 -07:00
Kurt
bb84ec4e89 Handle some vs message suggestions 2019-10-19 20:33:17 -07:00
Kurt
c3a6fd2a64 Handle bad gennumber indexes
Maybe returning 0 for "bad gen" will prevent bad array indexing...
2019-10-18 20:50:38 -07:00
Kurt
fee92e4f32 Handle past gen transfer evochain for new evos
basically Math.Max(2, format);
we always want permissible evo chains when fetching encounters
Closes #2403 ty @Rayqo !
2019-10-17 18:23:50 -07:00
Kurt
02420d3e93
PKHeX.Core Nullable cleanup (#2401)
* Handle some nullable cases

Refactor MysteryGift into a second abstract class (backed by a byte array, or fake data)
Make some classes have explicit constructors instead of { } initialization

* Handle bits more obviously without null

* Make SaveFile.BAK explicitly readonly again

* merge constructor methods to have readonly fields

* Inline some properties

* More nullable handling

* Rearrange box actions

define straightforward classes to not have any null properties

* Make extrabyte reference array immutable

* Move tooltip creation to designer

* Rearrange some logic to reduce nesting

* Cache generated fonts
* Split mystery gift album purpose
* Handle more tooltips
* Disallow null setters
* Don't capture RNG object, only type enum

* Unify learnset objects
Now have readonly properties which are never null
don't new() empty learnsets (>800 Learnset objects no longer created,
total of 2400 objects since we also new() a move & level array)
optimize g1/2 reader for early abort case

* Access rewrite
Initialize blocks in a separate object, and get via that object
removes a couple hundred "might be null" warnings since blocks are now readonly getters
some block references have been relocated, but interfaces should expose all that's needed
put HoF6 controls in a groupbox, and disable

* Readonly personal data
* IVs non nullable for mystery gift
* Explicitly initialize forced encounter moves
* Make shadow objects readonly & non-null
Put murkrow fix in binary data resource, instead of on startup
* Assign dex form fetch on constructor
Fixes legality parsing edge cases
also handle cxd parse for valid; exit before exception is thrown in FrameGenerator

* Remove unnecessary null checks
* Keep empty value until init
SetPouch sets the value to an actual one during load, but whatever

* Readonly team lock data
* Readonly locks
Put locked encounters at bottom (favor unlocked)

* Mail readonly data / offset
Rearrange some call flow and pass defaults
Add fake classes for SaveDataEditor mocking
Always party size, no need to check twice in stat editor
use a fake save file as initial data for savedata editor, and for
gamedata (wow i found a usage)
constrain eventwork editor to struct variable types (uint, int, etc),
thus preventing null assignment errors
2019-10-16 18:47:31 -07:00
Kurt
a70769dc76 Remove static encounter voltorb def
unused ingame; only electrodes are static

Closes #2399, ty @steph9009 !
2019-10-11 08:19:35 -07:00
Kurt
4baf745af8 Use some c#8 sugar
static local functions
switch expressions
using usings :)

nullable next?
2019-10-07 18:40:09 -07:00
Kurt
87f43a47d8 Bump lang version to 8
some lang upgrades
2019-10-04 20:10:50 -07:00
Kurt
255cdc6ae0 Seal r2
https://www.reddit.com/r/csharp/comments/dd5c1o/til_sealed_override_modifier/

only a few instances for now
2019-10-04 15:56:22 -07:00
Kurt
d3b0c392b2 Minor tweaks
no functional change
2019-10-03 22:21:33 -07:00
Kurt
8d8adde2b1 sealed
sealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealed
2019-10-03 19:09:02 -07:00
Kurt
ffe3a4ba15 Relocate resource naming for sprite fetch to draw 2019-10-03 18:23:40 -07:00
Matt
72a751b9ce Update GO Shiny Banlist (#2397)
oddish family
2019-10-02 20:04:49 -07:00
Kurt
03c3610eb5 Handle level20 transferred feebas edge case
Closes #2394 thanks @iiippppk !
2019-09-27 20:22:54 -07:00
Kurt
7013d4f0c8 add 7->8 transfer legality check
currently flags anything transferred as illegal, which is the right
thing to do until home is released.
2019-09-24 23:28:05 -07:00
Kurt
825e06130e Add nullable reftype compiler checks to test proj
New in c# 8
Assert.True(check for null) doesn't give a hint that the obj isnt null
afterwards.
Assert.NotNull does have the compiler hint attribute
could probably use fluentexpression syntax, but resharper doesn't pick
up on the nonnullable hint like vs does.
GeneratorTests: swap FirstOrDefault to First, can keep the fluent style
and resharper gets the hint.

tl;dr : resharper doesn't look at external lib for hints, gotta use
Assert.NotNull or something that doesn't return null
2019-09-23 18:13:51 -07:00
Kurt
ab0b8979e9
Add swsh content placeholders (#2392)
placeholder content until real data is dumped
2019-09-23 16:56:47 -07:00
Kurt
8912f76726 Clean up super training medal checks
Futureproof with transfer considerations
This is just a guess; gen7 didn't update the medal count and if we
assume pk8 overhauls the structure for a new console, they'll drop old
data.

With c#8 later next week, will move SuperTrainingMedalCount() to a
default interface method ez.
2019-09-20 20:55:36 -07:00
Kurt
3c50983afd Use less efficient IsLevelWithinRange, for clarity
See previous commit for discussion; it's easier to read and maintain
this rather than have the precomputed min/max comparisons.

LevelMin - minDecrease <= min && max <= LevelMax + maxIncrease;
See EncounterArea7b:
Since we know min and minDecrease (0) before doing the linq filter we
can precompute the lowbound, same for highbound; but this isn't
immediately obvious to the reader. The perf cost is pretty much
negligible in the big picture, so leave it in the more readable state.

Thanks @fattard & @ammako !

#2389
2019-09-19 22:54:53 -07:00
Kurt
a4a0e3ac6e Fix flute level amp direction
The inputs to "IsLevelWithinRange" are the highest value the
lowest-level can be, and the lowest value the highest level can be...
seems confusing (hence the original error).

If a slot is 6-7, with a wild encounter (flute), we can go +/-3 from
6-7, which is 3-10.
With an encounter of level 5, the inputs are: 5+3, and 5-3 (8, 2).
Since 8>lvlmin and 2<lvlhi, we can get a level 5 pkm from the slot
(using a negative flute yielding a -1 adjustment).

I could probably refactor it to be a 3-input signature (lvl, lvlneg,
lvlpos), and have it do LevelMin - lvlneg <= lvl && lvl <= LevelMax +
lvlpos

I should probably refactor these methods to do minLevel & maxLevel (so
baseSpecies.Level to CurrentLevel for pkm that lost their original met
data) but nothing needs the extra logic at this time.
2019-09-19 22:37:56 -07:00
Kurt
7e70d83664 Add missing filter overrides
Were using default filter behavior, which needs to be tweaked to account
for the original met location/level not being present (ie skip the
minLevel bounds check).

Hardcode logic for HasOriginalMetLocation for simplicity

Closes #2389 , thanks @Ammako !
2019-09-19 16:19:07 -07:00
Kurt
b41f2a3062 Extract logic from PKX
Extract Species Name logic to SpeciesName
Extract Language logic to Language
Remove FormConverter wrapper for string[] fetch
Rearrange some logic to more appropriate locations, update access
modifiers / types
Move some pkm array methods to arrayutil, make generic

PKX.GetVCLanguage was a dupe of _K12.GuessedLanguage() so just expose
the method

PKX is now back to pkm data manip only
2019-09-18 19:58:23 -07:00
Matt
84f72ed2b9 Unban GO Shiny Mewtwo (#2387)
Ultra Bonus Unlock (Week 3)
2019-09-16 15:04:52 -07:00
Kurt
0fe42a1db3 Minor tweaks
no functional change
2019-09-14 11:48:07 -07:00
Kurt
972e35a289 Minor reorganization
Move the ea32->array creation to the actual class
2019-09-13 09:08:12 -07:00
Kurt
aa6f803ba9 fix g7sm trade strings
borked in a prior commit, nice string reference
2019-09-13 08:36:21 -07:00
Kurt
734aa33898 Split encounter areas, relocate slot finding to obj
Now logic is reasonably split, and each format of area has its own way
of yielding slots

Too much junk with checking flute boosts or catch combo applicability;
just let the area dictate how slots match.
2019-09-12 23:20:52 -07:00
Kurt
477187a66c Split EncounterArea into game-specific classes
Generating encounters from an EncounterArea is getting a little stupid
without inheritance; each type can now have its own specific behavior
without checking for each individual type of generation pattern. Will
add the abstract method implementations in a future commit

Move some string[] array fetch (for all languages) to Util
2019-09-11 22:06:24 -07:00
Kurt
c5ebbbbe15 Minor clean
Magic number -> const usage
default(T) -> default (c#7.x feature)
remove some unused stuff
fix indentation in some spots
2019-09-10 22:07:50 -07:00
Kurt
62d08d7c30 Misc clean
split some methods with optional parameters=null
add more xmldoc
replace some magic numbers -> enum/const references
consolidate common array operations (span soon maybe?)
2019-09-10 00:21:51 -07:00
Matt
5ab0005de7 Update GO Shiny Banlist (#2384)
Ultra Unlock Bonus, Week 2.
2019-09-09 21:07:30 -07:00
Kurt
b81a1e1e29 Refactoring
Increase abstraction for arbitrary slot get/set operations, and fracture
SAV4 behavior for each game type.

Adds: Undo/Redo of party slot changes
Fixes: Fixed Gen5 daycare slot 2 reading, and EXP reading
Fixes: Some slot color glitchiness
Fixed: Box layout editor now hides the flag label if no flags are
present
Fixed: Gen7 box flags are now shown (unknown purpose lol)
Changed: savefile objects are generally smaller (removed a few shared
offset fields)
2019-09-02 19:30:58 -07:00
Matt
afd4ff25a5 Fix off-by-one (#2382) 2019-09-02 19:28:48 -07:00
Kurt
0fc9b4dd15 Fix lgpe init
oops prior commit
2019-09-02 19:07:20 -07:00
Kurt
ef5ff32c3c Add GO transfer restrictions for min level
Closes #2381

Keep Raichu and Marowak at the end for ez referencing. Keep a separate
refence for alolan kanto stuff for futureproofing

Might want to improve the EncounterArea abstraction to do the
slot-finding labor themselves, but whatever, hardcode stuff until swsh
throws new monkey wrenches in. A good idea would be a dictionary with
level forcings [species | form << 10] = X and use the dictionary to
check on slot creation
2019-09-02 18:38:12 -07:00
Kurt
cf574337e9 Rewrite encounter move suggestion logic
more straightforward logic flow, don't repeat same <= 2 comparison
2019-08-14 16:35:25 -07:00
Matt
fb4a33ce7e
Unban GO Shiny Poliwag
Yokohama GO Fest
2019-08-05 21:06:57 -04:00
ReignOfComputer
33ae5b3ac5 Add Realgam Tower to Colosseum Encounters (#2368)
https://github.com/kwsch/PKHeX/issues/2367
2019-07-30 08:43:30 -07:00
Matt
79127d02e4 Update GO Shiny banlist (#2365) 2019-07-26 15:33:19 -07:00
Kurt
db632905fd Remove WasEgg setter
WasEgg (aka WasDefinitelyAnEgg) from stored properties is one thing,
WasEgg from encounter info is another; don't mix
2019-07-25 17:42:20 -07:00
Matt
9cab2e366d Misc Let's Go updates (#2361) 2019-07-15 09:05:53 -07:00
Kurt
d153224af1 Add traded egg allowance for nickname
store bool for reuse, not any slower :)
Closes #2320
2019-07-11 22:55:41 -07:00
Kurt
1de685c6d8 Add Happy Hour/Hold Hands
per confirmation from @PP-theSLAYER

https://projectpokemon.org/home/forums/topic/53818-these-events-are-flagged/?do=findComment&comment=246918
they probably won't release these two moves tho, LGPE has become stale
2019-07-08 22:18:15 -07:00
Kurt
90cc8ca3ec Add Celebrate for lgpe valid move filter
event move only
still haven't bothered finding the table in the exefs that results in
the pkm with an oob move being dummied. hardcoded based on data for now
:)
2019-07-08 22:14:21 -07:00
Kurt
605b410d52
Make Distribution Super Training missions invalid
Was initially implemented as fishy during SM's initial implementation. Any nonzero value in this byte is invalid, don't even bother checking unused/count.

Now that Gen6 (and Gen7) are no longer current gen, any hope for them being released is the same as hoping for Gen4's Azure Flute Arceus. Thus we mark as invalid :)

Closes #2353 by effect of no longer flagging as Fishy. I think that my initial implementation of VC stuff had assumed the Generation==7, but later used 1/2 for factual correctness.
2019-07-08 12:12:16 -07:00
Kurt
fef4dbb9dc More super training checks
Check the secret unlocked/complete flags for eggs
Check the count for VC, and flags too (even though they're checked
later, just do it here)
#2353
2019-07-07 15:04:58 -07:00
Kurt
7a2b27ebbe Provide min level to evochain fetch
Feels pretty brittle with all the optional parameters; if things get
funky for SW/SH it may warrant a rewrite of this portion

Closes #2345 ty @iiippppk !
2019-07-02 08:34:28 -07:00
Kurt
b5945624eb Add VC2 trade OT gender check
Closes #2343 ty @WEERSOQUEER !

#2338 was referenced by
4d08e21126
, that commit was incorrect. Looks like these 2 have OT Gender female.

Instead of marking every trade MALE except for these two, just update
the handling (i'll probably regret this lol)
2019-06-29 17:43:09 -07:00
Kurt
4eb3f8529b Filter Species & Moves for legal combobox display
LGPE will missingno your pokemon if it's not a Kanto/M&M, or one of its
moves is not obtainable. For the user's benefit, filter down these
sources to the non-baddata list.

Item filtering and ball filtering might be something to think about for
the future, but not much benefit vs effort.
2019-06-29 08:19:01 -07:00
Matt
08ea140f17 Update GO Shiny banlist for GO 3rd Anniversary (#2342)
* Update GO Shiny banlist for GO 3rd Anniversary
2019-06-28 11:04:23 -07:00
Kurt
c8747d4ede Apply OT mismatch deferral to gen2
Check the OT length for the deferral

other encounters are more permissive than trades, hence why we defer
unless we know for certain. Same OTs are possible, except for the
too-long ones!

Closes #2338 , thanks @WEERSOQUEER !
2019-06-27 21:38:24 -07:00
Kurt
4d08e21126 Explicitly check VC in-game trade gender
can't have Female ever, so check == 0
#2338
2019-06-27 21:24:08 -07:00
Kurt
da93a19c05 Add edge-case transfer OT cases
Needs to be checked prior to the strict Array Index search, as we can't
have an exact string match.
can probably be revised to a StartsWith to only check for the specific
language match, but that's a little less obvious & extra work :)
#2338
2019-06-26 21:19:37 -07:00
Kurt
71fdd01a93 Fix Stationary haxorus encounter gen
remove unnecessary %25 check (only applicable for gen4 encounters),
unneeded for gen5 method.

add a test case to generate a haxorus for all natures, verify shininess

Closes #2336
2019-06-26 20:37:26 -07:00
Kurt
444eab0756 Add mystry mew seed table
no validation for wc3 encounters yet, dunno when that will happen
2019-06-25 21:15:56 -07:00
Matt
7472ba8152 Encounters cleanup (#2335) 2019-06-25 10:55:35 -07:00
Kurt
6b18208ccb Fix g2 trade OT check
Closes #2332 thanks @WEERSOQUEER !
2019-06-24 15:45:52 -07:00
Kurt
63c705061d Add recognition for Method 3 encounters
Pass them as Legal for wild encounters similar to M1/M2/M4.
Add test cases & test pkm validation
Add pid generator support

I decided against checking these PIDIVs after all others; inlined
methods.

Closes #2328 , thanks @pokecal !
2019-06-19 19:15:06 -07:00
Matt
59a7e247cb Update GO Shiny banlist (#2325) 2019-06-13 08:46:53 -07:00
Matt
186adca755 Unban GO Shiny Onix (#2323) 2019-06-10 22:33:34 -07:00
pokecal
84d1354e2f Update EncounterArea.cs (#2318)
fix FishingTable of Route12,13(same as R32), R14(water inaccessible).
Some issues about Qwilfish will be solved.
2019-06-07 19:24:59 -07:00
Kurt
2b8ef9236a use some explicit dex numbers as enum 2019-06-01 10:22:49 -07:00
Kurt
a9152d36a4 Minor tweaks
make some enums non-int (in favor of byte etc)
return current nickname if desired
clamp nature top bound too
2019-05-29 22:40:07 -07:00
PP-theSLAYER
88d7be62d9 Removed Special Funfest Poliwag & updated min Lvl. (#2315)
According to the link below, the official page states that Poliwag's announcement was a mistake, and they clarified it would not be appearing.
This message was echoed across various pages (Sapporo, Fukuoka, Tohoku), not just the Yokohama one.
https://voice.pokemon.co.jp/stv/yokohama/2013/08/post-2286.html

Additionally, based on tests from me and jojo, Funfest missions forces the grotto encounters to be max level (of the individual grottoes).
https://projectpokemon.org/home/forums/topic/39810-unlock-all-funfiesta-missions/?do=findComment&comment=245303
2019-05-27 00:39:36 -07:00
PP-theSLAYER
968f850138 Added Funfest week 3 encounters (#2312) 2019-05-21 23:37:47 -07:00
Kurt
9b8b8f784a Revert "Add another vc nature checks"
This reverts commit b51bdc9230.
2019-05-20 17:05:53 -07:00
Kurt
d1bc1d07c8 Disallow shiny aura
if hadou were here, it'd get the same anti treatment too
2019-05-17 17:48:45 -07:00
Kurt
7f9328e883 Fix vivillon comparisons
Fix template->pkm form fetch too; would return 0 for non-subregion
countries rather than the Country Specific form ID

https://projectpokemon.org/home/forums/topic/52800-invalid-internal-error-with-the-spewpa-evolution-line/
2019-05-16 22:01:11 -07:00
Kurt
73b61e5bf0 Add gender changed azurill evo pokewalker edge case
Closes #2311 , thanks @SpiredMoth !
2019-05-15 17:14:48 -07:00
Matt
25985f11e6 Fix Static/Gift IV method call (#2310) 2019-05-15 12:07:48 -07:00
Kurt
b7f024e3ea Fix arceus held item compare
https://projectpokemon.org/home/forums/topic/52771-bug-report-pkhex-20190515-arceus-forms-error/
2019-05-15 09:46:52 -07:00
Kurt
1d44136e54 Update xd fateful flag leniency
not enough documentation to know what every single flag does; just be
lenient

I assume that flags being present XK3->PK3 will set fateful, so we could
remove that logic...
Exposing bitflags for editing isn't fun for the editor, so just ignore
it behind the fateful bool get/set.

fateful required for all xk3 origin

#2289
2019-05-14 20:14:15 -07:00
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