OSDN Git Service
(root)
/
hengband
/
hengband.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Refactor] #38997 set_protevil() に player_type * 引数を追加.
[hengband/hengband.git]
/
src
/
player-effects.c
diff --git
a/src/player-effects.c
b/src/player-effects.c
index
d38114d
..
9a93e53
100644
(file)
--- a/
src/player-effects.c
+++ b/
src/player-effects.c
@@
-298,7
+298,7
@@
void dispel_player(void)
(void)set_tsuyoshi(0, TRUE);
(void)set_hero(p_ptr, 0, TRUE);
(void)set_shero(p_ptr, 0, TRUE);
(void)set_tsuyoshi(0, TRUE);
(void)set_hero(p_ptr, 0, TRUE);
(void)set_shero(p_ptr, 0, TRUE);
- (void)set_protevil(0, TRUE);
+ (void)set_protevil(
p_ptr,
0, TRUE);
(void)set_invuln(0, TRUE);
(void)set_wraith_form(0, TRUE);
(void)set_kabenuke(0, TRUE);
(void)set_invuln(0, TRUE);
(void)set_wraith_form(0, TRUE);
(void)set_kabenuke(0, TRUE);
@@
-1245,21
+1245,21
@@
bool set_shero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_protevil(TIME_EFFECT v, bool do_dec)
+bool set_protevil(
player_type *creature_ptr,
TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : 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)
{
/* Open */
if (v)
{
- if (
p
_ptr->protevil && !do_dec)
+ if (
creature
_ptr->protevil && !do_dec)
{
{
- if (
p
_ptr->protevil > v) return FALSE;
+ if (
creature
_ptr->protevil > v) return FALSE;
}
}
- else if (!
p
_ptr->protevil)
+ else if (!
creature
_ptr->protevil)
{
msg_print(_("邪悪なる存在から守られているような感じがする!", "You feel safe from evil!"));
notice = TRUE;
{
msg_print(_("邪悪なる存在から守られているような感じがする!", "You feel safe from evil!"));
notice = TRUE;
@@
-1269,7
+1269,7
@@
bool set_protevil(TIME_EFFECT v, bool do_dec)
/* Shut */
else
{
/* Shut */
else
{
- if (
p
_ptr->protevil)
+ if (
creature
_ptr->protevil)
{
msg_print(_("邪悪なる存在から守られている感じがなくなった。", "You no longer feel safe from evil."));
notice = TRUE;
{
msg_print(_("邪悪なる存在から守られている感じがなくなった。", "You no longer feel safe from evil."));
notice = TRUE;
@@
-1277,8
+1277,8
@@
bool set_protevil(TIME_EFFECT v, bool do_dec)
}
/* Use the value */
}
/* Use the value */
-
p
_ptr->protevil = v;
-
p
_ptr->redraw |= (PR_STATUS);
+
creature
_ptr->protevil = v;
+
creature
_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
if (!notice) return (FALSE);
/* Nothing to notice */
if (!notice) return (FALSE);