From 070013135b1c6cf801455fe03b53d6f19b34bfde Mon Sep 17 00:00:00 2001 From: deskull Date: Mon, 16 Sep 2019 09:42:49 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#38997=20perilous=5Fsecrets()=20?= =?utf8?q?=E3=81=AE=E5=8F=82=E7=85=A7=E6=95=B4=E7=90=86=20/=20Refactor=20r?= =?utf8?q?eferences=20in=20perilous=5Fsecrets().?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/spells-object.c | 24 ++++++++++++------------ src/spells-object.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/spells-object.c b/src/spells-object.c index 25243ae7f..6b187cfbd 100644 --- a/src/spells-object.c +++ b/src/spells-object.c @@ -821,43 +821,43 @@ bool brand_bolts(void) } -bool perilous_secrets(player_type *creature_ptr) +bool perilous_secrets(player_type *user_ptr) { if (!ident_spell(FALSE)) return FALSE; if (mp_ptr->spell_book) { /* Sufficient mana */ - if (20 <= creature_ptr->csp) + if (20 <= user_ptr->csp) { /* Use some mana */ - creature_ptr->csp -= 20; + user_ptr->csp -= 20; } /* Over-exert the player */ else { - int oops = 20 - creature_ptr->csp; + int oops = 20 - user_ptr->csp; /* No mana left */ - creature_ptr->csp = 0; - creature_ptr->csp_frac = 0; + user_ptr->csp = 0; + user_ptr->csp_frac = 0; msg_print(_("石を制御できない!", "You are too weak to control the stone!")); /* Hack -- Bypass free action */ - (void)set_paralyzed(p_ptr, creature_ptr->paralyzed + randint1(5 * oops + 1)); + (void)set_paralyzed(user_ptr, user_ptr->paralyzed + randint1(5 * oops + 1)); /* Confusing. */ - (void)set_confused(p_ptr, creature_ptr->confused + randint1(5 * oops + 1)); + (void)set_confused(user_ptr, user_ptr->confused + randint1(5 * oops + 1)); } - creature_ptr->redraw |= (PR_MANA); + user_ptr->redraw |= (PR_MANA); } - take_hit(p_ptr, DAMAGE_LOSELIFE, damroll(1, 12), _("危険な秘密", "perilous secrets"), -1); + take_hit(user_ptr, DAMAGE_LOSELIFE, damroll(1, 12), _("危険な秘密", "perilous secrets"), -1); /* Confusing. */ - if (one_in_(5)) (void)set_confused(p_ptr, creature_ptr->confused + randint1(10)); + if (one_in_(5)) (void)set_confused(user_ptr, user_ptr->confused + randint1(10)); /* Exercise a little care... */ - if (one_in_(20)) take_hit(p_ptr, DAMAGE_LOSELIFE, damroll(4, 10), _("危険な秘密", "perilous secrets"), -1); + if (one_in_(20)) take_hit(user_ptr, DAMAGE_LOSELIFE, damroll(4, 10), _("危険な秘密", "perilous secrets"), -1); return TRUE; } diff --git a/src/spells-object.h b/src/spells-object.h index c5c93b6e0..0dc86d17d 100644 --- a/src/spells-object.h +++ b/src/spells-object.h @@ -10,7 +10,7 @@ extern bool curse_weapon_object(bool force, object_type *o_ptr); extern bool curse_weapon(bool force, int slot); extern bool rustproof(void); extern bool brand_bolts(void); -extern bool perilous_secrets(player_type *creature_ptr); +extern bool perilous_secrets(player_type *user_ptr); extern void get_bloody_moon_flags(object_type *o_ptr); extern void phlogiston(void); extern bool bless_weapon(void); -- 2.11.0