mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-20 19:05:11 -05:00
Add toxtricity evo check
refer to sub_71007805B0 for algo
This commit is contained in:
@@ -58,6 +58,10 @@ public bool Valid(PKM pkm, int lvl, bool skipChecks)
|
||||
case TradeSpecies:
|
||||
return !pkm.IsUntraded || skipChecks;
|
||||
|
||||
case LevelUpNatureAmped when GetAmpLowKeyResult(pkm.Nature) != pkm.AltForm && !skipChecks:
|
||||
case LevelUpNatureLowKey when GetAmpLowKeyResult(pkm.Nature) != pkm.AltForm && !skipChecks:
|
||||
return false;
|
||||
|
||||
// Special Level Up Cases -- return false if invalid
|
||||
case LevelUpBeauty when !(pkm is IContestStats s) || s.CNT_Beauty < Argument:
|
||||
return skipChecks;
|
||||
@@ -135,5 +139,12 @@ public EvolutionMethod Copy(int species)
|
||||
Level = Level
|
||||
};
|
||||
}
|
||||
|
||||
private static int GetAmpLowKeyResult(int n)
|
||||
{
|
||||
if ((uint)(n - 1) > 22)
|
||||
return 0;
|
||||
return (0x5BCA51 >> (n - 1)) & 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,11 @@ public enum EvolutionType : byte
|
||||
LevelUpDusk = 40,
|
||||
LevelUpWormhole = 41,
|
||||
UseItemWormhole = 42,
|
||||
Crit3, // Sirfetch'd
|
||||
HPDownBy49, // Runerigus
|
||||
SpinType, // Alcremie
|
||||
LevelUpNatureAmped, // Toxtricity
|
||||
LevelUpNatureLowKey, // Toxtricity
|
||||
}
|
||||
|
||||
public static class EvolutionTypeExtensions
|
||||
|
||||
Reference in New Issue
Block a user