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)
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
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.
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
#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.
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.
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
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?)
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)
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 !
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)
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