OSDN Git Service

[Implement] #37285 Added damage decreasing calculation to calc_blow_drain_mana()
authorHourier <hourier@users.sourceforge.jp>
Wed, 7 Oct 2020 14:04:35 +0000 (23:04 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 7 Oct 2020 14:04:35 +0000 (23:04 +0900)
src/monster-attack/monster-attack-switcher.c

index 48bcef5..bcd4add 100644 (file)
@@ -216,7 +216,6 @@ static void calc_blow_drain_life(player_type *target_ptr, monap_type *monap_ptr)
 }
 
 /*!
- * todo 魔道具使用能力向上フラグの取得関数は未定義、後ほど実施する
  * @brief MPダメージを計算する (消費魔力減少、呪文失敗率減少、魔道具使用能力向上があればそれぞれ-5%)
  * @param target_ptr プレーヤーへの参照ポインタ
  * @param monap_ptr モンスターからプレーヤーへの直接攻撃構造体への参照ポインタ
@@ -232,6 +231,9 @@ static void calc_blow_drain_mana(player_type *target_ptr, monap_type *monap_ptr)
     if (has_easy_spell(target_ptr))
         damage_ratio -= 5;
 
+    if (has_magic_mastery(target_ptr))
+        damage_ratio -= 5;
+
     monap_ptr->damage = monap_ptr->damage * damage_ratio / 100;
     process_drain_mana(target_ptr, monap_ptr);
     update_smart_learn(target_ptr, monap_ptr->m_idx, DRS_MANA);