<ClCompile Include="..\..\src\spell-realm\spells-chaos.c" />\r
<ClCompile Include="..\..\src\spell\spell-info.c" />\r
<ClCompile Include="..\..\src\status\element-resistance.c" />\r
+ <ClCompile Include="..\..\src\status\form-changer.c" />\r
<ClCompile Include="..\..\src\status\sight-setter.c" />\r
<ClCompile Include="..\..\src\status\temporary-resistance.c" />\r
<ClCompile Include="..\..\src\view\display-map.c" />\r
<ClInclude Include="..\..\src\spell\spell-info.h" />\r
<ClInclude Include="..\..\src\status\element-resistance.h" />\r
<ClInclude Include="..\..\src\status\sight-setter.h" />\r
+ <ClInclude Include="..\..\src\status\form-changer.h" />\r
<ClInclude Include="..\..\src\status\temporary-resistance.h" />\r
<ClInclude Include="..\..\src\system\alloc-entries.h" />\r
<ClInclude Include="..\..\src\term\screen-processor.h" />\r
<ClCompile Include="..\..\src\status\temporary-resistance.c">
<Filter>status</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\status\form-changer.c">
+ <Filter>status</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\status\temporary-resistance.h">
<Filter>status</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\status\form-changer.h">
+ <Filter>status</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
status/bad-status-setter.c status/bad-status-setter.h \
status/buff-setter.c status/buff-setter.h \
status/element-resistance.c status/element-resistance.h \
+ status/form-changer.c status/form-changer.h \
status/sight-setter.c status/sight-setter.h \
status/temporary-resistance.c status/temporary-resistance.h \
\
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/form-changer.h"
#include "status/sight-setter.h"
#include "status/temporary-resistance.h"
#include "sv-definition/sv-lite-types.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/form-changer.h"
#include "status/sight-setter.h"
#include "sv-definition/sv-potion-types.h"
#include "term/screen-processor.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/form-changer.h"
#include "store/rumor.h"
#include "sv-definition/sv-scroll-types.h"
#include "term/screen-processor.h"
#include "spell/spells-staff-only.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
+#include "status/form-changer.h"
#include "sv-definition/sv-staff-types.h"
#include "term/screen-processor.h"
#include "view/display-messages.h"
#include "spell/spell-types.h"
#include "sv-definition/sv-other-types.h"
#include "sv-definition/sv-rod-types.h"
+#include "status/form-changer.h"
#include "term/screen-processor.h"
#include "view/display-messages.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/form-changer.h"
#include "status/sight-setter.h"
#include "status/temporary-resistance.h"
#include "spell/spells3.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
+#include "status/form-changer.h"
#include "status/sight-setter.h"
#include "store/store-owners.h"
#include "store/store-util.h"
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/form-changer.h" // todo 相互依存.
#include "status/sight-setter.h"
#include "status/temporary-resistance.h"
#include "sv-definition/sv-armor-types.h"
}
/*!
- * @brief 変身効果の継続時間と変身先をセットする / Set "tim_mimic", and "mimic_form", notice observable changes
- * @param v 継続時間
- * @param p 変身内容
- * @param do_dec 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, MIMIC_RACE_IDX p, 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->tim_mimic && (creature_ptr->mimic_form == p) && !do_dec) {
- if (creature_ptr->tim_mimic > v)
- return FALSE;
- } else if ((!creature_ptr->tim_mimic) || (creature_ptr->mimic_form != p)) {
- msg_print(_("自分の体が変わってゆくのを感じた。", "You feel that your body changes."));
- creature_ptr->mimic_form = p;
- notice = TRUE;
- }
- }
-
- else {
- if (creature_ptr->tim_mimic) {
- msg_print(_("変身が解けた。", "You are no longer transformed."));
- if (creature_ptr->mimic_form == MIMIC_DEMON)
- set_oppose_fire(creature_ptr, 0, TRUE);
- creature_ptr->mimic_form = 0;
- notice = TRUE;
- p = 0;
- }
- }
-
- creature_ptr->tim_mimic = v;
- if (!notice)
- return FALSE;
-
- if (disturb_state)
- disturb(creature_ptr, FALSE, TRUE);
-
- creature_ptr->redraw |= (PR_BASIC | PR_STATUS);
- creature_ptr->update |= (PU_BONUS | PU_HP);
-
- handle_stuff(creature_ptr);
- return TRUE;
-}
-
-/*!
- * @brief 狂戦士化の継続時間をセットする / Set "shero", notice observable changes
- * @param v 継続時間/ 0ならば無条件にリセット
- * @param do_dec FALSEの場合現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_shero(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 (creature_ptr->pclass == CLASS_BERSERKER)
- v = 1;
- if (v) {
- if (creature_ptr->shero && !do_dec) {
- if (creature_ptr->shero > v)
- return FALSE;
- } else if (!creature_ptr->shero) {
- msg_print(_("殺戮マシーンになった気がする!", "You feel like a killing machine!"));
- notice = TRUE;
- }
- } else {
- if (creature_ptr->shero) {
- msg_print(_("野蛮な気持ちが消え失せた。", "You feel less berserk."));
- notice = TRUE;
- }
- }
-
- creature_ptr->shero = 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 "protevil", notice observable changes
* @param v 継続時間
* @param do_dec 現在の継続時間より長い値のみ上書きする
}
/*!
- * @brief 幽体化の継続時間をセットする / Set "wraith_form", notice observable changes
- * @param v 継続時間
- * @param do_dec 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_wraith_form(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->wraith_form && !do_dec) {
- if (creature_ptr->wraith_form > v)
- return FALSE;
- } else if (!creature_ptr->wraith_form) {
- msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and turn into a wraith-being!"));
- notice = TRUE;
- chg_virtue(creature_ptr, V_UNLIFE, 3);
- chg_virtue(creature_ptr, V_HONOUR, -2);
- chg_virtue(creature_ptr, V_SACRIFICE, -2);
- chg_virtue(creature_ptr, V_VALOUR, -5);
-
- creature_ptr->redraw |= (PR_MAP);
- creature_ptr->update |= (PU_MONSTERS);
-
- creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
- }
- } else {
- if (creature_ptr->wraith_form) {
- msg_print(_("不透明になった感じがする。", "You feel opaque."));
- notice = TRUE;
-
- creature_ptr->redraw |= (PR_MAP);
- creature_ptr->update |= (PU_MONSTERS);
-
- creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
- }
- }
-
- creature_ptr->wraith_form = 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 "invuln", notice observable changes
* @param v 継続時間
* @param do_dec 現在の継続時間より長い値のみ上書きする
}
/*!
- * @brief オクレ兄さんの継続時間をセットする / Set "tsuyoshi", notice observable changes
- * @param v 継続時間
- * @param do_dec 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_tsuyoshi(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->tsuyoshi && !do_dec) {
- if (creature_ptr->tsuyoshi > v)
- return FALSE;
- } else if (!creature_ptr->tsuyoshi) {
- msg_print(_("「オクレ兄さん!」", "Brother OKURE!"));
- notice = TRUE;
- chg_virtue(creature_ptr, V_VITALITY, 2);
- }
- } else {
- if (creature_ptr->tsuyoshi) {
- msg_print(_("肉体が急速にしぼんでいった。", "Your body has quickly shriveled."));
-
- (void)dec_stat(creature_ptr, A_CON, 20, TRUE);
- (void)dec_stat(creature_ptr, A_STR, 20, TRUE);
-
- notice = TRUE;
- chg_virtue(creature_ptr, V_VITALITY, -3);
- }
- }
-
- creature_ptr->tsuyoshi = 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 プレイヤーの基本能力値を増加させる / Increases a stat by one randomized level -RAK-
* @param stat 上昇させるステータスID
* @return 実際に上昇した場合TRUEを返す。
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_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);
bool set_tim_regen(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_resist_magic(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_kabenuke(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tsuyoshi(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool inc_stat(player_type *creature_ptr, int stat);
bool dec_stat(player_type *creature_ptr, int stat, int amount, int permanent);
bool res_stat(player_type *creature_ptr, int stat);
void lose_exp(player_type *creature_ptr, s32b amount);
bool drain_exp(player_type *creature_ptr, s32b drain, s32b slip, int hold_exp_prob);
void do_poly_self(player_type *creature_ptr);
-bool set_wraith_form(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
void do_poly_wounds(player_type *creature_ptr);
void change_race(player_type *creature_ptr, player_race_type new_race, concptr effect_msg);
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
#include "status/buff-setter.h"
+#include "status/form-changer.h"
#include "status/element-resistance.h"
/*!
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/form-changer.h"
#include "status/sight-setter.h"
#include "status/temporary-resistance.h"
#include "view/display-messages.h"
#include "spell-kind/spells-launcher.h"
#include "spell-kind/spells-teleport.h"
#include "spell/spell-types.h"
+#include "status/form-changer.h"
#include "status/sight-setter.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
#include "game-option/disturbance-options.h"
#include "mind/mind-sniper.h"
#include "player/avatar.h"
-#include "player/player-effects.h" // つよし状態、後で依存を消す.
+#include "player/player-effects.h" // todo do_dec_stat()、後で依存を消す.
#include "player/player-move.h"
#include "player/player-race.h"
#include "player/special-defense-types.h"
#include "realm/realm-types.h"
#include "spell-realm/spells-hex.h"
+#include "status/form-changer.h"
#include "view/display-messages.h"
/*!
--- /dev/null
+#include "status/form-changer.h"
+#include "core/stuff-handler.h"
+#include "game-option/disturbance-options.h"
+#include "player/avatar.h"
+#include "player/player-move.h"
+#include "player/player-effects.h" // todo 相互依存.
+#include "player/player-race.h"
+#include "status/element-resistance.h"
+#include "view/display-messages.h"
+
+/*!
+ * @brief 変身効果の継続時間と変身先をセットする / Set "tim_mimic", and "mimic_form", notice observable changes
+ * @param v 継続時間
+ * @param p 変身内容
+ * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, MIMIC_RACE_IDX p, 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->tim_mimic && (creature_ptr->mimic_form == p) && !do_dec) {
+ if (creature_ptr->tim_mimic > v)
+ return FALSE;
+ } else if ((!creature_ptr->tim_mimic) || (creature_ptr->mimic_form != p)) {
+ msg_print(_("自分の体が変わってゆくのを感じた。", "You feel that your body changes."));
+ creature_ptr->mimic_form = p;
+ notice = TRUE;
+ }
+ }
+
+ else {
+ if (creature_ptr->tim_mimic) {
+ msg_print(_("変身が解けた。", "You are no longer transformed."));
+ if (creature_ptr->mimic_form == MIMIC_DEMON)
+ set_oppose_fire(creature_ptr, 0, TRUE);
+ creature_ptr->mimic_form = 0;
+ notice = TRUE;
+ p = 0;
+ }
+ }
+
+ creature_ptr->tim_mimic = v;
+ if (!notice)
+ return FALSE;
+
+ if (disturb_state)
+ disturb(creature_ptr, FALSE, TRUE);
+
+ creature_ptr->redraw |= (PR_BASIC | PR_STATUS);
+ creature_ptr->update |= (PU_BONUS | PU_HP);
+
+ handle_stuff(creature_ptr);
+ return TRUE;
+}
+
+/*!
+ * @brief 狂戦士化の継続時間をセットする / Set "shero", notice observable changes
+ * @param v 継続時間/ 0ならば無条件にリセット
+ * @param do_dec FALSEの場合現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_shero(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 (creature_ptr->pclass == CLASS_BERSERKER)
+ v = 1;
+ if (v) {
+ if (creature_ptr->shero && !do_dec) {
+ if (creature_ptr->shero > v)
+ return FALSE;
+ } else if (!creature_ptr->shero) {
+ msg_print(_("殺戮マシーンになった気がする!", "You feel like a killing machine!"));
+ notice = TRUE;
+ }
+ } else {
+ if (creature_ptr->shero) {
+ msg_print(_("野蛮な気持ちが消え失せた。", "You feel less berserk."));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->shero = 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 "wraith_form", notice observable changes
+ * @param v 継続時間
+ * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_wraith_form(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->wraith_form && !do_dec) {
+ if (creature_ptr->wraith_form > v)
+ return FALSE;
+ } else if (!creature_ptr->wraith_form) {
+ msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and turn into a wraith-being!"));
+ notice = TRUE;
+ chg_virtue(creature_ptr, V_UNLIFE, 3);
+ chg_virtue(creature_ptr, V_HONOUR, -2);
+ chg_virtue(creature_ptr, V_SACRIFICE, -2);
+ chg_virtue(creature_ptr, V_VALOUR, -5);
+
+ creature_ptr->redraw |= (PR_MAP);
+ creature_ptr->update |= (PU_MONSTERS);
+
+ creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+ }
+ } else {
+ if (creature_ptr->wraith_form) {
+ msg_print(_("不透明になった感じがする。", "You feel opaque."));
+ notice = TRUE;
+
+ creature_ptr->redraw |= (PR_MAP);
+ creature_ptr->update |= (PU_MONSTERS);
+
+ creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+ }
+ }
+
+ creature_ptr->wraith_form = 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 "tsuyoshi", notice observable changes
+ * @param v 継続時間
+ * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_tsuyoshi(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->tsuyoshi && !do_dec) {
+ if (creature_ptr->tsuyoshi > v)
+ return FALSE;
+ } else if (!creature_ptr->tsuyoshi) {
+ msg_print(_("「オクレ兄さん!」", "Brother OKURE!"));
+ notice = TRUE;
+ chg_virtue(creature_ptr, V_VITALITY, 2);
+ }
+ } else {
+ if (creature_ptr->tsuyoshi) {
+ msg_print(_("肉体が急速にしぼんでいった。", "Your body has quickly shriveled."));
+
+ (void)dec_stat(creature_ptr, A_CON, 20, TRUE);
+ (void)dec_stat(creature_ptr, A_STR, 20, TRUE);
+
+ notice = TRUE;
+ chg_virtue(creature_ptr, V_VITALITY, -3);
+ }
+ }
+
+ creature_ptr->tsuyoshi = 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_mimic(player_type *creature_ptr, TIME_EFFECT v, MIMIC_RACE_IDX p, bool do_dec);
+bool set_shero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
+bool set_wraith_form(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tsuyoshi(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);