add shiny lock for spiky eared pichu
fix wurmple ECPID comparison (only continue if ALL are wurmple)
slightly speed up comparison of LCRNG spreads, may be worth applying
same approach to others.
The modified form-finding routine generates the PID gen halves in the
reverse order like events. Due to possible collisions with event PIDIVs,
only run it for unown (since that's all it applies to); the analyzing of
PIDIVs to find incorrect usages isn't really feasible (collision) for
this one.
#1103
* Detect encounter trades that evolve on trade and have not been evolved
Detect generation 1 pokemon with special catch rates : krabby trade and Pokemon Stadium
Detect generation 1 pokemon that evolve on trade and have been traded but not evolved
Detect pokemon with tradeback status any but with only encounters from the other GB generation, that means they are WasTradeback
Detect pokemon with moves from the other GB generation, change tradebackstatus to WasTradeback
* Fix dppt surfing and fishing encounter type, is is surfing because the battle background is the same as other surfingfishing encounters
Fix headbutt encounter type, the encounter type depends on the battle background used when battle a pokemon, for headbutt it changes with the player tile, is the player is in a city it will be building encounter, in a grass tile tall grass, in water it is surfingfishing and cave inside a cave. Some locations have more than one possible encounter type, for example routes with trees near the grass, near the water and near non-combat tiles.
Also added slot type headbutt special for the special trees, those trees are all in routes and are only adjacent to non-combat tiles
* Fix encounter type for missing areas with multiple grass encounters types: Mt Coronet, Mt Silver Cave and Stark Mountain (Issue # 1095)
* Fixes and typos
* Check for non-japanese e-reader pokemon, is unreleased
matches for berry fix zigzagoon
use correct type comparison for checking if national ribbon is to be set
or not; change XDC to CXD for parity with other references
delete incorrect legality message entry (used a few lines up for super
training flags), is unused.
fix for transferred 8<=xor<16 PIDs in which case the encryption constant
is used (as it is the unmodified PID)
Block 4 is used by the pokedex setter, don't set the bitflag if the
block is yet to be initialized in the save file
Closes#1101
Convert a bunch of scattered magic numbers to constants; no functional
change besides a possible resize of SeenFlagOffsets to chop off missing
block offsets.
* Refactor parseMovesForEncounter to gather valid moves for species encounter, some Pokemon can have valid encounters with different source species from the encounter, the valid moves change if the encounter species change because some preevolutions moves are illegal if pokemon caught already evolved.
Example, generation 1 Pikachu that can have a RBY Pikachu encounter and GSC Pichu encounter, the valid moves for the first encounters should not have any Pichu exclusive evolution moves
Also assign the encounter match from gb when parsing moves like the variable Encounter Match, to store the encounter that is valid for the pokemon moves instead the first encounter.
Store the species encounter, this will be needed to check if the evolution is valid for species that evolve leveling with a given learned move
* Add Tradeback Status to the pokemon, this variable for generations 1 and 2 use data like the catch rate to determine if trade between generations 1 and 2 was possible.
If analysis is for VC games tradeback have value NotTradeback for every gen 1 pokemon, but for cart saves some pokemon can be determine that have not been tradeback, if catch rate match species catch rate but do not match a valid generation 2 held item that means the pokemon habe been never traded to generation 2 games, that allow to discart encounters and moves from generation 2.
Also if is not tradeback catch rate is used to filter encounters, catch rate determine in what species was captured the pokemon discarting some preevolutions moves
Also add option for generation 1 cart save analysis to check legal status not allowing generation 2 games, like VC games but with Stadium allowed, like the generation 1 non tradeback rules from Smogon
Also change evolution chains to included generation 2 preevolutions for gen 1 pokemon if tradeback was possible, it is needed to avoid parsemoves to check illegal pokemon like Hitmonchan with Tyrogue level up moves
* Check legal values of generation 1 type and catch rate
Replace pokemon catch rate after changind pokemon species always if pokemon was not tradeback from generation 2, the catch rate will keep unchanged only if it can be a held item and do not match species catch rate (default item)
Also if catch rate is changed use base species catch rate to avoid legal errors if the catch rate of the evolution species if is not possible with the current moves
* Filter ingame trades and static encounters with catch rate for generation 1 non tradeback
* Fix min moves for generation 1 metapod encounter
* Clean up
* Fix encounter level for generation 1, valid moves are those with one level after the encounter level, pokemon can not learn a new move until level up
Clean up type validation
Fix generation 3 fatefull encounter eggs, the pokemon lost the fatefull mark when it hatch
* Clean-up
* Use new variable EncounterSpecies when it is needed to detect the species of the encounter, the old code wont work if the encounter is a wild slots array
* Fix generation 1 evolution chains and catch rate as default held item
* Fix Generation 1 Yellow Pikachu and Kadabra catch rates
Fix issue #1095, added encounter type for swarms and pokeradar safari
Split DP and Pt fossils, they have different encounter type
Change Drifloon to encounter static without type, that stationary pokemon is not in a tail grass tile
Added Burned Tower Suicune Encounter Type
Transfer legality is not checked if the pokemon is a valid static encounter, also an Entei with invalid encounter is returning null as check encounter making the analysis to throw an exception, reported in the forum. Instead check transfer legality and do not return checkresult until the end to add invalid values if Gen4Result is null.
Added bug contest as tail grass encounters
Illex Forest as cave encounter
Mark encounter types in the final encounter array to avoid have none encounter in any alt slot
parent class via Type, actual class via MatchedType. It's better to have
a general solution for future additions/separations (like
EncounterStaticShadow) or EncounterTradePID
add more encounter type recognition
override gen4 transferred encounter detection to prefer EncounterTrades
skip encountertype check if encounter is not valid
Closes#1091Closes#1092
Closes#1090
Saving of the Battle Frontier symbols is clearing the flag
block2 ofs 0x40C = Navel Rock
block2 ofs 0x408 = symbols
bitconverter getbytes was fed an Int64 due to bit shifting ints and
uints. Forcibly cast to uint to keep only 32 bits -> intended behavior.
sneak in RNG readonly
Fix generation 4 static encounters for those that have none encounter and those with not encounter type implemented yet
Fix comprobation of encounter type is static to include the new typed class
Simplify EncounterStatic type check as it is gen4 specific -> gen4
specific child class
Checks.cs: Move transfer legality check back to end as Gen4Result needs
to be defined (not null)
Rename EncounterType of Analysis class to avoid conflict with the
EncounterType enum
* Ignore relearn level 2-100 moves from Phione
* Cave encounter types DPPt
* Generation 4 EncounterType filter and validation
Not every generation 4 static encounter have yet their encounter type defined, i temporally included Any to those encounters
Generation 4 roaaming static encounters have been splitted in two, grass and surf
* Added new legality texts
* Added unreleased event DP Darkai, added check for surf in jhoto route 45, is impossible
Moved unreleased DP locations to valid Platinum locations only
* Improved generation 3 special egg check.
Only check special egg if pokemon knows any of the special egg moves, also in that case do check for normal egg before special egg
because special eggs will explicitly check for normal egg moves but normal eggs will not check special egg moves, it will improve the error output
* Clean up
* Fix gen 5 pokemon from issue #1011
Those pokemon have generation 4 static gift encounters and also wild encounters, the analysis was selecting the static encounter, but if there is a valid wild encounter and the static encounter does not match the pokemon ball the willd encounter should be selected instead
Also move the transfer legality to check it before the static encounters and make that check to work like generation 3 transfer legality
* Another fix for Issue 1011, suppress temporally OT and pokemon name analysis for generations 3 to 5 instead of format 3 to 5, there is no data stored yet to make those analysis
* Do not make wild encounters prevail static encounter if the pokemon was an egg
* Changed type of WildEncounter variable to EncounterSlot[]
* Fix Jhoto Route 45 to avoid return error with fishing encounters
Closes#1003
If the pkm has a bad checksum/sanity or is in a locked slot, it never
incremented the counter. Just increment the counter anyway and write the
msg to console.