#include "monsterrace-hook.h"
#include "melee.h"
#include "projection.h"
+#include "monster.h"
#include "monster-status.h"
+#include "monster-spell.h"
#include "avatar.h"
#include "player-status.h"
#include "realm-hex.h"
const struct slay_table_t* p = &slay_table[i];
if ((have_flag(flgs, p->slay_flag)) &&
- (atoffset(u32b, r_ptr, p->flag_offset) & p->affect_race_flag))
+ (atoffset(BIT_FLAGS, r_ptr, p->flag_offset) & p->affect_race_flag))
{
if (is_original_ap_and_seen(m_ptr))
{
- atoffset(u32b, r_ptr, p->r_flag_offset) |= p->affect_race_flag;
+ atoffset(BIT_FLAGS, r_ptr, p->r_flag_offset) |= p->affect_race_flag;
}
mult = MAX(mult, p->slay_mult);
* @param tdam 現在算出途中のダメージ値
* @param m_ptr 目標モンスターの構造体参照ポインタ
* @param mode 剣術のID
- * @param thrown 射撃処理ならばTRUEを指定する
+ * @param thrown 投擲処理ならばTRUEを指定する
* @return 総合的なスレイを加味したダメージ値
* @note
* Note that "flasks of oil" do NOT do fire damage, although they\n
if (!thrown)
{
- /* Magical Swords */
if (p_ptr->special_attack & (ATTACK_ACID)) add_flag(flgs, TR_BRAND_ACID);
if (p_ptr->special_attack & (ATTACK_COLD)) add_flag(flgs, TR_BRAND_COLD);
if (p_ptr->special_attack & (ATTACK_ELEC)) add_flag(flgs, TR_BRAND_ELEC);
if (p_ptr->special_attack & (ATTACK_POIS)) add_flag(flgs, TR_BRAND_POIS);
}
- /* Hex - Slay Good (Runesword) */
if (hex_spelling(HEX_RUNESWORD)) add_flag(flgs, TR_SLAY_GOOD);
- /* Some "weapons" and "ammo" do extra damage */
switch (o_ptr->tval)
{
case TV_SHOT:
case TV_DIGGING:
case TV_LITE:
{
- /* Slaying */
mult = mult_slaying(mult, flgs, m_ptr);
- /* Elemental Brand */
mult = mult_brand(mult, flgs, m_ptr);
- /* Hissatsu */
if (p_ptr->pclass == CLASS_SAMURAI)
{
mult = mult_hissatsu(mult, flgs, m_ptr, mode);
}
- /* Force Weapon */
if ((p_ptr->pclass != CLASS_SAMURAI) && (have_flag(flgs, TR_FORCE_WEAPON)) && (p_ptr->csp > (o_ptr->dd * o_ptr->ds / 5)))
{
p_ptr->csp -= (1 + (o_ptr->dd * o_ptr->ds / 5));
mult = mult * 3 / 2 + 20;
}
- /* Hack -- The Nothung cause special damage to Fafner */
if ((o_ptr->name1 == ART_NOTHUNG) && (m_ptr->r_idx == MON_FAFNER))
mult = 150;
break;
}
if (mult > 150) mult = 150;
- /* Return the total damage */
return (tdam * mult / 10);
}
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
- if ((atoffset(u32b, r_ptr, flags_offset) & aura_flag) && !immune)
+ if ((atoffset(BIT_FLAGS, r_ptr, flags_offset) & aura_flag) && !immune)
{
GAME_TEXT mon_name[MAX_NLEN];
int aura_damage = damroll(1 + (r_ptr->level / 26), 1 + (r_ptr->level / 17));
- /* Hack -- Get the "died from" name */
- monster_desc(mon_name, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
-
+ monster_desc(mon_name, m_ptr, MD_WRONGDOER_NAME);
msg_print(message);
-
dam_func(aura_damage, mon_name, -1, TRUE);
if (is_original_ap_and_seen(m_ptr))
{
- atoffset(u32b, r_ptr, r_flags_offset) |= aura_flag;
+ atoffset(BIT_FLAGS, r_ptr, r_flags_offset) |= aura_flag;
}
handle_stuff();
/* Extract the effective monster level */
rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
-
/* Get the monster name (or "it") */
monster_desc(m_name, m_ptr, 0);
- /* Get the "died from" information (i.e. "a kobold") */
- monster_desc(ddesc, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+ monster_desc(ddesc, m_ptr, MD_WRONGDOER_NAME);
if (p_ptr->special_defense & KATA_IAI)
{