<ClCompile Include="..\..\src\object-hook\hook-weapon.c" />\r
<ClCompile Include="..\..\src\object-hook\hook-armor.c" />\r
<ClCompile Include="..\..\src\player\bad-status-setter.c" />\r
+ <ClCompile Include="..\..\src\player\buff-setter.c" />\r
<ClCompile Include="..\..\src\player\player-realm.c" />\r
<ClCompile Include="..\..\src\spell-kind\spells-curse-removal.c" />\r
<ClCompile Include="..\..\src\spell-kind\spells-perception.c" />\r
<ClInclude Include="..\..\src\object-hook\hook-quest.h" />\r
<ClInclude Include="..\..\src\object-hook\hook-weapon.h" />\r
<ClInclude Include="..\..\src\player\bad-status-setter.h" />\r
+ <ClInclude Include="..\..\src\player\buff-setter.h" />\r
<ClInclude Include="..\..\src\player\player-realm.h" />\r
<ClInclude Include="..\..\src\player\special-defense-types.h" />\r
<ClInclude Include="..\..\src\spell-kind\spells-curse-removal.h" />\r
<ClCompile Include="..\..\src\player\player-realm.c">
<Filter>player</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\player\buff-setter.c">
+ <Filter>player</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\player\player-realm.h">
<Filter>player</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\player\buff-setter.h">
+ <Filter>player</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
\
player/avatar.h player/avatar.c \
player/bad-status-setter.c player/bad-status-setter.h \
+ player/buff-setter.c player/buff-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 "mspell/monster-power-table.h"
#include "mspell/mspell-type.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-effects.h"
#include "player/player-status.h"
#include "spell-kind/spells-launcher.h"
#include "monster/smart-learn-types.h"
#include "player/avatar.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "player/player-race-types.h"
#include "player/bad-status-setter.h"
#include "player/eldritch-horror.h"
#include "player/mimic-info-table.h"
+#include "player/buff-setter.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "perception/object-perception.h"
#include "player/avatar.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "perception/object-perception.h"
#include "player/avatar.h"
#include "player/bad-status-setter.h"
+#include "player/buff-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/buff-setter.h"
#include "player/player-class.h"
#include "player/player-effects.h"
#include "player/player-status.h"
#include "game-option/birth-options.h"
#include "mind/racial-kutar.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-effects.h"
/*!
#include "game-option/birth-options.h"
#include "monster-race/race-indice-types.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/eldritch-horror.h"
#include "player/player-effects.h"
#include "view/display-messages.h"
#include "monster-floor/place-monster-types.h"
#include "player/avatar.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "mutation/mutation.h"
#include "object/item-tester-hooker.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "mspell/mspell-type.h"
#include "player/avatar.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-effects.h"
#include "player/player-status.h"
#include "realm/realm-types.h"
#include "object-hook/hook-enchant.h"
#include "object/lite-processor.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "player/player-move.h"
--- /dev/null
+#include "player/buff-setter.h"
+#include "core/stuff-handler.h"
+#include "game-option/disturbance-options.h"
+#include "player/avatar.h"
+#include "player/player-move.h"
+#include "realm/realm-song-numbers.h"
+#include "view/display-messages.h"
+
+/*!
+ * @brief 加速の継続時間をセットする / Set "fast", notice observable changes
+ * @param v 継続時間
+ * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_fast(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->fast && !do_dec) {
+ if (creature_ptr->fast > v)
+ return FALSE;
+ } else if (!is_fast(creature_ptr) && !creature_ptr->lightspeed) {
+ msg_print(_("素早く動けるようになった!", "You feel yourself moving much faster!"));
+ notice = TRUE;
+ chg_virtue(creature_ptr, V_PATIENCE, -1);
+ chg_virtue(creature_ptr, V_DILIGENCE, 1);
+ }
+ } else {
+ if (creature_ptr->fast && !creature_ptr->lightspeed && !music_singing(creature_ptr, MUSIC_SPEED) && !music_singing(creature_ptr, MUSIC_SHERO)) {
+ msg_print(_("動きの素早さがなくなったようだ。", "You feel yourself slow down."));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->fast = 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 現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_shield(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->shield && !do_dec) {
+ if (creature_ptr->shield > v)
+ return FALSE;
+ } else if (!creature_ptr->shield) {
+ msg_print(_("肌が石になった。", "Your skin turns to stone."));
+ notice = TRUE;
+ }
+ } else {
+ if (creature_ptr->shield) {
+ msg_print(_("肌が元に戻った。", "Your skin returns to normal."));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->shield = v;
+ creature_ptr->redraw |= (PR_STATUS);
+
+ 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 "magicdef", notice observable changes
+ * @param v 継続時間
+ * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_magicdef(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->magicdef && !do_dec) {
+ if (creature_ptr->magicdef > v)
+ return FALSE;
+ } else if (!creature_ptr->magicdef) {
+ msg_print(_("魔法の防御力が増したような気がする。", "You feel more resistant to magic."));
+ notice = TRUE;
+ }
+ } else {
+ if (creature_ptr->magicdef) {
+ msg_print(_("魔法の防御力が元に戻った。", "You feel less resistant to magic."));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->magicdef = v;
+ creature_ptr->redraw |= (PR_STATUS);
+
+ 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 "blessed", notice observable changes
+ * @param v 継続時間
+ * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_blessed(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->blessed && !do_dec) {
+ if (creature_ptr->blessed > v)
+ return FALSE;
+ } else if (!is_blessed(creature_ptr)) {
+ msg_print(_("高潔な気分になった!", "You feel righteous!"));
+ notice = TRUE;
+ }
+ } else {
+ if (creature_ptr->blessed && !music_singing(creature_ptr, MUSIC_BLESS)) {
+ msg_print(_("高潔な気分が消え失せた。", "The prayer has expired."));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->blessed = v;
+ creature_ptr->redraw |= (PR_STATUS);
+
+ 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 "hero", notice observable changes
+ * @param v 継続時間
+ * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_hero(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->hero && !do_dec) {
+ if (creature_ptr->hero > v)
+ return FALSE;
+ } else if (!is_hero(creature_ptr)) {
+ msg_print(_("ヒーローになった気がする!", "You feel like a hero!"));
+ notice = TRUE;
+ }
+ } else {
+ if (creature_ptr->hero && !music_singing(creature_ptr, MUSIC_HERO) && !music_singing(creature_ptr, MUSIC_SHERO)) {
+ msg_print(_("ヒーローの気分が消え失せた。", "The heroism wears off."));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->hero = v;
+ creature_ptr->redraw |= (PR_STATUS);
+
+ if (!notice)
+ return FALSE;
+
+ if (disturb_state)
+ disturb(creature_ptr, FALSE, FALSE);
+ creature_ptr->update |= (PU_BONUS);
+ creature_ptr->update |= (PU_HP);
+ handle_stuff(creature_ptr);
+ return TRUE;
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+bool set_fast(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_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
+bool set_blessed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
+bool set_hero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
#include "perception/object-perception.h"
#include "player/avatar.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-move.h"
}
/*!
- * @brief 加速の継続時間をセットする / Set "fast", notice observable changes
- * @param v 継続時間
- * @param do_dec 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_fast(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->fast && !do_dec) {
- if (creature_ptr->fast > v)
- return FALSE;
- } else if (!is_fast(creature_ptr) && !creature_ptr->lightspeed) {
- msg_print(_("素早く動けるようになった!", "You feel yourself moving much faster!"));
- notice = TRUE;
- chg_virtue(creature_ptr, V_PATIENCE, -1);
- chg_virtue(creature_ptr, V_DILIGENCE, 1);
- }
- } else {
- if (creature_ptr->fast && !creature_ptr->lightspeed && !music_singing(creature_ptr, MUSIC_SPEED) && !music_singing(creature_ptr, MUSIC_SHERO)) {
- msg_print(_("動きの素早さがなくなったようだ。", "You feel yourself slow down."));
- notice = TRUE;
- }
- }
-
- creature_ptr->fast = 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 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_shield(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->shield && !do_dec) {
- if (creature_ptr->shield > v)
- return FALSE;
- } else if (!creature_ptr->shield) {
- msg_print(_("肌が石になった。", "Your skin turns to stone."));
- notice = TRUE;
- }
- } else {
- if (creature_ptr->shield) {
- msg_print(_("肌が元に戻った。", "Your skin returns to normal."));
- notice = TRUE;
- }
- }
-
- creature_ptr->shield = v;
- creature_ptr->redraw |= (PR_STATUS);
-
- 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 "magicdef", notice observable changes
- * @param v 継続時間
- * @param do_dec 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_magicdef(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->magicdef && !do_dec) {
- if (creature_ptr->magicdef > v)
- return FALSE;
- } else if (!creature_ptr->magicdef) {
- msg_print(_("魔法の防御力が増したような気がする。", "You feel more resistant to magic."));
- notice = TRUE;
- }
- } else {
- if (creature_ptr->magicdef) {
- msg_print(_("魔法の防御力が元に戻った。", "You feel less resistant to magic."));
- notice = TRUE;
- }
- }
-
- creature_ptr->magicdef = v;
- creature_ptr->redraw |= (PR_STATUS);
-
- 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 "blessed", notice observable changes
- * @param v 継続時間
- * @param do_dec 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_blessed(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->blessed && !do_dec) {
- if (creature_ptr->blessed > v)
- return FALSE;
- } else if (!is_blessed(creature_ptr)) {
- msg_print(_("高潔な気分になった!", "You feel righteous!"));
- notice = TRUE;
- }
- } else {
- if (creature_ptr->blessed && !music_singing(creature_ptr, MUSIC_BLESS)) {
- msg_print(_("高潔な気分が消え失せた。", "The prayer has expired."));
- notice = TRUE;
- }
- }
-
- creature_ptr->blessed = v;
- creature_ptr->redraw |= (PR_STATUS);
-
- 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 "hero", notice observable changes
- * @param v 継続時間
- * @param do_dec 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_hero(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->hero && !do_dec) {
- if (creature_ptr->hero > v)
- return FALSE;
- } else if (!is_hero(creature_ptr)) {
- msg_print(_("ヒーローになった気がする!", "You feel like a hero!"));
- notice = TRUE;
- }
- } else {
- if (creature_ptr->hero && !music_singing(creature_ptr, MUSIC_HERO) && !music_singing(creature_ptr, MUSIC_SHERO)) {
- msg_print(_("ヒーローの気分が消え失せた。", "The heroism wears off."));
- notice = TRUE;
- }
- }
-
- creature_ptr->hero = v;
- creature_ptr->redraw |= (PR_STATUS);
-
- if (!notice)
- return FALSE;
-
- if (disturb_state)
- disturb(creature_ptr, FALSE, FALSE);
- creature_ptr->update |= (PU_BONUS);
- creature_ptr->update |= (PU_HP);
- handle_stuff(creature_ptr);
- return TRUE;
-}
-
-/*!
* @brief 狂戦士化の継続時間をセットする / Set "shero", notice observable changes
* @param v 継続時間/ 0ならば無条件にリセット
* @param do_dec FALSEの場合現在の継続時間より長い値のみ上書きする
void set_action(player_type *creature_ptr, ACTION_IDX typ);
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_fast(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_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-bool set_blessed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-bool set_hero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_shero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_protevil(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_invuln(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
#include "monster-floor/monster-summon.h"
#include "monster-floor/place-monster-types.h"
#include "mutation/mutation.h"
+#include "player/buff-setter.h"
#include "player/player-effects.h"
#include "player/player-status.h"
#include "player/selfinfo.h"
#include "monster-floor/monster-summon.h"
#include "monster-floor/place-monster-types.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-class.h"
#include "player/player-effects.h"
#include "spell-kind/spells-beam.h"
#include "effect/effect-characteristics.h"
#include "io/targeting.h"
#include "player/avatar.h"
+#include "player/buff-setter.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "monster-floor/monster-summon.h"
#include "monster-floor/place-monster-types.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-class.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "floor/floor.h"
#include "io/targeting.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-effects.h"
#include "player/player-status.h"
#include "spell-kind/spells-curse-removal.h"
#include "object/object-kind-hook.h"
#include "player/avatar.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-damage.h"
#include "player/player-effects.h"
#include "player/player-race-types.h"
#include "core/asking-player.h"
#include "io/targeting.h"
#include "player/avatar.h"
+#include "player/buff-setter.h"
#include "player/player-effects.h"
#include "player/selfinfo.h"
#include "spell-kind/spells-charm.h"
#include "monster-floor/place-monster-types.h"
#include "mutation/mutation.h"
#include "player/avatar.h"
+#include "player/buff-setter.h"
#include "player/player-effects.h"
#include "spell-kind/earthquake.h"
#include "spell-kind/spells-charm.h"
#include "object/object-kind.h"
#include "player/avatar.h"
#include "player/bad-status-setter.h"
+#include "player/buff-setter.h"
#include "player/player-class.h"
#include "player/player-effects.h"
#include "player/player-status.h"