From 5cd782faea3c04cd29c8f02370887e66a2d4aad0 Mon Sep 17 00:00:00 2001 From: Hourier Date: Sat, 27 Jun 2020 17:02:30 +0900 Subject: [PATCH] [Refactor] #40466 Separated bad-status-setter.c/h from player-effects.c/h --- Hengband/Hengband/Hengband.vcxproj | 2 + Hengband/Hengband/Hengband.vcxproj.filters | 6 + src/Makefile.am | 1 + src/cmd-action/cmd-spell.c | 1 + src/cmd-building/cmd-inn.c | 1 + src/cmd-item/cmd-activate.c | 1 + src/cmd-item/cmd-eat.c | 1 + src/cmd-item/cmd-quaff.c | 1 + src/cmd-item/cmd-read.c | 1 + src/cmd-item/cmd-usestaff.c | 1 + src/cmd/cmd-basic.c | 1 + src/core/hp-mp-processor.c | 2 +- src/core/magic-effects-timeout-reducer.c | 1 + src/effect/effect-monster-charm.c | 1 + src/effect/effect-monster-psi.c | 1 + src/effect/effect-player-oldies.c | 1 + src/effect/effect-player-resist-hurt.c | 1 + src/effect/effect-player-spirit.c | 1 + src/floor/pattern-walk.c | 1 + src/grid/trap.c | 1 + src/inventory/inventory-curse.c | 2 +- src/mind/mind.c | 1 + src/mind/racial.c | 1 + src/monster-attack/monster-attack-status.c | 1 + src/monster-attack/monster-attack-switcher.c | 1 + src/mspell/mspell-status.c | 1 + src/mspell/mspells3.c | 1 + src/mutation/mutation-processor.c | 1 + src/player/bad-status-setter.c | 361 +++++++++++++++++++++++++++ src/player/bad-status-setter.h | 11 + src/player/digestion-processor.c | 1 + src/player/eldritch-horror.c | 1 + src/player/player-effects.c | 351 +------------------------- src/player/player-effects.h | 7 - src/realm/realm-arcane.c | 1 + src/realm/realm-crusade.c | 1 + src/realm/realm-daemon.c | 1 + src/realm/realm-life.c | 1 + src/realm/realm-nature.c | 1 + src/realm/realm-song.c | 1 + src/specific-object/chest.c | 1 + src/spell-kind/spells-floor.c | 1 + src/spell-kind/spells-random.c | 1 + src/spell/spells-object.c | 1 + src/spell/spells-staff-only.c | 1 + src/spell/spells-status.c | 1 + src/spell/spells-summon.c | 1 + src/spell/spells3.c | 1 + 48 files changed, 423 insertions(+), 359 deletions(-) create mode 100644 src/player/bad-status-setter.c create mode 100644 src/player/bad-status-setter.h diff --git a/Hengband/Hengband/Hengband.vcxproj b/Hengband/Hengband/Hengband.vcxproj index d6e0fb208..5670d86d4 100644 --- a/Hengband/Hengband/Hengband.vcxproj +++ b/Hengband/Hengband/Hengband.vcxproj @@ -213,6 +213,7 @@ + @@ -616,6 +617,7 @@ + diff --git a/Hengband/Hengband/Hengband.vcxproj.filters b/Hengband/Hengband/Hengband.vcxproj.filters index 72940b8f7..0b51446a2 100644 --- a/Hengband/Hengband/Hengband.vcxproj.filters +++ b/Hengband/Hengband/Hengband.vcxproj.filters @@ -1439,6 +1439,9 @@ mind + + player + @@ -3169,6 +3172,9 @@ player + + player + diff --git a/src/Makefile.am b/src/Makefile.am index 9c6533e38..12a525996 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -437,6 +437,7 @@ hengband_SOURCES = \ pet/pet-util.c pet/pet-util.h \ \ player/avatar.h player/avatar.c \ + player/bad-status-setter.c player/bad-status-setter.h \ player/eldritch-horror.c player/eldritch-horror.h \ player/mimic-info-table.c player/mimic-info-table.h \ player/patron.c player/patron.h \ diff --git a/src/cmd-action/cmd-spell.c b/src/cmd-action/cmd-spell.c index e7e0101c2..e7abf7882 100644 --- a/src/cmd-action/cmd-spell.c +++ b/src/cmd-action/cmd-spell.c @@ -28,6 +28,7 @@ #include "object/item-use-flags.h" #include "object/object-hook.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/eldritch-horror.h" #include "player/player-class.h" #include "player/player-damage.h" diff --git a/src/cmd-building/cmd-inn.c b/src/cmd-building/cmd-inn.c index 7dedce1bb..789e8991a 100644 --- a/src/cmd-building/cmd-inn.c +++ b/src/cmd-building/cmd-inn.c @@ -4,6 +4,7 @@ #include "game-option/birth-options.h" #include "io/write-diary.h" #include "market/building-actions-table.h" +#include "player/bad-status-setter.h" #include "player/eldritch-horror.h" #include "player/player-effects.h" #include "player/player-race-types.h" diff --git a/src/cmd-item/cmd-activate.c b/src/cmd-item/cmd-activate.c index 2372a628c..d4d6a3cee 100644 --- a/src/cmd-item/cmd-activate.c +++ b/src/cmd-item/cmd-activate.c @@ -44,6 +44,7 @@ #include "monster-floor/place-monster-types.h" #include "monster/smart-learn-types.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "player/player-race-types.h" diff --git a/src/cmd-item/cmd-eat.c b/src/cmd-item/cmd-eat.c index ffe9d7f80..7c5b192dc 100644 --- a/src/cmd-item/cmd-eat.c +++ b/src/cmd-item/cmd-eat.c @@ -22,6 +22,7 @@ #include "object/object-info.h" #include "perception/object-perception.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/mimic-info-table.h" #include "player/player-class.h" #include "player/player-damage.h" diff --git a/src/cmd-item/cmd-quaff.c b/src/cmd-item/cmd-quaff.c index 0b2293755..0a2887c63 100644 --- a/src/cmd-item/cmd-quaff.c +++ b/src/cmd-item/cmd-quaff.c @@ -24,6 +24,7 @@ #include "object/object-info.h" #include "sv-definition/sv-potion-types.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/eldritch-horror.h" #include "player/mimic-info-table.h" #include "player/player-class.h" diff --git a/src/cmd-item/cmd-read.c b/src/cmd-item/cmd-read.c index 942c5015b..aafe8c281 100644 --- a/src/cmd-item/cmd-read.c +++ b/src/cmd-item/cmd-read.c @@ -24,6 +24,7 @@ #include "object/object-kind.h" #include "perception/object-perception.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-damage.h" #include "player/player-effects.h" diff --git a/src/cmd-item/cmd-usestaff.c b/src/cmd-item/cmd-usestaff.c index 3110ad1a7..c30f6711c 100644 --- a/src/cmd-item/cmd-usestaff.c +++ b/src/cmd-item/cmd-usestaff.c @@ -17,6 +17,7 @@ #include "object/object-kind.h" #include "perception/object-perception.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-effects.h" #include "player/player-race-types.h" diff --git a/src/cmd/cmd-basic.c b/src/cmd/cmd-basic.c index 47bb0e8f1..df4f8b7ad 100644 --- a/src/cmd/cmd-basic.c +++ b/src/cmd/cmd-basic.c @@ -67,6 +67,7 @@ #include "object/object-info.h" #include "perception/object-perception.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "player/player-move.h" #include "player/player-personalities-types.h" diff --git a/src/core/hp-mp-processor.c b/src/core/hp-mp-processor.c index 427c1a2dd..9d76434aa 100644 --- a/src/core/hp-mp-processor.c +++ b/src/core/hp-mp-processor.c @@ -11,8 +11,8 @@ #include "object-enchant/object-ego.h" #include "object-enchant/trc-types.h" #include "object/object-flavor.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" -#include "player/player-effects.h" #include "player/player-race-types.h" #include "player/player-race.h" #include "player/special-defense-types.h" diff --git a/src/core/magic-effects-timeout-reducer.c b/src/core/magic-effects-timeout-reducer.c index c37223a60..dd3313fcb 100644 --- a/src/core/magic-effects-timeout-reducer.c +++ b/src/core/magic-effects-timeout-reducer.c @@ -1,5 +1,6 @@ #include "core/magic-effects-timeout-reducer.h" #include "game-option/birth-options.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" /*! diff --git a/src/effect/effect-monster-charm.c b/src/effect/effect-monster-charm.c index 886ca637d..79380dd3a 100644 --- a/src/effect/effect-monster-charm.c +++ b/src/effect/effect-monster-charm.c @@ -16,6 +16,7 @@ #include "object-enchant/trc-types.h" #include "pet/pet-fall-off.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "spell/spells-diceroll.h" #include "view/display-messages.h" diff --git a/src/effect/effect-monster-psi.c b/src/effect/effect-monster-psi.c index be6fd546d..555755eb3 100644 --- a/src/effect/effect-monster-psi.c +++ b/src/effect/effect-monster-psi.c @@ -8,6 +8,7 @@ #include "monster/monster-describer.h" #include "monster/monster-description-types.h" #include "monster/monster-info.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "view/display-messages.h" diff --git a/src/effect/effect-player-oldies.c b/src/effect/effect-player-oldies.c index 361059399..66c3aced7 100644 --- a/src/effect/effect-player-oldies.c +++ b/src/effect/effect-player-oldies.c @@ -1,6 +1,7 @@ #include "effect/effect-player-oldies.h" #include "game-option/birth-options.h" #include "monster-race/race-indice-types.h" +#include "player/bad-status-setter.h" #include "player/eldritch-horror.h" #include "player/player-effects.h" #include "view/display-messages.h" diff --git a/src/effect/effect-player-resist-hurt.c b/src/effect/effect-player-resist-hurt.c index 06ed6a344..173651819 100644 --- a/src/effect/effect-player-resist-hurt.c +++ b/src/effect/effect-player-resist-hurt.c @@ -6,6 +6,7 @@ #include "mspell/mspells3.h" #include "mutation/mutation.h" #include "object/object-broken.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "player/player-race-types.h" diff --git a/src/effect/effect-player-spirit.c b/src/effect/effect-player-spirit.c index f47bf0b69..8f25083bd 100644 --- a/src/effect/effect-player-spirit.c +++ b/src/effect/effect-player-spirit.c @@ -1,6 +1,7 @@ #include "effect/effect-player-spirit.h" #include "mind/mind-mirror-master.h" #include "mspell/mspells3.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "view/display-messages.h" diff --git a/src/floor/pattern-walk.c b/src/floor/pattern-walk.c index 38ef3da3f..04389e41a 100644 --- a/src/floor/pattern-walk.c +++ b/src/floor/pattern-walk.c @@ -9,6 +9,7 @@ #include "grid/grid.h" #include "io/input-key-requester.h" #include "io/write-diary.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "player/player-move.h" diff --git a/src/grid/trap.c b/src/grid/trap.c index 4a5008ddd..210ac6321 100644 --- a/src/grid/trap.c +++ b/src/grid/trap.c @@ -19,6 +19,7 @@ #include "monster-floor/place-monster-types.h" #include "monster/monster-util.h" #include "player/eldritch-horror.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-damage.h" #include "player/player-effects.h" diff --git a/src/inventory/inventory-curse.c b/src/inventory/inventory-curse.c index d790f1bf3..8e3fbbd87 100644 --- a/src/inventory/inventory-curse.c +++ b/src/inventory/inventory-curse.c @@ -12,8 +12,8 @@ #include "object/object-flags.h" #include "object/object-flavor.h" #include "perception/object-perception.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" -#include "player/player-effects.h" #include "player/player-move.h" #include "player/player-race-types.h" #include "spell-kind/spells-random.h" diff --git a/src/mind/mind.c b/src/mind/mind.c index bb7e1243d..4b1e59a2e 100644 --- a/src/mind/mind.c +++ b/src/mind/mind.c @@ -42,6 +42,7 @@ #include "monster/monster-status.h" #include "monster-floor/place-monster-types.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-damage.h" #include "player/player-effects.h" diff --git a/src/mind/racial.c b/src/mind/racial.c index 26342aec1..d7e833eac 100644 --- a/src/mind/racial.c +++ b/src/mind/racial.c @@ -41,6 +41,7 @@ #include "mind/stances-table.h" #include "mutation/mutation.h" #include "object/object-hook.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-damage.h" #include "player/player-effects.h" diff --git a/src/monster-attack/monster-attack-status.c b/src/monster-attack/monster-attack-status.c index 243e6aebd..a82230355 100644 --- a/src/monster-attack/monster-attack-status.c +++ b/src/monster-attack/monster-attack-status.c @@ -8,6 +8,7 @@ #include "mind/mind-mirror-master.h" #include "monster-race/monster-race.h" #include "monster-race/race-indice-types.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "view/display-messages.h" diff --git a/src/monster-attack/monster-attack-switcher.c b/src/monster-attack/monster-attack-switcher.c index 70804de90..7a2f2b0d6 100644 --- a/src/monster-attack/monster-attack-switcher.c +++ b/src/monster-attack/monster-attack-switcher.c @@ -12,6 +12,7 @@ #include "mind/mind-mirror-master.h" #include "monster/monster-status.h" #include "monster/monster-update.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "spell-kind/earthquake.h" diff --git a/src/mspell/mspell-status.c b/src/mspell/mspell-status.c index e24cac5cc..47988f132 100644 --- a/src/mspell/mspell-status.c +++ b/src/mspell/mspell-status.c @@ -19,6 +19,7 @@ #include "mspell/mspell-util.h" #include "mspell/mspells1.h" #include "mspell/mspells3.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "player/player-move.h" #include "player/player-personalities-types.h" diff --git a/src/mspell/mspells3.c b/src/mspell/mspells3.c index d91f4f609..c7acaa934 100644 --- a/src/mspell/mspells3.c +++ b/src/mspell/mspells3.c @@ -43,6 +43,7 @@ #include "mspell/mspell-mask-definitions.h" #include "mspell/mspell-type.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "player/player-status.h" #include "realm/realm-types.h" diff --git a/src/mutation/mutation-processor.c b/src/mutation/mutation-processor.c index 894e2b777..390b883f6 100644 --- a/src/mutation/mutation-processor.c +++ b/src/mutation/mutation-processor.c @@ -8,6 +8,7 @@ #include "mutation/mutation.h" #include "object/lite-processor.h" #include "object/object-hook.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "player/player-move.h" diff --git a/src/player/bad-status-setter.c b/src/player/bad-status-setter.c new file mode 100644 index 000000000..c466d1411 --- /dev/null +++ b/src/player/bad-status-setter.c @@ -0,0 +1,361 @@ +#include "player/bad-status-setter.h" +#include "core/stuff-handler.h" +#include "game-option/disturbance-options.h" +#include "mind/mind-sniper.h" +#include "player/avatar.h" +#include "player/player-effects.h" // つよし状態、後で依存を消す. +#include "player/player-move.h" +#include "player/special-defense-types.h" +#include "realm/realm-types.h" +#include "spell-realm/spells-hex.h" +#include "view/display-messages.h" + +/*! + * @brief 盲目の継続時間をセットする / Set "blind", notice observable changes + * @param v 継続時間 + * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 + * @details + * Note the use of "PU_UN_LITE" and "PU_UN_VIEW", which is needed to\n + * memorize any terrain features which suddenly become "visible".\n + * Note that blindness is currently the only thing which can affect\n + * "player_can_see_bold()".\n + */ +bool set_blind(player_type *creature_ptr, TIME_EFFECT v) +{ + bool notice = FALSE; + v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; + + if (creature_ptr->is_dead) + return FALSE; + + if (v) { + if (!creature_ptr->blind) { + if (creature_ptr->prace == RACE_ANDROID) { + msg_print(_("センサーをやられた!", "You are blind!")); + } else { + msg_print(_("目が見えなくなってしまった!", "You are blind!")); + } + + notice = TRUE; + chg_virtue(creature_ptr, V_ENLIGHTEN, -1); + } + } + + else { + if (creature_ptr->blind) { + if (creature_ptr->prace == RACE_ANDROID) { + msg_print(_("センサーが復旧した。", "You can see again.")); + } else { + msg_print(_("やっと目が見えるようになった。", "You can see again.")); + } + + notice = TRUE; + } + } + + creature_ptr->blind = v; + creature_ptr->redraw |= (PR_STATUS); + if (!notice) + return FALSE; + if (disturb_state) + disturb(creature_ptr, FALSE, FALSE); + + creature_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE); + creature_ptr->redraw |= (PR_MAP); + creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON); + handle_stuff(creature_ptr); + return TRUE; +} + +/*! + * @brief 混乱の継続時間をセットする / Set "confused", notice observable changes + * @param v 継続時間 + * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 + */ +bool set_confused(player_type *creature_ptr, TIME_EFFECT v) +{ + bool notice = FALSE; + v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; + + if (creature_ptr->is_dead) + return FALSE; + + if (v) { + if (!creature_ptr->confused) { + msg_print(_("あなたは混乱した!", "You are confused!")); + + if (creature_ptr->action == ACTION_LEARN) { + msg_print(_("学習が続けられない!", "You cannot continue learning!")); + creature_ptr->new_mane = FALSE; + + creature_ptr->redraw |= (PR_STATE); + creature_ptr->action = ACTION_NONE; + } + if (creature_ptr->action == ACTION_KAMAE) { + msg_print(_("構えがとけた。", "You lose your stance.")); + creature_ptr->special_defense &= ~(KAMAE_MASK); + creature_ptr->update |= (PU_BONUS); + creature_ptr->redraw |= (PR_STATE); + creature_ptr->action = ACTION_NONE; + } else if (creature_ptr->action == ACTION_KATA) { + msg_print(_("型が崩れた。", "You lose your stance.")); + 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 (creature_ptr->concent) + reset_concentration(creature_ptr, TRUE); + + if (hex_spelling_any(creature_ptr)) + stop_hex_spell_all(creature_ptr); + + notice = TRUE; + creature_ptr->counter = FALSE; + chg_virtue(creature_ptr, V_HARMONY, -1); + } + } else { + if (creature_ptr->confused) { + msg_print(_("やっと混乱がおさまった。", "You feel less confused now.")); + creature_ptr->special_attack &= ~(ATTACK_SUIKEN); + notice = TRUE; + } + } + + creature_ptr->confused = v; + creature_ptr->redraw |= (PR_STATUS); + + if (!notice) + return FALSE; + + if (disturb_state) + disturb(creature_ptr, FALSE, FALSE); + handle_stuff(creature_ptr); + return TRUE; +} + +/*! + * @brief 毒の継続時間をセットする / Set "poisoned", notice observable changes + * @param v 継続時間 + * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 + */ +bool set_poisoned(player_type *creature_ptr, TIME_EFFECT v) +{ + bool notice = FALSE; + v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; + + if (creature_ptr->is_dead) + return FALSE; + + if (v) { + if (!creature_ptr->poisoned) { + msg_print(_("毒に侵されてしまった!", "You are poisoned!")); + notice = TRUE; + } + } else { + if (creature_ptr->poisoned) { + msg_print(_("やっと毒の痛みがなくなった。", "You are no longer poisoned.")); + notice = TRUE; + } + } + + creature_ptr->poisoned = v; + creature_ptr->redraw |= (PR_STATUS); + + if (!notice) + return FALSE; + + if (disturb_state) + disturb(creature_ptr, FALSE, FALSE); + handle_stuff(creature_ptr); + return TRUE; +} + +/*! + * @brief 恐怖の継続時間をセットする / Set "afraid", notice observable changes + * @param v 継続時間 + * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 + */ +bool set_afraid(player_type *creature_ptr, TIME_EFFECT v) +{ + bool notice = FALSE; + v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; + + if (creature_ptr->is_dead) + return FALSE; + + if (v) { + if (!creature_ptr->afraid) { + msg_print(_("何もかも恐くなってきた!", "You are terrified!")); + + if (creature_ptr->special_defense & KATA_MASK) { + msg_print(_("型が崩れた。", "You lose your stance.")); + 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; + } + + notice = TRUE; + creature_ptr->counter = FALSE; + chg_virtue(creature_ptr, V_VALOUR, -1); + } + } else { + if (creature_ptr->afraid) { + msg_print(_("やっと恐怖を振り払った。", "You feel bolder now.")); + notice = TRUE; + } + } + + creature_ptr->afraid = v; + creature_ptr->redraw |= (PR_STATUS); + + if (!notice) + return FALSE; + + if (disturb_state) + disturb(creature_ptr, FALSE, FALSE); + handle_stuff(creature_ptr); + return TRUE; +} + +/*! + * @brief 麻痺の継続時間をセットする / Set "paralyzed", notice observable changes + * @param v 継続時間 + * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 + */ +bool set_paralyzed(player_type *creature_ptr, TIME_EFFECT v) +{ + bool notice = FALSE; + v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; + + if (creature_ptr->is_dead) + return FALSE; + + if (v) { + if (!creature_ptr->paralyzed) { + msg_print(_("体が麻痺してしまった!", "You are paralyzed!")); + if (creature_ptr->concent) + reset_concentration(creature_ptr, TRUE); + if (hex_spelling_any(creature_ptr)) + stop_hex_spell_all(creature_ptr); + + creature_ptr->counter = FALSE; + notice = TRUE; + } + } else { + if (creature_ptr->paralyzed) { + msg_print(_("やっと動けるようになった。", "You can move again.")); + notice = TRUE; + } + } + + creature_ptr->paralyzed = v; + creature_ptr->redraw |= (PR_STATUS); + + if (!notice) + return FALSE; + + if (disturb_state) + disturb(creature_ptr, FALSE, FALSE); + creature_ptr->redraw |= (PR_STATE); + handle_stuff(creature_ptr); + return TRUE; +} + +/*! + * @brief 幻覚の継続時間をセットする / Set "image", notice observable changes + * @param v 継続時間 + * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 + * @details Note that we must redraw the map when hallucination changes. + */ +bool set_image(player_type *creature_ptr, TIME_EFFECT v) +{ + bool notice = FALSE; + v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; + + if (creature_ptr->is_dead) + return FALSE; + if (creature_ptr->pseikaku == PERSONALITY_CHARGEMAN) + v = 0; + + if (v) { + set_tsuyoshi(creature_ptr, 0, TRUE); + if (!creature_ptr->image) { + msg_print(_("ワーオ!何もかも虹色に見える!", "Oh, wow! Everything looks so cosmic now!")); + + /* Sniper */ + if (creature_ptr->concent) + reset_concentration(creature_ptr, TRUE); + + creature_ptr->counter = FALSE; + notice = TRUE; + } + } else { + if (creature_ptr->image) { + msg_print(_("やっとはっきりと物が見えるようになった。", "You can see clearly again.")); + notice = TRUE; + } + } + + creature_ptr->image = v; + creature_ptr->redraw |= (PR_STATUS); + + if (!notice) + return FALSE; + + if (disturb_state) + disturb(creature_ptr, FALSE, TRUE); + + creature_ptr->redraw |= (PR_MAP | PR_HEALTH | PR_UHEALTH); + creature_ptr->update |= (PU_MONSTERS); + creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON); + handle_stuff(creature_ptr); + return TRUE; +} + +/*! + * @brief 減速の継続時間をセットする / Set "slow", notice observable changes + * @param v 継続時間 + * @param do_dec 現在の継続時間より長い値のみ上書きする + * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 + */ +bool set_slow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec) +{ + bool notice = FALSE; + v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; + + if (creature_ptr->is_dead) + return FALSE; + + if (v) { + if (creature_ptr->slow && !do_dec) { + if (creature_ptr->slow > v) + return FALSE; + } else if (!creature_ptr->slow) { + msg_print(_("体の動きが遅くなってしまった!", "You feel yourself moving slower!")); + notice = TRUE; + } + } else { + if (creature_ptr->slow) { + msg_print(_("動きの遅さがなくなったようだ。", "You feel yourself speed up.")); + notice = TRUE; + } + } + + creature_ptr->slow = v; + if (!notice) + return FALSE; + + if (disturb_state) + disturb(creature_ptr, FALSE, FALSE); + creature_ptr->update |= (PU_BONUS); + handle_stuff(creature_ptr); + return TRUE; +} diff --git a/src/player/bad-status-setter.h b/src/player/bad-status-setter.h new file mode 100644 index 000000000..650066aa4 --- /dev/null +++ b/src/player/bad-status-setter.h @@ -0,0 +1,11 @@ +#pragma once + +#include "system/angband.h" + +bool set_blind(player_type *creature_ptr, TIME_EFFECT v); +bool set_confused(player_type *creature_ptr, TIME_EFFECT v); +bool set_poisoned(player_type *creature_ptr, TIME_EFFECT v); +bool set_afraid(player_type *creature_ptr, TIME_EFFECT v); +bool set_paralyzed(player_type *creature_ptr, TIME_EFFECT v); +bool set_image(player_type *creature_ptr, TIME_EFFECT v); +bool set_slow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); diff --git a/src/player/digestion-processor.c b/src/player/digestion-processor.c index ae0b3de81..d5d6cca06 100644 --- a/src/player/digestion-processor.c +++ b/src/player/digestion-processor.c @@ -2,6 +2,7 @@ #include "core/speed-table.h" #include "object-enchant/trc-types.h" #include "player/player-damage.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "player/player-move.h" #include "player/special-defense-types.h" diff --git a/src/player/eldritch-horror.c b/src/player/eldritch-horror.c index a50450045..9491f2da1 100644 --- a/src/player/eldritch-horror.c +++ b/src/player/eldritch-horror.c @@ -19,6 +19,7 @@ #include "monster/monster-list.h" #include "monster/monster-util.h" #include "monster/smart-learn-types.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "player/player-status.h" #include "player/mimic-info-table.h" diff --git a/src/player/player-effects.c b/src/player/player-effects.c index 0c54d58d4..c854ac861 100644 --- a/src/player/player-effects.c +++ b/src/player/player-effects.c @@ -47,6 +47,7 @@ #include "object/object-value.h" #include "perception/object-perception.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-damage.h" #include "player/player-move.h" @@ -363,316 +364,6 @@ bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, MIMIC_RACE_IDX p, bool } /*! - * @brief 盲目の継続時間をセットする / Set "blind", notice observable changes - * @param v 継続時間 - * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 - * @details - * Note the use of "PU_UN_LITE" and "PU_UN_VIEW", which is needed to\n - * memorize any terrain features which suddenly become "visible".\n - * Note that blindness is currently the only thing which can affect\n - * "player_can_see_bold()".\n - */ -bool set_blind(player_type *creature_ptr, TIME_EFFECT v) -{ - bool notice = FALSE; - v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; - - if (creature_ptr->is_dead) - return FALSE; - - if (v) { - if (!creature_ptr->blind) { - if (creature_ptr->prace == RACE_ANDROID) { - msg_print(_("センサーをやられた!", "You are blind!")); - } else { - msg_print(_("目が見えなくなってしまった!", "You are blind!")); - } - - notice = TRUE; - chg_virtue(creature_ptr, V_ENLIGHTEN, -1); - } - } - - else { - if (creature_ptr->blind) { - if (creature_ptr->prace == RACE_ANDROID) { - msg_print(_("センサーが復旧した。", "You can see again.")); - } else { - msg_print(_("やっと目が見えるようになった。", "You can see again.")); - } - - notice = TRUE; - } - } - - creature_ptr->blind = v; - creature_ptr->redraw |= (PR_STATUS); - if (!notice) - return FALSE; - if (disturb_state) - disturb(creature_ptr, FALSE, FALSE); - - creature_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE); - creature_ptr->redraw |= (PR_MAP); - creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON); - handle_stuff(creature_ptr); - return TRUE; -} - -/*! - * @brief 混乱の継続時間をセットする / Set "confused", notice observable changes - * @param v 継続時間 - * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 - */ -bool set_confused(player_type *creature_ptr, TIME_EFFECT v) -{ - bool notice = FALSE; - v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; - - if (creature_ptr->is_dead) - return FALSE; - - if (v) { - if (!creature_ptr->confused) { - msg_print(_("あなたは混乱した!", "You are confused!")); - - if (creature_ptr->action == ACTION_LEARN) { - msg_print(_("学習が続けられない!", "You cannot continue learning!")); - creature_ptr->new_mane = FALSE; - - creature_ptr->redraw |= (PR_STATE); - creature_ptr->action = ACTION_NONE; - } - if (creature_ptr->action == ACTION_KAMAE) { - msg_print(_("構えがとけた。", "You lose your stance.")); - creature_ptr->special_defense &= ~(KAMAE_MASK); - creature_ptr->update |= (PU_BONUS); - creature_ptr->redraw |= (PR_STATE); - creature_ptr->action = ACTION_NONE; - } else if (creature_ptr->action == ACTION_KATA) { - msg_print(_("型が崩れた。", "You lose your stance.")); - 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 (creature_ptr->concent) - reset_concentration(creature_ptr, TRUE); - - if (hex_spelling_any(creature_ptr)) - stop_hex_spell_all(creature_ptr); - - notice = TRUE; - creature_ptr->counter = FALSE; - chg_virtue(creature_ptr, V_HARMONY, -1); - } - } else { - if (creature_ptr->confused) { - msg_print(_("やっと混乱がおさまった。", "You feel less confused now.")); - creature_ptr->special_attack &= ~(ATTACK_SUIKEN); - notice = TRUE; - } - } - - creature_ptr->confused = v; - creature_ptr->redraw |= (PR_STATUS); - - if (!notice) - return FALSE; - - if (disturb_state) - disturb(creature_ptr, FALSE, FALSE); - handle_stuff(creature_ptr); - return TRUE; -} - -/*! - * @brief 毒の継続時間をセットする / Set "poisoned", notice observable changes - * @param v 継続時間 - * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 - */ -bool set_poisoned(player_type *creature_ptr, TIME_EFFECT v) -{ - bool notice = FALSE; - v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; - - if (creature_ptr->is_dead) - return FALSE; - - if (v) { - if (!creature_ptr->poisoned) { - msg_print(_("毒に侵されてしまった!", "You are poisoned!")); - notice = TRUE; - } - } else { - if (creature_ptr->poisoned) { - msg_print(_("やっと毒の痛みがなくなった。", "You are no longer poisoned.")); - notice = TRUE; - } - } - - creature_ptr->poisoned = v; - creature_ptr->redraw |= (PR_STATUS); - - if (!notice) - return FALSE; - - if (disturb_state) - disturb(creature_ptr, FALSE, FALSE); - handle_stuff(creature_ptr); - return TRUE; -} - -/*! - * @brief 恐怖の継続時間をセットする / Set "afraid", notice observable changes - * @param v 継続時間 - * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 - */ -bool set_afraid(player_type *creature_ptr, TIME_EFFECT v) -{ - bool notice = FALSE; - v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; - - if (creature_ptr->is_dead) - return FALSE; - - if (v) { - if (!creature_ptr->afraid) { - msg_print(_("何もかも恐くなってきた!", "You are terrified!")); - - if (creature_ptr->special_defense & KATA_MASK) { - msg_print(_("型が崩れた。", "You lose your stance.")); - 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; - } - - notice = TRUE; - creature_ptr->counter = FALSE; - chg_virtue(creature_ptr, V_VALOUR, -1); - } - } else { - if (creature_ptr->afraid) { - msg_print(_("やっと恐怖を振り払った。", "You feel bolder now.")); - notice = TRUE; - } - } - - creature_ptr->afraid = v; - creature_ptr->redraw |= (PR_STATUS); - - if (!notice) - return FALSE; - - if (disturb_state) - disturb(creature_ptr, FALSE, FALSE); - handle_stuff(creature_ptr); - return TRUE; -} - -/*! - * @brief 麻痺の継続時間をセットする / Set "paralyzed", notice observable changes - * @param v 継続時間 - * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 - */ -bool set_paralyzed(player_type *creature_ptr, TIME_EFFECT v) -{ - bool notice = FALSE; - v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; - - if (creature_ptr->is_dead) - return FALSE; - - if (v) { - if (!creature_ptr->paralyzed) { - msg_print(_("体が麻痺してしまった!", "You are paralyzed!")); - if (creature_ptr->concent) - reset_concentration(creature_ptr, TRUE); - if (hex_spelling_any(creature_ptr)) - stop_hex_spell_all(creature_ptr); - - creature_ptr->counter = FALSE; - notice = TRUE; - } - } else { - if (creature_ptr->paralyzed) { - msg_print(_("やっと動けるようになった。", "You can move again.")); - notice = TRUE; - } - } - - creature_ptr->paralyzed = v; - creature_ptr->redraw |= (PR_STATUS); - - if (!notice) - return FALSE; - - if (disturb_state) - disturb(creature_ptr, FALSE, FALSE); - creature_ptr->redraw |= (PR_STATE); - handle_stuff(creature_ptr); - return TRUE; -} - -/*! - * @brief 幻覚の継続時間をセットする / Set "image", notice observable changes - * @param v 継続時間 - * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 - * @details Note that we must redraw the map when hallucination changes. - */ -bool set_image(player_type *creature_ptr, TIME_EFFECT v) -{ - bool notice = FALSE; - v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; - - if (creature_ptr->is_dead) - return FALSE; - if (creature_ptr->pseikaku == PERSONALITY_CHARGEMAN) - v = 0; - - if (v) { - set_tsuyoshi(creature_ptr, 0, TRUE); - if (!creature_ptr->image) { - msg_print(_("ワーオ!何もかも虹色に見える!", "Oh, wow! Everything looks so cosmic now!")); - - /* Sniper */ - if (creature_ptr->concent) - reset_concentration(creature_ptr, TRUE); - - creature_ptr->counter = FALSE; - notice = TRUE; - } - } else { - if (creature_ptr->image) { - msg_print(_("やっとはっきりと物が見えるようになった。", "You can see clearly again.")); - notice = TRUE; - } - } - - creature_ptr->image = v; - creature_ptr->redraw |= (PR_STATUS); - - if (!notice) - return FALSE; - - if (disturb_state) - disturb(creature_ptr, FALSE, TRUE); - - creature_ptr->redraw |= (PR_MAP | PR_HEALTH | PR_UHEALTH); - creature_ptr->update |= (PU_MONSTERS); - creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON); - handle_stuff(creature_ptr); - return TRUE; -} - -/*! * @brief 加速の継続時間をセットする / Set "fast", notice observable changes * @param v 継続時間 * @param do_dec 現在の継続時間より長い値のみ上書きする @@ -761,46 +452,6 @@ bool set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec) } /*! - * @brief 減速の継続時間をセットする / Set "slow", notice observable changes - * @param v 継続時間 - * @param do_dec 現在の継続時間より長い値のみ上書きする - * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 - */ -bool set_slow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec) -{ - bool notice = FALSE; - v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; - - if (creature_ptr->is_dead) - return FALSE; - - if (v) { - if (creature_ptr->slow && !do_dec) { - if (creature_ptr->slow > v) - return FALSE; - } else if (!creature_ptr->slow) { - msg_print(_("体の動きが遅くなってしまった!", "You feel yourself moving slower!")); - notice = TRUE; - } - } else { - if (creature_ptr->slow) { - msg_print(_("動きの遅さがなくなったようだ。", "You feel yourself speed up.")); - notice = TRUE; - } - } - - creature_ptr->slow = v; - if (!notice) - return FALSE; - - if (disturb_state) - disturb(creature_ptr, FALSE, FALSE); - creature_ptr->update |= (PU_BONUS); - handle_stuff(creature_ptr); - return TRUE; -} - -/*! * @brief 肌石化の継続時間をセットする / Set "shield", notice observable changes * @param v 継続時間 * @param do_dec 現在の継続時間より長い値のみ上書きする diff --git a/src/player/player-effects.h b/src/player/player-effects.h index a1ed0a29e..8cc1d1a6c 100644 --- a/src/player/player-effects.h +++ b/src/player/player-effects.h @@ -6,14 +6,7 @@ void set_action(player_type *creature_ptr, ACTION_IDX typ); void reset_tim_flags(player_type *creature_ptr); void dispel_player(player_type *creature_ptr); bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, MIMIC_RACE_IDX p, bool do_dec); -bool set_blind(player_type *creature_ptr, TIME_EFFECT v); -bool set_confused(player_type *creature_ptr, TIME_EFFECT v); -bool set_poisoned(player_type *creature_ptr, TIME_EFFECT v); -bool set_afraid(player_type *creature_ptr, TIME_EFFECT v); -bool set_paralyzed(player_type *creature_ptr, TIME_EFFECT v); -bool set_image(player_type *creature_ptr, TIME_EFFECT v); bool set_fast(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -bool set_slow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); bool set_shield(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); bool set_tsubureru(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); bool set_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); diff --git a/src/realm/realm-arcane.c b/src/realm/realm-arcane.c index 244ae0813..4c8621f6b 100644 --- a/src/realm/realm-arcane.c +++ b/src/realm/realm-arcane.c @@ -5,6 +5,7 @@ #include "monster-floor/monster-summon.h" #include "monster-floor/place-monster-types.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "player/player-status.h" #include "spell-kind/spells-beam.h" diff --git a/src/realm/realm-crusade.c b/src/realm/realm-crusade.c index fec2886b0..8d0d3c025 100644 --- a/src/realm/realm-crusade.c +++ b/src/realm/realm-crusade.c @@ -5,6 +5,7 @@ #include "io/targeting.h" #include "monster-floor/monster-summon.h" #include "monster-floor/place-monster-types.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-effects.h" #include "spell/process-effect.h" diff --git a/src/realm/realm-daemon.c b/src/realm/realm-daemon.c index 86932b1f2..6a4537fde 100644 --- a/src/realm/realm-daemon.c +++ b/src/realm/realm-daemon.c @@ -3,6 +3,7 @@ #include "io/targeting.h" #include "monster-floor/monster-summon.h" #include "monster-floor/place-monster-types.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-damage.h" #include "player/player-effects.h" diff --git a/src/realm/realm-life.c b/src/realm/realm-life.c index a74201d7c..af73a72df 100644 --- a/src/realm/realm-life.c +++ b/src/realm/realm-life.c @@ -2,6 +2,7 @@ #include "cmd-action/cmd-spell.h" #include "floor/floor.h" #include "io/targeting.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "player/player-status.h" #include "spell-kind/spells-detection.h" diff --git a/src/realm/realm-nature.c b/src/realm/realm-nature.c index 933a53ac4..eeb3be180 100644 --- a/src/realm/realm-nature.c +++ b/src/realm/realm-nature.c @@ -9,6 +9,7 @@ #include "object/object-generator.h" #include "object/object-kind-hook.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "player/player-race-types.h" diff --git a/src/realm/realm-song.c b/src/realm/realm-song.c index 9a3e95a00..c0892a0a5 100644 --- a/src/realm/realm-song.c +++ b/src/realm/realm-song.c @@ -1,6 +1,7 @@ #include "cmd-action/cmd-spell.h" #include "effect/effect-characteristics.h" #include "io/targeting.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-effects.h" #include "realm/realm-song-numbers.h" diff --git a/src/specific-object/chest.c b/src/specific-object/chest.c index d37c68c28..24e04e876 100644 --- a/src/specific-object/chest.c +++ b/src/specific-object/chest.c @@ -10,6 +10,7 @@ #include "object-enchant/item-apply-magic.h" #include "object/object-generator.h" #include "perception/object-perception.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-damage.h" #include "player/player-effects.h" diff --git a/src/spell-kind/spells-floor.c b/src/spell-kind/spells-floor.c index 3c968265e..83837cc28 100644 --- a/src/spell-kind/spells-floor.c +++ b/src/spell-kind/spells-floor.c @@ -34,6 +34,7 @@ #include "object/object-hook.h" #include "object/object-mark-types.h" #include "perception/object-perception.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "player/special-defense-types.h" #include "spell-kind/spells-teleport.h" diff --git a/src/spell-kind/spells-random.c b/src/spell-kind/spells-random.c index eb33ef9a6..0de2bbca0 100644 --- a/src/spell-kind/spells-random.c +++ b/src/spell-kind/spells-random.c @@ -14,6 +14,7 @@ #include "monster-floor/place-monster-types.h" #include "mutation/mutation.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "spell-kind/earthquake.h" diff --git a/src/spell/spells-object.c b/src/spell/spells-object.c index 0ad1f341c..8017409f5 100644 --- a/src/spell/spells-object.c +++ b/src/spell/spells-object.c @@ -38,6 +38,7 @@ #include "object/object-kind.h" #include "perception/object-perception.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-damage.h" #include "player/player-effects.h" diff --git a/src/spell/spells-staff-only.c b/src/spell/spells-staff-only.c index badb33d4f..198562346 100644 --- a/src/spell/spells-staff-only.c +++ b/src/spell/spells-staff-only.c @@ -1,5 +1,6 @@ #include "spell/spells-staff-only.h" #include "effect/effect-characteristics.h" +#include "player/bad-status-setter.h" #include "player/player-damage.h" #include "player/player-effects.h" #include "spell/process-effect.h" diff --git a/src/spell/spells-status.c b/src/spell/spells-status.c index 74528891d..9ada258ab 100644 --- a/src/spell/spells-status.c +++ b/src/spell/spells-status.c @@ -21,6 +21,7 @@ #include "object/object-kind-hook.h" #include "object/object-kind.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-effects.h" #include "player/player-status.h" diff --git a/src/spell/spells-summon.c b/src/spell/spells-summon.c index 95eb37790..17f67be58 100644 --- a/src/spell/spells-summon.c +++ b/src/spell/spells-summon.c @@ -14,6 +14,7 @@ #include "object/item-use-flags.h" #include "object/object-hook.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-effects.h" #include "spell/spells-diceroll.h" #include "spell-kind/earthquake.h" diff --git a/src/spell/spells3.c b/src/spell/spells3.c index 1410bacb3..483173236 100644 --- a/src/spell/spells3.c +++ b/src/spell/spells3.c @@ -77,6 +77,7 @@ #include "perception/identification.h" #include "perception/object-perception.h" #include "player/avatar.h" +#include "player/bad-status-setter.h" #include "player/player-class.h" #include "player/player-damage.h" #include "player/player-effects.h" -- 2.11.0