else
{
set_blind(p_ptr, 0);
- set_confused(0);
+ set_confused(p_ptr, 0);
p_ptr->stun = 0;
p_ptr->chp = p_ptr->mhp;
p_ptr->csp = p_ptr->msp;
{
if (!p_ptr->resist_conf)
{
- if (set_confused(p_ptr->confused + randint0(10) + 10))
+ if (set_confused(p_ptr, p_ptr->confused + randint0(10) + 10))
{
ident = TRUE;
}
case SV_FOOD_CURE_CONFUSION:
{
- if (set_confused(0)) ident = TRUE;
+ if (set_confused(p_ptr, 0)) ident = TRUE;
break;
}
/* Confusion */
if (p_ptr->confused)
{
- (void)set_confused(p_ptr->confused - dec_count);
+ (void)set_confused(p_ptr, p_ptr->confused - dec_count);
}
/* Afraid */
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(20) + 15);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(20) + 15);
}
if (!p_ptr->resist_chaos)
/* Increase "confused" */
if (!p_ptr->resist_conf && !CHECK_MULTISHADOW())
{
- if (set_confused(p_ptr->confused + 3 + randint1(rlev)))
+ if (set_confused(p_ptr, p_ptr->confused + 3 + randint1(rlev)))
{
obvious = TRUE;
}
else if (b < 45)
{
msg_print(_("あなたの頭は混乱した!", "Your brain is addled!"));
- set_confused(p_ptr->confused + randint1(8));
+ set_confused(p_ptr, p_ptr->confused + randint1(8));
}
else if (b < 90)
{
if (!resist && !saving_throw)
{
- (void)set_confused(p_ptr->confused + randint0(4) + 4);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
}
learn_spell(MS_CONF);
update_smart_learn(m_idx, DRS_CONF);
* @param v 継続時間
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_confused(TIME_EFFECT v)
+bool set_confused(player_type *creature_ptr, TIME_EFFECT v)
{
bool notice = FALSE;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
- if (p_ptr->is_dead) return FALSE;
+ if (creature_ptr->is_dead) return FALSE;
/* Open */
if (v)
{
- if (!p_ptr->confused)
+ if (!creature_ptr->confused)
{
msg_print(_("あなたは混乱した!", "You are confused!"));
- if (p_ptr->action == ACTION_LEARN)
+ if (creature_ptr->action == ACTION_LEARN)
{
msg_print(_("学習が続けられない!", "You cannot continue Learning!"));
- p_ptr->new_mane = FALSE;
+ creature_ptr->new_mane = FALSE;
- p_ptr->redraw |= (PR_STATE);
- p_ptr->action = ACTION_NONE;
+ creature_ptr->redraw |= (PR_STATE);
+ creature_ptr->action = ACTION_NONE;
}
- if (p_ptr->action == ACTION_KAMAE)
+ if (creature_ptr->action == ACTION_KAMAE)
{
msg_print(_("構えがとけた。", "Your posture gets loose."));
- p_ptr->special_defense &= ~(KAMAE_MASK);
- p_ptr->update |= (PU_BONUS);
- p_ptr->redraw |= (PR_STATE);
- p_ptr->action = ACTION_NONE;
+ creature_ptr->special_defense &= ~(KAMAE_MASK);
+ creature_ptr->update |= (PU_BONUS);
+ creature_ptr->redraw |= (PR_STATE);
+ creature_ptr->action = ACTION_NONE;
}
- else if (p_ptr->action == ACTION_KATA)
+ else if (creature_ptr->action == ACTION_KATA)
{
msg_print(_("型が崩れた。", "Your posture gets loose."));
- p_ptr->special_defense &= ~(KATA_MASK);
- p_ptr->update |= (PU_BONUS);
- p_ptr->update |= (PU_MONSTERS);
- p_ptr->redraw |= (PR_STATE);
- p_ptr->redraw |= (PR_STATUS);
- p_ptr->action = ACTION_NONE;
+ creature_ptr->special_defense &= ~(KATA_MASK);
+ creature_ptr->update |= (PU_BONUS);
+ creature_ptr->update |= (PU_MONSTERS);
+ creature_ptr->redraw |= (PR_STATE);
+ creature_ptr->redraw |= (PR_STATUS);
+ creature_ptr->action = ACTION_NONE;
}
/* Sniper */
- if (p_ptr->concent) reset_concentration(TRUE);
+ if (creature_ptr->concent) reset_concentration(TRUE);
/* Hex */
if (hex_spelling_any()) stop_hex_spell_all();
notice = TRUE;
- p_ptr->counter = FALSE;
+ creature_ptr->counter = FALSE;
chg_virtue(V_HARMONY, -1);
}
}
/* Shut */
else
{
- if (p_ptr->confused)
+ if (creature_ptr->confused)
{
msg_print(_("やっと混乱がおさまった。", "You feel less confused now."));
- p_ptr->special_attack &= ~(ATTACK_SUIKEN);
+ creature_ptr->special_attack &= ~(ATTACK_SUIKEN);
notice = TRUE;
}
}
/* Use the value */
- p_ptr->confused = v;
- p_ptr->redraw |= (PR_STATUS);
+ creature_ptr->confused = v;
+ creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
if (!notice) return (FALSE);
extern void dispel_player(void);
extern bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, IDX p, bool do_dec);
extern bool set_blind(player_type *creature_ptr, TIME_EFFECT v);
-extern bool set_confused(TIME_EFFECT v);
+extern bool set_confused(player_type *creature_ptr, TIME_EFFECT v);
extern bool set_poisoned(TIME_EFFECT v);
extern bool set_afraid(TIME_EFFECT v);
extern bool set_paralyzed(TIME_EFFECT v);
/* Brain smash */
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(4) + 4);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
}
if (!p_ptr->free_act)
{
(void)set_paralyzed(creature_ptr->paralyzed + randint1(5 * oops + 1));
/* Confusing. */
- (void)set_confused(creature_ptr->confused + randint1(5 * oops + 1));
+ (void)set_confused(p_ptr, creature_ptr->confused + randint1(5 * oops + 1));
}
creature_ptr->redraw |= (PR_MANA);
}
take_hit(DAMAGE_LOSELIFE, damroll(1, 12), _("危険な秘密", "perilous secrets"), -1);
/* Confusing. */
- if (one_in_(5)) (void)set_confused(creature_ptr->confused + randint1(10));
+ if (one_in_(5)) (void)set_confused(p_ptr, creature_ptr->confused + randint1(10));
/* Exercise a little care... */
if (one_in_(20)) take_hit(DAMAGE_LOSELIFE, damroll(4, 10), _("危険な秘密", "perilous secrets"), -1);
restore_level();
(void)set_poisoned(0);
(void)set_blind(p_ptr, 0);
- (void)set_confused(0);
+ (void)set_confused(p_ptr, 0);
(void)set_image(0);
(void)set_stun(0);
(void)set_cut(0);
bool_hack ident = FALSE;
if (hp_player(p_ptr, damroll(dice, sides))) ident = TRUE;
if (set_blind(p_ptr, 0)) ident = TRUE;
- if (set_confused(0)) ident = TRUE;
+ if (set_confused(p_ptr, 0)) ident = TRUE;
if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE;
if (set_shero(0, TRUE)) ident = TRUE;
return ident;
bool_hack ident = FALSE;
if (hp_player(p_ptr, pow)) ident = TRUE;
if (set_blind(p_ptr, 0)) ident = TRUE;
- if (set_confused(0)) ident = TRUE;
+ if (set_confused(p_ptr, 0)) ident = TRUE;
if (set_poisoned(0)) ident = TRUE;
if (set_stun(0)) ident = TRUE;
if (set_cut(0)) ident = TRUE;
bool_hack ident = FALSE;
if (hp_player(p_ptr, pow)) ident = TRUE;
if (set_blind(p_ptr, 0)) ident = TRUE;
- if (set_confused(0)) ident = TRUE;
+ if (set_confused(p_ptr, 0)) ident = TRUE;
if (set_poisoned(0)) ident = TRUE;
if (set_stun(0)) ident = TRUE;
if (set_cut(0)) ident = TRUE;
switch (randint1(4))
{
case 1:
- set_confused(p_ptr->confused + 3 + randint1(dam));
+ set_confused(p_ptr, p_ptr->confused + 3 + randint1(dam));
break;
case 2:
set_stun(p_ptr->stun + randint1(dam));
set_stun(p_ptr->stun + dam / 2);
break;
case 2:
- set_confused(p_ptr->confused + dam / 2);
+ set_confused(p_ptr, p_ptr->confused + dam / 2);
break;
default:
{
}
if (!p_ptr->resist_conf && !p_ptr->resist_water)
{
- set_confused(p_ptr->confused + randint1(5) + 5);
+ set_confused(p_ptr, p_ptr->confused + randint1(5) + 5);
}
if (one_in_(5) && !p_ptr->resist_water)
{
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(20) + 10);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(20) + 10);
}
if (!p_ptr->resist_chaos)
{
}
else if (!CHECK_MULTISHADOW())
{
- (void)set_confused(p_ptr->confused + randint1(20) + 10);
+ (void)set_confused(p_ptr, p_ptr->confused + randint1(20) + 10);
}
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
break;
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(4) + 4);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
}
if (!p_ptr->resist_chaos && one_in_(3))
}
if (!p_ptr->resist_conf)
{
- (void)set_confused(p_ptr->confused + randint0(4) + 4);
+ (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
}
if (!p_ptr->free_act)
{
msg_print(_("あなたの頭に大量の幽霊たちの騒々しい声が押し寄せてきた...",
"Your head is invaded by a horde of gibbering spectral voices..."));
- set_confused(p_ptr->confused + randint1(4) + 4);
+ set_confused(p_ptr, p_ptr->confused + randint1(4) + 4);
}
else if (die < 31)
{
else if (!creature_ptr->resist_conf) creature_ptr->special_attack |= ATTACK_SUIKEN;
if (!creature_ptr->resist_conf)
{
- if (set_confused(randint0(20) + 15))
+ if (set_confused(p_ptr, randint0(20) + 15))
{
ident = TRUE;
}
case TRAP_CONFUSE:
{
- hit_trap_set_abnormal_status(
+ hit_trap_set_abnormal_status_p(
_("きらめくガスに包み込まれた!", "A gas of scintillating colors surrounds you!"),
p_ptr->resist_conf,
set_confused, p_ptr->confused + (TIME_EFFECT)randint0(20) + 10);