Beispiel #1
0
 /// <summary>
 /// atkElement属性からpowerのダメージ(与ダメージ計算済)
 /// </summary>
 /// <param name="power">与ダメージの最終的な威力(atk * ToNormalAttackDamageRate)</param>
 /// <param name="atkElement">通常攻撃の属性(攻撃者の属性)</param>
 public void DamagedByNormalAttack(double power, E_Element atkElement) // power = atk * normalAttackRate * elementRate
 {
     if (IsNoDamaged(atkElement))
     {
         Debug.Log(CharaClass.CharaName + "に" + ElementClass.GetStringElement(atkElement) + "属性の攻撃が効かない");
         return;
     }
     else
     {
         if (IsDefending)
         {
             power *= 0.5 * PassiveFromDamageRateInDefending;
         }
         DecreaseHp(power * this.GetFromDamageRate(atkElement) * ElementClass.GetElementCompatibilityRate(atkElement, this.Element) * FromNormalAttackRate); // 威力*属性被ダメ減*属性相性*通常被ダメ
     }
 }