Пример #1
0
 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);
 }
Пример #2
0
 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));
 }
Пример #3
0
 public static bool ReceivesSTAB(this IPBEPokemonTypes pkmn, PBEType type)
 {
     return(type != PBEType.None && HasType(pkmn, type));
 }