mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 11:09:27 -05:00
@@ -164,20 +164,6 @@ private static bool IsHiddenAbilitySlot(this EncounterSlot slot)
|
||||
return slot.Permissions.DexNav || slot.Type == SlotType.FriendSafari || slot.Type == SlotType.Horde || slot.Type == SlotType.SOS;
|
||||
}
|
||||
|
||||
internal static bool IsDexNavValid(PKM pkm)
|
||||
{
|
||||
if (!pkm.AO || !pkm.InhabitedGeneration(6))
|
||||
return false;
|
||||
|
||||
var vs = EvolutionChain.GetValidPreEvolutions(pkm);
|
||||
var table = pkm.Version == (int) GameVersion.AS ? SlotsA : SlotsO;
|
||||
int loc = pkm.Met_Location;
|
||||
var areas = table.Where(l => l.Location == loc);
|
||||
var minlvl = GetMinLevelEncounter(pkm);
|
||||
var d_areas = areas.Select(area => GetValidEncounterSlots(pkm, area, vs, minlvl));
|
||||
return d_areas.Any(slots => slots.Any(slot => slot.Permissions.AllowDexNav && slot.Permissions.DexNav));
|
||||
}
|
||||
|
||||
internal static EncounterArea GetCaptureLocation(PKM pkm)
|
||||
{
|
||||
var vs = EvolutionChain.GetValidPreEvolutions(pkm);
|
||||
|
||||
@@ -23,7 +23,7 @@ public static CheckResult[] VerifyRelearn(PKM pkm, LegalInfo info)
|
||||
MysteryGift g => VerifyRelearnSpecifiedMoveset(pkm, info, g.RelearnMoves),
|
||||
IRelearn s when s.Relearn.Length > 0 => VerifyRelearnSpecifiedMoveset(pkm, info, s.Relearn),
|
||||
EncounterEgg e => VerifyRelearnEggBase(pkm, info, e),
|
||||
EncounterSlot z when pkm.RelearnMove1 != 0 && z.Permissions.DexNav && EncounterSlotGenerator.IsDexNavValid(pkm) => VerifyRelearnDexNav(pkm, info),
|
||||
EncounterSlot z when pkm.RelearnMove1 != 0 && z.Permissions.DexNav => VerifyRelearnDexNav(pkm, info),
|
||||
_ => VerifyRelearnNone(pkm, info)
|
||||
};
|
||||
}
|
||||
@@ -50,8 +50,8 @@ private static CheckResult[] VerifyRelearnDexNav(PKM pkm, LegalInfo info)
|
||||
int[] RelearnMoves = pkm.RelearnMoves;
|
||||
|
||||
// DexNav Pokémon can have 1 random egg move as a relearn move.
|
||||
var enc = info.EncounterMatch;
|
||||
result[0] = !Legal.GetValidRelearn(pkm, enc.Species, enc.Form, true).Contains(RelearnMoves[0])
|
||||
var baseSpec = Legal.GetBaseSpecies(pkm);
|
||||
result[0] = !Legal.GetValidRelearn(pkm, baseSpec.Species, baseSpec.Form, true).Contains(RelearnMoves[0])
|
||||
? new CheckResult(Severity.Invalid, LMoveRelearnDexNav, CheckIdentifier.RelearnMove)
|
||||
: new CheckResult(CheckIdentifier.RelearnMove);
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user