#include "specific-object/death-scythe.h"
#include "combat/attack-criticality.h"
+#include "core/player-redraw-types.h"
#include "core/stuff-handler.h"
+#include "inventory/inventory-slot-types.h"
#include "main/sound-definitions-table.h"
#include "main/sound-of-music.h"
#include "object-enchant/tr-types.h"
#include "object/object-flags.h"
#include "player/player-damage.h"
+#include "player/player-race.h"
+#include "status/element-resistance.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
+#include "player/player-status-flags.h"
/*!
* @brief 死の大鎌ダメージが跳ね返ってきた時の、種族ごとのダメージ倍率を返す
if ((attacker_ptr->align < 0) && (*magnification < 20))
*magnification = 20;
- if (!(attacker_ptr->resist_acid || is_oppose_acid(attacker_ptr) || attacker_ptr->immune_acid) && (*magnification < 25))
+ if (!(has_resist_acid(attacker_ptr) || is_oppose_acid(attacker_ptr) || has_immune_acid(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_elec || is_oppose_elec(attacker_ptr) || attacker_ptr->immune_elec) && (*magnification < 25))
+ if (!(has_resist_elec(attacker_ptr) || is_oppose_elec(attacker_ptr) || has_immune_elec(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_fire || is_oppose_fire(attacker_ptr) || attacker_ptr->immune_fire) && (*magnification < 25))
+ if (!(has_resist_fire(attacker_ptr) || is_oppose_fire(attacker_ptr) || has_immune_fire(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_cold || is_oppose_cold(attacker_ptr) || attacker_ptr->immune_cold) && (*magnification < 25))
+ if (!(has_resist_cold(attacker_ptr) || is_oppose_cold(attacker_ptr) || has_immune_cold(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if (!(attacker_ptr->resist_pois || is_oppose_pois(attacker_ptr)) && (*magnification < 25))
+ if (!(has_resist_pois(attacker_ptr) || is_oppose_pois(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if ((attacker_ptr->pclass != CLASS_SAMURAI) && (have_flag(death_scythe_flags, TR_FORCE_WEAPON)) && (attacker_ptr->csp > (attacker_ptr->msp / 30))) {
+ if ((attacker_ptr->pclass != CLASS_SAMURAI) && (has_flag(death_scythe_flags, TR_FORCE_WEAPON)) && (attacker_ptr->csp > (attacker_ptr->msp / 30))) {
attacker_ptr->csp -= (1 + (attacker_ptr->msp / 30));
attacker_ptr->redraw |= (PR_MANA);
*magnification = *magnification * 3 / 2 + 20;
msg_format(_("ミス! %sにかわされた。", "You miss %s."), pa_ptr->m_name);
msg_print(_("振り回した大鎌が自分自身に返ってきた!", "Your scythe returns to you!"));
- object_type *o_ptr = &attacker_ptr->inventory_list[INVEN_RARM + pa_ptr->hand];
- object_flags(o_ptr, death_scythe_flags);
+ object_type *o_ptr = &attacker_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
+ object_flags(attacker_ptr, o_ptr, death_scythe_flags);
pa_ptr->attack_damage = damroll(o_ptr->dd + attacker_ptr->to_dd[pa_ptr->hand], o_ptr->ds + attacker_ptr->to_ds[pa_ptr->hand]);
int magnification = calc_death_scythe_reflection_magnification(attacker_ptr);
compensate_death_scythe_reflection_magnification(attacker_ptr, &magnification, death_scythe_flags);