{
if (creature_ptr->blessed > v) return FALSE;
}
- else if (!IS_BLESSED())
+ else if (!is_blessed(creature_ptr))
{
msg_print(_("高潔な気分になった!", "You feel righteous!"));
notice = TRUE;
}
}
-
else
{
if (creature_ptr->blessed && !music_singing(creature_ptr, MUSIC_BLESS))
bool old_mighty_throw = creature_ptr->mighty_throw;
/* Current feature under player. */
- floor_type *floor_ptr = floor_ptr;
+ floor_type *floor_ptr = creature_ptr->current_floor_ptr;
feature_type *f_ptr = &f_info[floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].feat];
/* Save the old armor class */
}
/* Temporary blessing */
- if (IS_BLESSED())
+ if (is_blessed(creature_ptr))
{
creature_ptr->to_a += 5;
creature_ptr->dis_to_a += 5;
{
if (!creature_ptr->update) return;
- floor_type *floor_ptr = floor_ptr;
+ floor_type *floor_ptr = creature_ptr->current_floor_ptr;
if (creature_ptr->update & (PU_AUTODESTROY))
{
creature_ptr->update &= ~(PU_AUTODESTROY);
{
int to_ruin = 0;
POSITION r_y, r_x;
- floor_type *floor_ptr = floor_ptr;
+ floor_type *floor_ptr = creature_ptr->current_floor_ptr;
int pattern_type = f_info[floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].feat].subtype;
if (pattern_type == PATTERN_TILE_WRECKED)
leave_floor(creature_ptr);
wipe_m_list();
}
+
+
+/*!
+ * @param creature_ptr プレーヤーへの参照ポインタ
+ * @return 祝福状態ならばTRUE
+ */
+bool is_blessed(player_type *creature_ptr)
+{
+ return creature_ptr->blessed || music_singing(creature_ptr, MUSIC_BLESS) || hex_spelling(HEX_BLESS);
+}
#define MAGIC_GAIN_EXP 0x0004
/*
+ * todo ここからp_ptrを消すと、object-hookにある大量の関数ポインタを全部修正する必要がある
+ * 影響範囲が広すぎるので保留
* Magic-books for the realms
*/
#define REALM1_BOOK (p_ptr->realm1 + TV_LIFE_BOOK - 1)
#define IS_FAST(C) (C->fast || music_singing(C, MUSIC_SPEED) || music_singing(C, MUSIC_SHERO))
#define IS_INVULN(C) (C->invuln || music_singing(C, MUSIC_INVULN))
#define IS_HERO(C) (C->hero || music_singing(C, MUSIC_HERO) || music_singing(C, MUSIC_SHERO))
-#define IS_BLESSED() (p_ptr->blessed || music_singing(p_ptr, MUSIC_BLESS) || hex_spelling(HEX_BLESS))
#define IS_OPPOSE_ACID() (p_ptr->oppose_acid || music_singing(p_ptr, MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
#define IS_OPPOSE_ELEC() (p_ptr->oppose_elec || music_singing(p_ptr, MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
#define IS_OPPOSE_FIRE() (p_ptr->oppose_fire || music_singing(p_ptr, MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
#define P_PTR_KI (p_ptr->magic_num1[0])
+extern bool is_blessed(player_type *player_ptr);
+
/*
* Player "food" crucial values
*/
{
info[i++] = _("あなたは魔力を吸われている。", "You brain is drained.");
}
- if (IS_BLESSED())
+ if (is_blessed(creature_ptr))
{
info[i++] = _("あなたは高潔さを感じている。", "You feel rightous.");
}
* @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
* @return アイテムが祝福されたアイテムならばTRUEを返す
*/
-static bool is_blessed(object_type *o_ptr)
+static bool is_blessed_item(object_type *o_ptr)
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(o_ptr, flgs);
case TV_POLEARM:
case TV_SWORD:
{
- if (is_blessed(o_ptr)) break;
+ if (is_blessed_item(o_ptr)) break;
}
default:
return FALSE;
if (creature_ptr->shero) ADD_FLG(BAR_BERSERK);
/* Blessed */
- if (IS_BLESSED()) ADD_FLG(BAR_BLESSED);
+ if (is_blessed(creature_ptr)) ADD_FLG(BAR_BLESSED);
/* Shield */
if (creature_ptr->magicdef) ADD_FLG(BAR_MAGICDEFENSE);