コード例 #1
0
ファイル: Pokemon.cs プロジェクト: NicolasGrimault/Pokemon
        public double GetTypeMultiplicator(@Type type)
        {
            int eff = TypeServices.GetTypeEfficience(this.Type1, type);

            if (Type2.HasValue)
            {
                eff = eff * TypeServices.GetTypeEfficience(this.Type2.Value, type);
            }
            return(eff / 10000);
        }
コード例 #2
0
ファイル: Pokemon.cs プロジェクト: NicolasGrimault/Pokemon
 public bool IsType(@Type type)
 {
     return(Type1 == type || Type2 == type);
 }
コード例 #3
0
 public static int GetTypeEfficience(@Type attackType, @Type defenseType)
 {
     return((int)table[(int)attackType, (int)defenseType]);
 }