Commit graph

1289 commits

Author SHA1 Message Date
Kurt
1ab7acc958 Ignore empty pkms when exporting a list of sets
chain method calls
2018-06-16 21:46:43 -07:00
Kurt
cb0ae14a50 Set gender for gen3-5 reroll
#2012
2018-06-16 13:27:50 -07:00
Kurt
b81cad84ab Fix arg providing for GetRandomPID call
Closes #2012
2018-06-16 10:51:53 -07:00
Kurt
efe77e3b5c Don't clear unown forme on pk4->bk4
Closes #2011
2018-06-16 10:29:36 -07:00
Kurt
c3cbb0fc44 Fix gen2 vc1 evo prune
https://github.com/kwsch/PKHeX/issues/1999#issuecomment-397818377

evo chain had already pruned tyrogue due to level 20 transfer level
(lvl19 tyrogue not possible), can't just remove last entry. Remove any
entry after the g1 species.
2018-06-16 09:06:12 -07:00
Kurt
f8a1d26694 Fill empty ability values with ability1
update handling that checked for this case to instead check for
equivalence to ability1 instead of 0

was generating a PGF with ability[1] = 0, which is not correct. Just fix
the binaries to behave and get rid of all the workarounds since future
tables don't have missing values.
2018-06-15 23:41:07 -07:00
Kurt
88b5277062 Misc mg gen fixes
Fixed gender PCD with dynamic PID needs to check gender validity (some
korean card had it)
Fixed wc3 generated force-hatching to unflag fateful for non-frlg and to
hatch on the designated game just in case

stuck on a PGF issue where ability doesn't match PID, need to revisit
that PID creation...
Card #: 0002 - がくえんさい×ポケモンプレゼント
2018-06-15 22:00:51 -07:00
Kurt
b0b2fb5d4b ShowdownSet parse refactoring
Rework line parse to be simpler
Closes #2009 , now handles case
2018-06-15 20:30:23 -07:00
Kurt
49c36e2173 Misc legality gen tweaks
bypass savefile language checks if no language set
fix gen2 static gift egg that is really a wild encounter -- egg flag was
set & not cleared -> no wild pkm, bad! Adds test case for this.
(probably isn't a better place to clear, enforces only once per
generation rather than on every yield/end of every static yield)
2018-06-15 18:47:17 -07:00
Kurt
6fc33f4b19 Fix level fetch arg order 2018-06-15 16:53:28 -07:00
Kurt
cb5e1239ae Refactoring
Extract game value limits
Rearrange GameVersion util logic extensions
add better gameversion fetch for generator (equivalent to pkmeditor)
2018-06-15 16:00:28 -07:00
Kurt
e8d5252b8c Reject moves introduced by gsc in pk1/vc1 cases
Closes #2005
(no tutor moves are new moves, just beam moves)
2018-06-14 18:52:43 -07:00
Kurt
7a5ce5aa78 Remove unmaintained portuguese side-translation
Closes #2004
no changes had been submitted since originally committed on 3/5/2015; 3y
of inactivity.

users can always place "lang_en" to replace the english translation with
their own GUI strings; not worth maintaining non-series language
support.
2018-06-14 17:03:56 -07:00
Kurt
f54f90bd4b Add egg Rotom/Furfrou form check
Closes #2002
Thanks @iiippppk !
2018-06-13 22:10:01 -07:00
Kurt
5579c4c80d Tidy up MoveLevelUp
use the Learn objects from prior commits for adding a range of moves
2018-06-13 22:03:58 -07:00
Kurt
dcfeff7bf3 Update batch editing
Permit all possible properties in the dropdown, handle can't write cases
(many) as well as can't read (I don't think there are any of these).

https://projectpokemon.org/home/forums/topic/45789-how-to-require-a-pkm-equals-a-shiny-pid-in-batch-editor/?do=findComment&comment=232757
2018-06-13 18:52:09 -07:00
Kurt
39daa6c65d Split GetIsLevelUp to individual versions
static the GameVersion reference as we're excessively using it in the
switch cases, for clearer reading
2018-06-12 22:15:06 -07:00
Kurt
b9652a835d Weaken gen2 egg species checks for pre-evos in gen1
VC can inhabit both gens

Add Tradeback setting setter for legality tests
Add GBCartEra setting setter for legality tests

Thanks @iiippppk !
2018-06-12 18:46:31 -07:00
Kurt
64a64b8ce1 Add special handling for gen1 encounter move fetch
Begin splitting of GetMovesLevelUp per-gen into per-version
2018-06-12 18:35:56 -07:00
Kurt
c3314f1b8e Remove Mirage Island met location from valid gen3
Although Pokémon Ruby, Sapphire, and Emerald include a location pointer
for "Mirage Island", any Wynaut caught here will simply display "Met on
Route 130" in their summary. This is because the player is technically
still on Route 130's map.

Can't get anything with that location ID as an egg or as wild
2018-06-12 16:41:44 -07:00
Kurt
5ad8a4e5a4 Return version-sensitive moves for nonspecial fetch
Closes #1998 , GetValidMoves returns moves without sensitivity for
current version for pre gen6 moves... can resolve that later.
2018-06-11 20:23:28 -07:00
Kurt
fb6e28112a Update emerald event flags
0x60 + RS offset, add some E exclusive flags (frontier)
update const a little
Closes #1997
2018-06-11 16:27:42 -07:00
Kurt
4778c9c758 Fix RSBOX checksum
Closes #1995
clean up variable names
2018-06-11 09:12:41 -07:00
Kurt
32a83c16f1 Add egg relearn/move sequence match check
#1994
2018-06-11 08:13:50 -07:00
Kurt
e5a2e12fa5 Check held items for pk2 eggs
Closes #1993
Thanks @iiippppk !
2018-06-11 08:05:15 -07:00
Kurt
242fc295b4 Handle smeargle egg case
#1993
Just use precomputed array since it can only know sketch
2018-06-11 08:03:10 -07:00
Kurt
9faba26e90 Add egg base move branch
Closes #1991
Thanks @iiippppk  !

Improve pk2 version detect to better provide gs vs c egg base moves
2018-06-11 07:23:48 -07:00
Kurt
ca9f21fa49 Fix base move count vs inherit check
Closes #1990
Thanks @iiippppk !
2018-06-10 20:26:59 -07:00
Kurt
c9d0811281 Handle evolutions-in-eggs case for past gen (2/3)
Closes #1989
Thanks @iiippppk !

(eggs don't always come at level 1, past gen has level 5)
2018-06-10 19:38:06 -07:00
Kurt
c9181963f2 handle pichu array->interface when adding egg list
egg fetch returns array, need to add to the collection
force everything as readonly to prevent adds outside of the constructor

Closes #1988
Thanks @iiippppk !
2018-06-10 19:07:55 -07:00
Kurt
e105f2b589 Refactoring
fix b2w2 egg base levelup reference (not bw, b2w2!), doesn't really
matter much except for better indication (possibly?)
remove some unnecessary linq ToArray() calls
continue relocating code out of Core
2018-06-10 17:55:03 -07:00
Kurt
d94fc65367 Refactoring
continued reduction in Core size, simplify/clean up usages
2018-06-10 14:45:25 -07:00
Kurt
c6765fd26b Remove ORAS arg
...
2018-06-10 14:07:36 -07:00
Kurt
19cb2cda2e Remove MAX giveRegular for ORAS
level 3 is the legitimate max
2018-06-10 12:27:53 -07:00
Kurt
75f4318335 Split S/MAX from base 1-3 levels
ORAS can unlock MAX & Full Recovery flags, add special handling for that
2018-06-10 11:28:20 -07:00
Kurt
29c610870e Rename opower6
match type
2018-06-10 11:03:14 -07:00
Kurt
3f1195a2d4 Refactoring
Remove duplication of levelup fetch
relocate some stuff to a more appropriate area
2018-06-10 10:44:05 -07:00
Kurt
3b84f33776 Misc changes
Revert linq chain
Closes #1987

change encountermatch comparison (never null), add comparison for vc
output
remove unused strings (will get removed from translation files in later
update)
2018-06-10 00:26:33 -07:00
Kurt
26f45d44d0 Rework OPower editor
https://projectpokemon.org/home/forums/topic/45683-pkhex-made-odd-number-of-zygarde-cells-usm/?do=findComment&comment=232476

Thanks @sora10pls for documenting what each flag does
2018-06-09 21:04:34 -07:00
Kurt
021ac7c54f Refactoring
where!contains -> except
relocate special tutor
2018-06-09 16:04:06 -07:00
Kurt
79f0b3665f Differentiate C/XD cologne IDs
https://projectpokemon.org/home/forums/topic/45685-pokémon-xd-and-scent-bag/
Thanks Asia81!
2018-06-09 12:44:30 -07:00
Kurt
cb4761403a Relocate oras setopower data to sav6 2018-06-09 12:32:55 -07:00
Kurt
f351e9550f Add contest stat check for VC
https://projectpokemon.org/home/forums/topic/45681-virtual-console-pkm-with-beauty-stats-marked-as-legal/

Thanks yologgebolo!
2018-06-09 08:39:16 -07:00
Kurt
b5962d6b50 Emit final showdownset from lines if present
Closes #1986 , was missing a check if there were any lines in the list.
Calling the method with an empty line set would have yielded an empty
set (behavior unknown). Although calling the method without lines is
unintended, should handle behavior correctly now.

Fix yielding an empty set if the first line(s) are empty.

Add test to verify parsing works for multiple lines.
Add test to verify parsing yields nothing for no lines.
Add test to verify parsing yields nothing for empty lines.
2018-06-09 08:12:47 -07:00
Kurt
ee3fda46f2 fix method name typo 2018-06-09 08:04:40 -07:00
Kurt
3239305ce5 Refactoring
GetMoves logic can now be expressed concisely with the prior refactoring
2018-06-08 20:37:35 -07:00
Kurt
a494a6b37a Don't generate move check order for an invalid ver 2018-06-08 20:36:52 -07:00
Kurt
9b43677bb9 Refactoring
pull out some move data fetching to separate class
add methods to quickly fetch if the move is learnable via that method

eventual plan is this:
replace
'fetch all possible moves then look within' move validation
with:
'peek if learnable, and get info how' move validation

advantages:
- returns game the move was learned in and the level (if appropriate)
- infinitely less object creation (garbage collection)
- only looks for a given move, doesn't have to fetch everything before
checking
- faster than full fetch, can be made even faster by optimizing lookups.

subject to change :)
2018-06-08 20:10:41 -07:00
Kurt
b1cd68e3f3 Convert GetLevelLearnMove to use lazy dictionary
faster move lookup
2018-06-07 19:05:28 -07:00
Kurt
1202474cd5 Defer & flag VC korean unobtainable encounters
Closes #1985
2018-06-06 21:49:30 -07:00