<ClCompile Include="..\..\src\spell\spell-info.c" />\r
<ClCompile Include="..\..\src\status\element-resistance.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
<ClCompile Include="..\..\src\view\display-sub-windows.c" />\r
<ClCompile Include="..\..\src\view\main-window-left-frame.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\temporary-resistance.h" />\r
<ClInclude Include="..\..\src\system\alloc-entries.h" />\r
<ClInclude Include="..\..\src\term\screen-processor.h" />\r
<ClInclude Include="..\..\src\util\bit-flags-calculator.h" />\r
<ClCompile Include="..\..\src\status\element-resistance.c">
<Filter>status</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\status\temporary-resistance.c">
+ <Filter>status</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\status\element-resistance.h">
<Filter>status</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\status\temporary-resistance.h">
+ <Filter>status</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
status/buff-setter.c status/buff-setter.h \
status/element-resistance.c status/element-resistance.h \
status/sight-setter.c status/sight-setter.h \
+ status/temporary-resistance.c status/temporary-resistance.h \
\
store/store.c store/store.h \
store/black-market.c store/black-market.h \
#include "status/buff-setter.h"
#include "status/element-resistance.h"
#include "status/sight-setter.h"
+#include "status/temporary-resistance.h"
#include "sv-definition/sv-lite-types.h"
#include "sv-definition/sv-ring-types.h"
#include "term/screen-processor.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
#include "status/sight-setter.h"
+#include "status/temporary-resistance.h"
/*!
* @brief 10ゲームターンが進行するごとに魔法効果の残りターンを減らしていく処理
#include "status/buff-setter.h"
#include "status/element-resistance.h"
#include "status/sight-setter.h"
+#include "status/temporary-resistance.h"
#include "term/screen-processor.h"
#include "util/buffer-shaper.h"
#include "util/int-char-converter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
#include "status/sight-setter.h"
+#include "status/temporary-resistance.h"
#include "sv-definition/sv-armor-types.h"
#include "sv-definition/sv-protector-types.h"
#include "sv-definition/sv-weapon-types.h"
}
/*!
- * @brief 一時的浮遊の継続時間をセットする / Set "tim_levitation", notice observable changes
- * @param v 継続時間
- * @param do_dec 現在の継続時間より長い値のみ上書きする
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_tim_levitation(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->tim_levitation && !do_dec) {
- if (creature_ptr->tim_levitation > v)
- return FALSE;
- } else if (!creature_ptr->tim_levitation) {
- msg_print(_("体が宙に浮き始めた。", "You begin to fly!"));
- notice = TRUE;
- }
- } else {
- if (creature_ptr->tim_levitation) {
- msg_print(_("もう宙に浮かべなくなった。", "You stop flying."));
- notice = TRUE;
- }
- }
-
- creature_ptr->tim_levitation = 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 "tim_sh_touki", notice observable changes
* @param v 継続時間
* @param do_dec 現在の継続時間より長い値のみ上書きする
return TRUE;
}
-bool set_ultimate_res(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->ult_res && !do_dec) {
- if (creature_ptr->ult_res > v)
- return FALSE;
- } else if (!creature_ptr->ult_res) {
- msg_print(_("あらゆることに対して耐性がついた気がする!", "You feel resistant!"));
- notice = TRUE;
- }
- }
-
- else {
- if (creature_ptr->ult_res) {
- msg_print(_("あらゆることに対する耐性が薄れた気がする。", "You feel less resistant"));
- notice = TRUE;
- }
- }
-
- creature_ptr->ult_res = 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;
-}
-
-bool set_tim_res_nether(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->tim_res_nether && !do_dec) {
- if (creature_ptr->tim_res_nether > v)
- return FALSE;
- } else if (!creature_ptr->tim_res_nether) {
- msg_print(_("地獄の力に対して耐性がついた気がする!", "You feel nether resistant!"));
- notice = TRUE;
- }
- }
-
- else {
- if (creature_ptr->tim_res_nether) {
- msg_print(_("地獄の力に対する耐性が薄れた気がする。", "You feel less nether resistant"));
- notice = TRUE;
- }
- }
-
- creature_ptr->tim_res_nether = 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;
-}
-
-bool set_tim_res_time(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->tim_res_time && !do_dec) {
- if (creature_ptr->tim_res_time > v)
- return FALSE;
- } else if (!creature_ptr->tim_res_time) {
- msg_print(_("時間逆転の力に対して耐性がついた気がする!", "You feel time resistant!"));
- notice = TRUE;
- }
- } else {
- if (creature_ptr->tim_res_time) {
- msg_print(_("時間逆転の力に対する耐性が薄れた気がする。", "You feel less time resistant"));
- notice = TRUE;
- }
- }
-
- creature_ptr->tim_res_time = 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;
-}
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_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_tim_sh_touki(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_tim_sh_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
bool set_tim_sh_holy(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
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_ultimate_res(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_res_nether(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-bool set_tim_res_time(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
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 "status/buff-setter.h"
#include "status/element-resistance.h"
#include "status/sight-setter.h"
+#include "status/temporary-resistance.h"
#include "view/display-messages.h"
/*!
#include "status/bad-status-setter.h"
#include "status/buff-setter.h"
#include "status/element-resistance.h"
+#include "status/temporary-resistance.h"
/*!
* @brief 生命領域魔法の各処理を行う
--- /dev/null
+#include "status/temporary-resistance.h"
+#include "core/stuff-handler.h"
+#include "game-option/disturbance-options.h"
+#include "player/player-move.h"
+#include "view/display-messages.h"
+
+/*!
+ * @brief 一時的浮遊の継続時間をセットする / Set "tim_levitation", notice observable changes
+ * @param v 継続時間
+ * @param do_dec 現在の継続時間より長い値のみ上書きする
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_tim_levitation(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->tim_levitation && !do_dec) {
+ if (creature_ptr->tim_levitation > v)
+ return FALSE;
+ } else if (!creature_ptr->tim_levitation) {
+ msg_print(_("体が宙に浮き始めた。", "You begin to fly!"));
+ notice = TRUE;
+ }
+ } else {
+ if (creature_ptr->tim_levitation) {
+ msg_print(_("もう宙に浮かべなくなった。", "You stop flying."));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->tim_levitation = 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;
+}
+
+bool set_ultimate_res(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->ult_res && !do_dec) {
+ if (creature_ptr->ult_res > v)
+ return FALSE;
+ } else if (!creature_ptr->ult_res) {
+ msg_print(_("あらゆることに対して耐性がついた気がする!", "You feel resistant!"));
+ notice = TRUE;
+ }
+ }
+
+ else {
+ if (creature_ptr->ult_res) {
+ msg_print(_("あらゆることに対する耐性が薄れた気がする。", "You feel less resistant"));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->ult_res = 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;
+}
+
+bool set_tim_res_nether(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->tim_res_nether && !do_dec) {
+ if (creature_ptr->tim_res_nether > v)
+ return FALSE;
+ } else if (!creature_ptr->tim_res_nether) {
+ msg_print(_("地獄の力に対して耐性がついた気がする!", "You feel nether resistant!"));
+ notice = TRUE;
+ }
+ }
+
+ else {
+ if (creature_ptr->tim_res_nether) {
+ msg_print(_("地獄の力に対する耐性が薄れた気がする。", "You feel less nether resistant"));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->tim_res_nether = 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;
+}
+
+bool set_tim_res_time(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->tim_res_time && !do_dec) {
+ if (creature_ptr->tim_res_time > v)
+ return FALSE;
+ } else if (!creature_ptr->tim_res_time) {
+ msg_print(_("時間逆転の力に対して耐性がついた気がする!", "You feel time resistant!"));
+ notice = TRUE;
+ }
+ } else {
+ if (creature_ptr->tim_res_time) {
+ msg_print(_("時間逆転の力に対する耐性が薄れた気がする。", "You feel less time resistant"));
+ notice = TRUE;
+ }
+ }
+
+ creature_ptr->tim_res_time = 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;
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+bool set_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
+bool set_ultimate_res(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_res_nether(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
+bool set_tim_res_time(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);