Commit graph

75 commits

Author SHA1 Message Date
Kurt
39f98a4a94 Misc qol updates
Check max case for level first, then iterate upwards (eliminates inner
if)
change wc* nature to sbyte (update comparisons, 0xFF too magic-y)
use Rand.Next(x) instead of (0, x)
2018-10-27 21:59:31 -07:00
Kurt
2ad103dd46 Extract gb specific core logic to separate class 2018-10-09 21:07:13 -07:00
Kurt
5d6c932353 Spit out move learn generation on verbose
helps indicate any restrictions on learn source outside of the current
format
2018-09-30 11:50:08 -07:00
Kurt
91c37ab573 Update legality check message string style
V### names weren't enjoyable to work with; use similar verbose style as
the program message strings.

updating the translation files with the remapped variable names shortly

remap list: https://pastebin.com/jybkVDAK
2018-09-01 14:11:12 -07:00
Kurt
c8563a3737 Respacening
Style guidelines, handle a bunch of files
no functional change
2018-07-26 19:34:27 -07:00
Kurt
f0090669bb Update catch rate related logic
#2071
2018-07-24 19:33:42 -07:00
Kurt
4b0a2d90b9 Add xmldoc 2018-07-20 20:22:46 -07:00
Kurt
c40a284174 Misc simplifications / xmldoc 2018-07-01 19:17:37 -07:00
Kurt
3674a11cfe Misc simplifications
absorb verifier calls into the parsing methods
2018-07-01 17:07:29 -07:00
Kurt
e5ac193e8e Remove unused field
Encounter used to be used to determine if the original encounter was
valid; we now store the encounter object and checking is fast enough --
we don't really care to short-circuit individual verification steps
anymore.
2018-07-01 10:15:10 -07:00
Kurt
177604e2cb Refactoring
Simplify some verifier logic
2018-06-30 15:01:16 -07:00
Kurt
e29cf2a903 Rework secondary check flow
Checks.cs initially started out small, but over the years it has grown
to handle multiple types of checks. With all these checks next to
eachother, it's hard to see the overall groups. Splitting them up
(potentially further?) allows for more focused maintenance &
understanding.

Not sure if I'm happy with the overall bandaids used (checks no longer
done within LegalityAnalysis so variable repointing is excessively
used), but I'm happier the way it is now compared to the huge Checks.cs
2018-06-23 22:00:01 -07:00
Kurt
c5ea35a1a1 Continued refactoring
Move chain prune from Analysis to evochain spawn
2018-06-19 17:50:10 -07:00
Kurt
c6e968c77d Only generate encounter moves if species unmodified
Closes #2020
2018-06-18 21:54:32 -07:00
Kurt
2e1081086d Refactoring
Split evolution data specific DexLevel properties from DexLevel

use IReadOnlyList instead of IList for covariant collection
2018-06-18 19:10:21 -07:00
Kurt
7791020cb4 Check format before trim
Closes #2016
2018-06-17 21:01:07 -07:00
Kurt
33eded08d1 Add missing learn/personal references for pairs
Closes #2019
2018-06-17 20:49:03 -07:00
Kurt
e91cfeb707 Handle pre-VC2 era tradeback status for suggestions
#2015

Can't get a shiny female 1:7 f:m gender ratio transfer after the VC2
bank update; need to respect that when generating random moves for the
pkm by removing any gen2 evo chain data.
2018-06-17 09:55:07 -07:00
Kurt
dd57558e98 Update moveset suggestion for vc origin
Closes #2014
2018-06-17 09:39:01 -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
e5a2e12fa5 Check held items for pk2 eggs
Closes #1993
Thanks @iiippppk !
2018-06-11 08:05:15 -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
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
f237476ccc Add nickname reset modify
nickname reset clears except for encountertrades (some have fixed
nicknames).

remove untraded check for HT memory verification, has to be traded if it
has a HT memory.
2018-05-31 19:49:47 -07:00
Kurt
2061f23e26 Misc simplifications
fixes suggestion requests for invalid gameversion pkms
2018-05-27 17:57:45 -07:00
Kurt
ec2816379e Restore unk mystery gift message
no match & fateful -> 'hey maybe pkhex doesn't know about this one yet'
2018-05-27 07:01:46 -07:00
Kurt
3b635be77f Flag nonparsed
removed parsedvalid/invalid, unnecessary I guess
2018-05-22 18:57:39 -07:00
Kurt
a7f9f69b02 Remove Type property
verbose summary uses the encountermatch's current type; the "x is y"
check is more than sufficient.
2018-05-19 12:21:16 -07:00
Kurt
99005d8fc0 Refactoring
more discards & simplifications
2018-05-12 12:28:48 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -07:00
Kurt
94811d9052 Split up IEncounterable generators
Can break the filtering out into smaller methods such that the generator
can return results with less strict filtering
2018-03-10 19:51:09 -08:00
Kurt
836566004f Use CXD met location string on verbose output
was previously using RSEFRLG locations for CXD encounters
2018-01-30 20:24:45 -08:00
Kurt
c066df243f Misc fixes/updates
Fix crystal lacking met level<->current level checks
Fix met location loading for gen2 saves (gen7 sav loaded gen1/2 pkm ->
load gen2 sav)
refactor some logic with pattern matching/consistent method names
2018-01-26 09:19:20 -08:00
Kurt
802105d22d Allow pay day mewtwo, disallow dizzy punch
#1772
transfer pk1->pk2->pk7 for mewtwo knowing dizzy punch, just so we can
keep Pay Day
2018-01-25 19:17:42 -08:00
Kurt
fb6738f18b Add unown 2->7+ shiny check
closes #1755

also:
fix vc transfer checks not being called (EncounterOriginalGB is no
longer GBEncounterData).
remove usages of GBEncounterData -- class is (as of a ~~month ago) now
never leaked out of the EncounterGenerator -- always returns the actual
encounter data as the wrapper is not needed.
simplify logic flow / references
2018-01-10 16:16:35 -08:00
Kurt
0f21fc2217 add location interface for verbose analysis output
indicates met location for transferred mons
most gen1/2 encounters won't show values due to the location not being
stored respective to the string tables (anyone wanna do a location remap
after initial load?)
2018-01-02 12:00:41 -08:00
Kurt
816ebf6b0e Refactoring
no functional change
2017-12-11 16:01:24 -08:00
Kurt
5bc2e6da88 Refactoring
de-linq some areas where direct accessing is possible (list/array)
2017-12-04 20:16:54 -08:00
Kurt
2af7b152a7 re-enable error suppression
oops
2017-11-08 22:59:18 -08:00
Kurt
665e94b0aa misc cleanup
add german forme names
truncate some forme names
fix nidoran gender symbols

adds null check for invalid (caught error) pkm

disables accessory giving (needs more research)
2017-11-08 22:56:42 -08:00
Kurt
24121553b4 Add savegame sensitive pkm legality checking
uses the forme count of the savefile (rather than a futureproofed
same-gen forme count)
Closes #1559
2017-11-06 19:31:24 -08:00
Kurt
38989b4747 Export correct species name for verbose output
#1564
2017-11-06 18:06:23 -08:00
Kurt
69cf1eaa9c add more pkhex.core xml documentation
adds a bunch of documentation useful for those unfamiliar with the core
library
2017-10-23 23:12:58 -07:00
Kurt
39279a7ad4 Add VC transfer checks
checks were previously only performed when finding the encounter, once
found, the GB encounter was validated. the transfer encounter is derived
after all encounter checks, thus remaining unchecked (really, only for
Locations).

Move generating logic to the generator, and double check the locations
are valid.

#1535
Thanks @DJPanda065 !
2017-10-20 21:07:15 -07:00
Kurt
0e24b5237e cleanup
remove redundant/repetitive match update (updateTypeInfo with Format>=7
already updates the encountermatch just prior to this method call)
2017-10-20 20:10:13 -07:00
Kurt
9699cdefae Gen2 egg gift bypass fix
Gen4+ static encounter eggs could slide through the VC case
prevent empty moves from appearing before suggested moves (relearnbase
being empty)
2017-09-26 20:09:18 -07:00
Kurt
9ef2016d35 Encounter Learnset move duplication fix
a level 15/16 magmar has leer/smog twice in its learnset (at level 1 and
at actual levels); returning just the 4 previous learned moves at level
15/16 yields duplicates for Smog. [Smog, Leer, Fire Punch, Smog | Leer,
Ember]. By ignoring moves already added, the true movepool is acquired

also fix TradebackType getting overwritten at the end of the method (in
case of nontradeback like korean/egg)
2017-09-24 10:36:16 -07:00
javierhimura
ea86032480 Comments and a fix for AllowGen2Crystal function 2017-09-23 21:00:57 +02:00
javierhimura
f3743e490b Korean language restrictions
Restriction happens because Korean can not trade with non-Korean GB era games
- There is no Korean release for gen 1 pokemon, included VC
- With no gen1 pokemon means any Korean gen2 is Gen2_NotTradeback, that means no gen1 origin nor moves are Legal
- Crystal was never released in Korean
- Pokemon Stadium 2 was never released in Korean, that means no move reminder for gen 2 korean pokemon

- Generation 4 can not trade between Korean and not Korean games, but Korean games can use the palpark with any language

Chinese language restrictions
There is no Chinese release for gen 1 and 2 pokemon games, VC Chinese games are in Japanese
2017-09-23 20:46:10 +02:00
javierhimura
efc60c3bf8 Change VC1 pokemon tradeback initial status to allow VC2 origin, there is no way to know if the pokemon was traded to gen7 after or before VC2 release
Do not allow gen1 evolutions for VC2 pokemon without gen1 evolutions or preevolutions
2017-09-23 12:58:46 +02:00