<ClCompile Include="..\..\src\io\input-key-requester.c" />\r
<ClCompile Include="..\..\src\locale\vowel-checker.c" />\r
<ClCompile Include="..\..\src\mind\stances-table.c" />\r
+ <ClCompile Include="..\..\src\player\bad-status-setter.c" />\r
<ClCompile Include="..\..\src\view\display-map.c" />\r
<ClCompile Include="..\..\src\view\display-sub-windows.c" />\r
<ClCompile Include="..\..\src\view\main-window-left-frame.c" />\r
<ClInclude Include="..\..\src\mspell\mspells1.h" />\r
<ClInclude Include="..\..\src\mspell\mspells2.h" />\r
<ClInclude Include="..\..\src\mspell\mspells3.h" />\r
+ <ClInclude Include="..\..\src\player\bad-status-setter.h" />\r
<ClInclude Include="..\..\src\player\special-defense-types.h" />\r
<ClInclude Include="..\..\src\system\alloc-entries.h" />\r
<ClInclude Include="..\..\src\term\screen-processor.h" />\r
<ClCompile Include="..\..\src\mind\stances-table.c">
<Filter>mind</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\player\bad-status-setter.c">
+ <Filter>player</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\player\special-defense-types.h">
<Filter>player</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\player\bad-status-setter.h">
+ <Filter>player</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
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 \
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#include "core/magic-effects-timeout-reducer.h"
#include "game-option/birth-options.h"
+#include "player/bad-status-setter.h"
#include "player/player-effects.h"
/*!
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
--- /dev/null
+#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;
+}
--- /dev/null
+#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);
#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"
#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"
#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"
}
/*!
- * @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 現在の継続時間より長い値のみ上書きする
}
/*!
- * @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 現在の継続時間より長い値のみ上書きする
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);
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"
#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"