mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Reference original encounter for sensitive checks
https://projectpokemon.org/home/forums/topic/46143-bug-in-last-update/?do=findComment&comment=234360 thanks paf!
This commit is contained in:
parent
f4bfdb8311
commit
19a897923d
4 changed files with 6 additions and 6 deletions
|
@ -12,7 +12,7 @@ namespace PKHeX.Core
|
|||
public override void Verify(LegalityAnalysis data)
|
||||
{
|
||||
var pkm = data.pkm;
|
||||
var EncounterMatch = data.EncounterMatch;
|
||||
var EncounterMatch = data.EncounterOriginal;
|
||||
if (EncounterMatch is MysteryGift gift)
|
||||
{
|
||||
if (gift.Level != pkm.Met_Level && pkm.HasOriginalMetLocation)
|
||||
|
@ -64,7 +64,7 @@ namespace PKHeX.Core
|
|||
public void VerifyG1(LegalityAnalysis data)
|
||||
{
|
||||
var pkm = data.pkm;
|
||||
var EncounterMatch = data.EncounterMatch;
|
||||
var EncounterMatch = data.EncounterOriginal;
|
||||
if (pkm.IsEgg)
|
||||
{
|
||||
int elvl = Legal.GetEggHatchLevel(pkm);
|
||||
|
|
|
@ -181,7 +181,7 @@ namespace PKHeX.Core
|
|||
if (pkm.Move1_PP != pkm.GetMovePP(pkm.Move1, 0) || pkm.Move2_PP != pkm.GetMovePP(pkm.Move2, 0) || pkm.Move3_PP != pkm.GetMovePP(pkm.Move3, 0) || pkm.Move4_PP != pkm.GetMovePP(pkm.Move4, 0))
|
||||
data.AddLine(GetInvalid(V420, CheckIdentifier.Egg));
|
||||
|
||||
var EncounterMatch = data.EncounterMatch;
|
||||
var EncounterMatch = data.EncounterOriginal;
|
||||
var HatchCycles = (EncounterMatch as EncounterStatic)?.EggCycles;
|
||||
if (HatchCycles == 0 || HatchCycles == null)
|
||||
HatchCycles = pkm.PersonalInfo.HatchCycles;
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace PKHeX.Core
|
|||
public override void Verify(LegalityAnalysis data)
|
||||
{
|
||||
var pkm = data.pkm;
|
||||
var EncounterMatch = data.EncounterMatch;
|
||||
var EncounterMatch = data.EncounterOriginal;
|
||||
|
||||
// If the Pokémon is not nicknamed, it should match one of the language strings.
|
||||
if (pkm.Nickname.Length == 0)
|
||||
|
@ -84,7 +84,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
else
|
||||
{
|
||||
var EncounterMatch = data.EncounterMatch;
|
||||
var EncounterMatch = data.EncounterOriginal;
|
||||
// Can't have another language name if it hasn't evolved or wasn't a language-traded egg.
|
||||
bool evolved = EncounterMatch.Species != pkm.Species;
|
||||
bool match = PKX.GetSpeciesNameGeneration(pkm.Species, pkm.Language, pkm.Format) == nickname;
|
||||
|
@ -394,7 +394,7 @@ namespace PKHeX.Core
|
|||
string OT = validOT[(validOT.Length / 2) + index];
|
||||
|
||||
var pkm = data.pkm;
|
||||
var EncounterMatch = data.EncounterMatch;
|
||||
var EncounterMatch = data.EncounterOriginal;
|
||||
if (!IsNicknameMatch(nick, pkm, EncounterMatch)) // trades that are not nicknamed (but are present in a table with others being named)
|
||||
data.AddLine(GetInvalid(V9, CheckIdentifier.Nickname));
|
||||
else
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue