Closes#1076
seems kinda lazy as I didn't bother tracking down the suspect that
modifies the save (presumably the hex seed values); those should load
correctly and not change any bytes.
* Fix gen3 abiltiy legality check
Seperate Ability (AbilityBit i.e top bit of IV32) and AbilityNumber
(PID)
Fix in-game trade Electrode's ability
* Fix function deal with "encountermatch is int"
Keep encountermatch as null after UpdateEncounterInfo
* Fix gen5-7 ability check
Consider ability capsule
gen5 personal table have HA, ability_count won't work
Some simplification and avoid duplicate invalid message
* Simplify ability check
Use bool? to mark 3 states
GameVersion CXD needs more info
* Temp fix gen3 in-game trade ability check
Lickitung have 2 regular ability at gen3, there is a AbilityBit and
AbilityNumber mismatch
Guess those ingame trade have static PID
* Change abilitybit to bool and revert change
revert change in UpdateEncounterChain.
let egg encounter / null encounter choose vs.Last().Species as before
* Update Chinese legality translation strings
There is in the national park a butterfree encounter as a normal wild pokemon and another with the same levels in the bug contest, that means even in format 4 it could be more than one type encounters in the list, it should be filtered
* Added method getBaseEggSpecies to get the base species when the pokemon was an egg, is needed because for format 1 pokemon with egg origin every time getBaseSpecies is called is returning the gen 1 base species obtaining invalid eggmoves and base egg moves
Also getBaseEggSpecies was using Evolves1 when format = 1 even when asking for a gen2 egg base species, returning Pikachu egg moves (empty list) instead of Pichu egg moves
* Fix ability checking for generation 3 pokemon, likea de Seadra from Issue #1011
pkm.AbilityNumber have a value assuming PID match ability like a generation 4 pokemon but the validation should be ignored if is a generation 3 pokemon with only one ability in generation 3
Also changed the validation for ingame trades with fixed abilities to check only with generation 3 abilities in the case the species has two abilities generation 3, if only one was possible any PID should be valid with the generation 3 ability
Encounter Trades
Also the check for evolution was wrong, the most evolved species is the first in the evochain, not the last
* Fix evoltuion chains for gen 3 pokemon in format 4
* Fix ability for generation 3 trades. Ability could not change if there were 2 abilities in generation 3, that means it is irrelevant if the pokemon evolved in gen 4-5, the ability number must match the encounter
* Added missing skipOption to a call to getBaseEggSpecies
* Functions to obtain moves excluvie to preevolutions, like moves that Azurill/Happiny could learn throught level up or TM but Marill/Chansey could not learn, icompatible with any Marill/Chansey egg moves
Also add functions to return egg moves and base egg moves for both possible species for split breed eggs
* Check both species from split breed egg at the same time to report moves incompatibilities
* Reduced generation 4-5 was egg game check
There is no need to check every possible generation game.
For every egg species HGSS learnset tables y egg moves table contains all the moves from the same species in DP and Pt, without any move exclusive to that games except in legendaries, and they cant breed
In generation 5 is the same with B2W2 except for Exxegutte, it have a exclusive level up move from B1W1, Psychic, but it can learn the move with TM, it wont count as an egg move
* Check incompatible split breed moves in verify relearn egg
* Fix generation 1 incompatibility moves check
SolarBeam removed from Exeggcute/Exeggutor incompatiblity, Exeggutor could learn it with a TM in generation 1
Removed Vaporeon Mist and Eevee Take Down incompatiblity, Vaporeon could learn Take Down with a TM in generation 1
* Replace the background with a frosty partially transparent image to
snap user attention to the hovered slot
* change cursor to hand symbol when over a draggable box slot
* remove duplicated resource references
* remove unused line in rtc3
* Added method getBaseEggSpecies to get the base species when the pokemon was an egg, is needed because for format 1 pokemon with egg origin every time getBaseSpecies is called is returning the gen 1 base species obtaining invalid eggmoves and base egg moves
Also getBaseEggSpecies was using Evolves1 when format = 1 even when asking for a gen2 egg base species, returning Pikachu egg moves (empty list) instead of Pichu egg moves
* Fix ability checking for generation 3 pokemon, likea de Seadra from Issue #1011
pkm.AbilityNumber have a value assuming PID match ability like a generation 4 pokemon but the validation should be ignored if is a generation 3 pokemon with only one ability in generation 3
Also changed the validation for ingame trades with fixed abilities to check only with generation 3 abilities in the case the species has two abilities generation 3, if only one was possible any PID should be valid with the generation 3 ability
Encounter Trades
Also the check for evolution was wrong, the most evolved species is the first in the evochain, not the last
* Fix evolution chains for gen 3 pokemon in format 4
* Fix ability for generation 3 trades. Ability could not change if there were 2 abilities in generation 3, that means it is irrelevant if the pokemon evolved in gen 4-5, the ability number must match the encounter
use linq to simplify the operation of inserting the ticket key items to
the save file
set back the pouch to the temp sav when adding tickets instead of
waiting until the end
don't change control text (respect localization text)
wurmple index was calculated incorrectly
update main form EC reroll; now that legality checking (and gen1->7) is
implemented the legality indicator will alert the user to their error
instead.
Loading the save initially needs it specified by the program (per save
file); when a save is cloned it needs to clone the Japanese parameter
No functional change when used with PKHeX, but other applications of
Core will now function correctly. (init 1 EN save, 1 JP save -> cloned
EN became JP; this no longer happens)
SAV3 is the only save object that needs the JP bool specified... I
wonder if there's some way to reliably detect with just the SAV data...
Broken into smaller methods, adjusted flow. Gen5/6/7 mystery gift
ability check was typical so just use one repeatable method.
Also...
Short circuit unflagged EV check fixed; case where 255 & 248 EVs used
will trip the 508 fishy flag but does not check the Format >= 6 for the
>252 check. Fixed by arranging all the Invalid checks without an
if-else.
* Ignore Shedinja evolution moves if the encounter species was a Shedinja
* Phione and Manaphy can not inherit level up moves, they hatch only with level 1 moves
* Verify ability for generation 5 events
* Removed unused sevii isle locations for FRLG valid met location
* Verify ability for generation 3 transfer pokemon
* Ability error text
* Fix gender validation
* Cleanup
* Check egg hatch cycles are not greater than species/ gift egg encounter hatch cycles
* Fix FiredRed Charmander moveset, have 67 moves when it only learns 11 moves
* Reduced redundant condition in ability checking
Combo items are now localized automatically by specifying the game IDs
and using the gameinfo values. (odd style is to support eventual message
localization).
program title now indicates XD/C/Batrev instead of just SAV(generation)
* E-Reader berry improvement
Load from the savegame the name of the e-reader berry and show in the item list that name instead of enigma berry if there is any e-reader berry data stored
Also check Legality of the berry, as enigma berry is unrelead in generation 3, but if there is e-berry data if check if the e-berry name is from one of the released cards
* Fix Shedinja moves check in generation 3 format
* Update comments, e-berry code is based in Suloku work for the gen 3 wc-tool
* Move e-reader comunication with Legality class to Main.cs
Remove curly braces in GameInfo
* Undo all changes in SaveUtil.cs
* Fix required move count for Butterfree and Gyarados
* Ruby Sapphire Southern Island legendaries do not have fateful encounter
* Added missing event egg for generation 3
Filter generation 3 event egg by game origin, an egg pokemon remains with the original game no matter in what game it hached
* Filter the event egg static table better than individual pokemon from the table
* Generation 4 do not allow to EV train at level 100, for level 100 encounter pokemon (like events) EV only can be trained with vitamins, with a maximum value of 100
* Fix incorrect string
* Generation 2 eggs can not be infected with Pokérus
* Fix gyarados count slots