public static bool HasType(this IPBEPokemonTypes pkmn, PBEType type) { if (type >= PBEType.MAX) { throw new ArgumentOutOfRangeException(nameof(type)); } return(pkmn.Type1 == type || pkmn.Type2 == type); }
public static double GetEffectiveness(PBEType attackingType, IPBEPokemonTypes defendingTypes, bool ignoreGhost = false, bool ignoreDark = false) { if (defendingTypes == null) { throw new ArgumentNullException(nameof(defendingTypes)); } return(GetEffectiveness(attackingType, defendingTypes.Type1, defendingTypes.Type2, ignoreGhost: ignoreGhost, ignoreDark: ignoreDark)); }
public static bool ReceivesSTAB(this IPBEPokemonTypes pkmn, PBEType type) { return(type != PBEType.None && HasType(pkmn, type)); }