(void)set_paralyzed(p_ptr, p_ptr->paralyzed + 2 +
randint0(6));
else
- (void)set_stun(p_ptr->stun + 10 +
+ (void)set_stun(p_ptr, p_ptr->stun + 10 +
randint0(100));
}
else if (one_in_(3)) apply_disenchant(0);
(void)set_oppose_elec(p_ptr, randint1(50) + 50, FALSE);
(void)set_oppose_fire(p_ptr, randint1(50) + 50, FALSE);
(void)set_oppose_cold(p_ptr, randint1(50) + 50, FALSE);
- (void)set_oppose_pois(randint1(50) + 50, FALSE);
+ (void)set_oppose_pois(p_ptr, randint1(50) + 50, FALSE);
break;
}
(void)set_oppose_elec(p_ptr, randint1(40) + 40, FALSE);
(void)set_oppose_fire(p_ptr, randint1(40) + 40, FALSE);
(void)set_oppose_cold(p_ptr, randint1(40) + 40, FALSE);
- (void)set_oppose_pois(randint1(40) + 40, FALSE);
+ (void)set_oppose_pois(p_ptr, randint1(40) + 40, FALSE);
break;
}
case ACT_RESIST_POIS:
{
msg_format(_("%sが緑に輝いた...", "The %s grows green."), name);
- (void)set_oppose_pois(randint1(20) + 20, FALSE);
+ (void)set_oppose_pois(p_ptr, randint1(20) + 20, FALSE);
break;
}
(void)set_oppose_elec(p_ptr, v, FALSE);
(void)set_oppose_fire(p_ptr, v, FALSE);
(void)set_oppose_cold(p_ptr, v, FALSE);
- (void)set_oppose_pois(v, FALSE);
+ (void)set_oppose_pois(p_ptr, v, FALSE);
(void)set_ultimate_res(v, FALSE);
break;
}
{
msg_print(_("射撃の反動が体を襲った。", "A reactionary of shooting attacked you. "));
(void)set_slow(p_ptr, p_ptr->slow + randint0(7) + 7, FALSE);
- (void)set_stun(p_ptr->stun + randint1(25));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(25));
}
}
case MS_HEAL:
msg_print(_("自分の傷に念を集中した。", "You concentrate on your wounds!"));
(void)hp_player(p_ptr, plev*6);
- (void)set_stun(0);
+ (void)set_stun(p_ptr, 0);
(void)set_cut(0);
break;
case MS_INVULNER:
(void)set_oppose_elec(p_ptr, p_ptr->oppose_elec + randint1(20) + 20, FALSE);
(void)set_oppose_fire(p_ptr, p_ptr->oppose_fire + randint1(20) + 20, FALSE);
(void)set_oppose_cold(p_ptr, p_ptr->oppose_cold + randint1(20) + 20, FALSE);
- (void)set_oppose_pois(p_ptr->oppose_pois + randint1(20) + 20, FALSE);
+ (void)set_oppose_pois(p_ptr, p_ptr->oppose_pois + randint1(20) + 20, FALSE);
ident = TRUE;
break;
/* Oppose Poison */
if (p_ptr->oppose_pois)
{
- (void)set_oppose_pois(p_ptr->oppose_pois - 1, TRUE);
+ (void)set_oppose_pois(p_ptr, p_ptr->oppose_pois - 1, TRUE);
}
if (p_ptr->ult_res)
}
else
{
- if (set_stun(p_ptr->stun + 10 + randint1(r_ptr->level / 4)))
+ if (set_stun(p_ptr, p_ptr->stun + 10 + randint1(r_ptr->level / 4)))
{
obvious = TRUE;
}
}
/* Apply the stun */
- if (stun_plus) (void)set_stun(p_ptr->stun + stun_plus);
+ if (stun_plus) (void)set_stun(p_ptr, p_ptr->stun + stun_plus);
}
if (explode)
if (plev > 19) set_oppose_fire(p_ptr, (TIME_EFFECT)plev, FALSE);
if (plev > 24) set_oppose_cold(p_ptr, (TIME_EFFECT)plev, FALSE);
if (plev > 29) set_oppose_elec(p_ptr, (TIME_EFFECT)plev, FALSE);
- if (plev > 34) set_oppose_pois((TIME_EFFECT)plev, FALSE);
+ if (plev > 34) set_oppose_pois(p_ptr, (TIME_EFFECT)plev, FALSE);
break;
case 7:
/* Psychometry */
case MS_HEAL:
msg_print(_("自分の傷に念を集中した。", "You concentrate on your wounds!"));
(void)hp_player(p_ptr, plev*4);
- (void)set_stun(0);
+ (void)set_stun(p_ptr, 0);
(void)set_cut(0);
break;
case MS_INVULNER:
}
if (num)
{
- (void)set_oppose_pois(dur, FALSE);
+ (void)set_oppose_pois(p_ptr, dur, FALSE);
num--;
}
}
(void)set_oppose_elec(p_ptr, 0, TRUE);
(void)set_oppose_fire(p_ptr, 0, TRUE);
(void)set_oppose_cold(p_ptr, 0, TRUE);
- (void)set_oppose_pois(0, TRUE);
+ (void)set_oppose_pois(p_ptr, 0, TRUE);
(void)set_ultimate_res(0, TRUE);
(void)set_mimic(p_ptr, 0, 0, TRUE);
(void)set_ele_attack(p_ptr, 0, 0);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_oppose_pois(TIME_EFFECT v, bool do_dec)
+bool set_oppose_pois(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
- if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) v = 1;
- if (p_ptr->is_dead) return FALSE;
+ if ((creature_ptr->pclass == CLASS_NINJA) && (creature_ptr->lev > 44)) v = 1;
+ if (creature_ptr->is_dead) return FALSE;
/* Open */
if (v)
{
- if (p_ptr->oppose_pois && !do_dec)
+ if (creature_ptr->oppose_pois && !do_dec)
{
- if (p_ptr->oppose_pois > v) return FALSE;
+ if (creature_ptr->oppose_pois > v) return FALSE;
}
else if (!IS_OPPOSE_POIS())
{
/* Shut */
else
{
- if (p_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
+ if (creature_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
{
msg_print(_("毒への耐性が薄れた気がする。", "You feel less resistant to poison."));
notice = TRUE;
}
/* Use the value */
- p_ptr->oppose_pois = v;
+ creature_ptr->oppose_pois = v;
/* Nothing to notice */
if (!notice) return (FALSE);
- p_ptr->redraw |= (PR_STATUS);
+ creature_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(FALSE, FALSE);
handle_stuff();
extern bool set_oppose_elec(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
extern bool set_oppose_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
extern bool set_oppose_cold(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-extern bool set_oppose_pois(TIME_EFFECT v, bool do_dec);
-extern bool set_stun(TIME_EFFECT v);
+extern bool set_oppose_pois(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
+extern bool set_stun(player_type *creature_ptr, TIME_EFFECT v);
extern bool set_cut(TIME_EFFECT v);
extern bool set_food(TIME_EFFECT v);
extern bool inc_stat(player_type *creature_ptr, int stat);
if (cast)
{
- set_oppose_pois(randint1(base) + base, FALSE);
+ set_oppose_pois(p_ptr, randint1(base) + base, FALSE);
}
}
break;
set_oppose_elec(p_ptr, randint1(base) + base, FALSE);
set_oppose_fire(p_ptr, randint1(base) + base, FALSE);
set_oppose_cold(p_ptr, randint1(base) + base, FALSE);
- set_oppose_pois(randint1(base) + base, FALSE);
+ set_oppose_pois(p_ptr, randint1(base) + base, FALSE);
}
}
break;
{
set_cut(0);
set_poisoned(p_ptr, 0);
- set_stun(0);
+ set_stun(p_ptr, 0);
}
}
break;
hp_player(p_ptr, heal);
set_afraid(p_ptr, 0);
set_poisoned(p_ptr, 0);
- set_stun(0);
+ set_stun(p_ptr, 0);
set_cut(0);
}
}
if (cast)
{
- set_oppose_pois(randint1(base) + base, FALSE);
+ set_oppose_pois(p_ptr, randint1(base) + base, FALSE);
}
}
break;
set_oppose_elec(p_ptr, v, FALSE);
set_oppose_fire(p_ptr, v, FALSE);
set_oppose_cold(p_ptr, v, FALSE);
- set_oppose_pois(v, FALSE);
+ set_oppose_pois(p_ptr, v, FALSE);
set_ultimate_res(v, FALSE);
}
}
set_oppose_elec(p_ptr, randint1(base) + base, FALSE);
set_oppose_fire(p_ptr, randint1(base) + base, FALSE);
set_oppose_cold(p_ptr, randint1(base) + base, FALSE);
- set_oppose_pois(randint1(base) + base, FALSE);
+ set_oppose_pois(p_ptr, randint1(base) + base, FALSE);
}
}
break;
if (cont)
{
hp_player(p_ptr, damroll(dice, sides));
- set_stun(0);
+ set_stun(p_ptr, 0);
set_cut(0);
}
}
{
msg_print(_("岩石があなたに直撃した!", "You are bashed by rubble!"));
damage = damroll(10, 4);
- (void)set_stun(p_ptr->stun + randint1(50));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(50));
break;
}
case 3:
{
msg_print(_("あなたは床と壁との間に挟まれてしまった!", "You are crushed between the floor and ceiling!"));
damage = damroll(10, 4);
- (void)set_stun(p_ptr->stun + randint1(50));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(50));
break;
}
}
(void)set_blind(p_ptr, 0);
(void)set_confused(p_ptr, 0);
(void)set_image(p_ptr, 0);
- (void)set_stun(0);
+ (void)set_stun(p_ptr, 0);
(void)set_cut(0);
(void)restore_all_status();
(void)set_shero(p_ptr, 0, TRUE);
if (set_blind(p_ptr, 0)) ident = TRUE;
if (set_confused(p_ptr, 0)) ident = TRUE;
if (set_poisoned(p_ptr, 0)) ident = TRUE;
- if (set_stun(0)) ident = TRUE;
+ if (set_stun(p_ptr, 0)) ident = TRUE;
if (set_cut(0)) ident = TRUE;
if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
return ident;
if (set_blind(p_ptr, 0)) ident = TRUE;
if (set_confused(p_ptr, 0)) ident = TRUE;
if (set_poisoned(p_ptr, 0)) ident = TRUE;
- if (set_stun(0)) ident = TRUE;
+ if (set_stun(p_ptr, 0)) ident = TRUE;
if (set_cut(0)) ident = TRUE;
if (set_image(p_ptr, 0)) ident = TRUE;
return ident;
set_confused(p_ptr, p_ptr->confused + 3 + randint1(dam));
break;
case 2:
- set_stun(p_ptr->stun + randint1(dam));
+ set_stun(p_ptr, p_ptr->stun + randint1(dam));
break;
case 3:
{
switch (randint1(4))
{
case 1:
- set_stun(p_ptr->stun + dam / 2);
+ set_stun(p_ptr, p_ptr->stun + dam / 2);
break;
case 2:
set_confused(p_ptr, p_ptr->confused + dam / 2);
if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
{
int plus_stun = (randint1((dam > 40) ? 35 : (dam * 3 / 4 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
if (!(p_ptr->resist_fire || IS_OPPOSE_FIRE() || p_ptr->immune_fire))
{
if (!p_ptr->resist_sound && !p_ptr->resist_water)
{
- set_stun(p_ptr->stun + randint1(40));
+ set_stun(p_ptr, p_ptr->stun + randint1(40));
}
if (!p_ptr->resist_conf && !p_ptr->resist_water)
{
else if (!CHECK_MULTISHADOW())
{
int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
if (!p_ptr->resist_sound || one_in_(13))
if (fuzzy) msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
{
- (void)set_stun(p_ptr->stun + randint1(20));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
}
get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
break;
if (fuzzy) msg_print(_("爆発があった!", "There is an explosion!"));
if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
{
- (void)set_stun(p_ptr->stun + randint1(20));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
}
if (p_ptr->resist_shard)
if (!(p_ptr->resist_sound || p_ptr->levitation))
{
int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
- (void)set_stun(p_ptr->stun + plus_stun);
+ (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
}
}
if (p_ptr->levitation)
}
if (!p_ptr->resist_sound)
{
- (void)set_stun(p_ptr->stun + randint1(15));
+ (void)set_stun(p_ptr, p_ptr->stun + randint1(15));
}
if ((!(p_ptr->resist_cold || IS_OPPOSE_COLD())) || one_in_(12))
if (set_poisoned(p_ptr, 0)) ident = TRUE;
if (set_afraid(p_ptr, 0)) ident = TRUE;
if (hp_player(p_ptr, 50)) ident = TRUE;
- if (set_stun(0)) ident = TRUE;
+ if (set_stun(p_ptr, 0)) ident = TRUE;
if (set_cut(0)) ident = TRUE;
return ident;
}
{
msg_print(_("体の中で激しい爆発が起きた!", "Massive explosions rupture your body!"));
take_hit(DAMAGE_NOESCAPE, damroll(50, 20), _("爆発の薬", "a potion of Detonation"), -1);
- (void)set_stun(creature_ptr->stun + 75);
+ (void)set_stun(p_ptr, creature_ptr->stun + 75);
(void)set_cut(creature_ptr->cut + 5000);
return TRUE;
}