OSDN Git Service

[Refactor] #40466 Moved set_superstealth() from player-effects.c/h to mind-ninja.c/h
authorHourier <hourier@users.sourceforge.jp>
Sun, 28 Jun 2020 12:46:14 +0000 (21:46 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 28 Jun 2020 12:46:14 +0000 (21:46 +0900)
16 files changed:
src/cmd/cmd-basic.c
src/dungeon/dungeon-processor.c
src/effect/effect-feature.c
src/floor/floor-events.c
src/floor/floor-save.c
src/floor/floor.c
src/mind/mind-ninja.c
src/mind/mind-ninja.h
src/monster/monster-status.c
src/player/player-effects.c
src/player/player-effects.h
src/player/player-move.c
src/player/player-status.c
src/spell-kind/earthquake.c
src/spell-kind/spells-floor.c
src/spell-kind/spells-lite.c

index 721f595..c1e06ee 100644 (file)
@@ -47,6 +47,7 @@
 #include "main/music-definitions-table.h"
 #include "main/sound-definitions-table.h"
 #include "main/sound-of-music.h"
+#include "mind/mind-ninja.h"
 #include "mind/snipe-types.h"
 #include "monster/monster-describer.h"
 #include "monster-floor/monster-death.h"
index b84998d..8cef6fb 100644 (file)
 #include "io/targeting.h"
 #include "io/write-diary.h"
 #include "market/arena.h"
+#include "mind/mind-ninja.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include "monster/monster-compaction.h"
 #include "monster/monster-processor.h"
 #include "monster/monster-status.h"
 #include "monster/monster-util.h"
-#include "player/player-effects.h"
 #include "player/player-move.h"
 #include "player/special-defense-types.h"
 #include "realm/realm-song-numbers.h"
index 00d8467..76ac50f 100644 (file)
@@ -6,8 +6,8 @@
 #include "grid/trap.h"
 #include "main/sound-definitions-table.h"
 #include "main/sound-of-music.h"
+#include "mind/mind-ninja.h"
 #include "monster/monster-update.h"
-#include "player/player-effects.h"
 #include "player/special-defense-types.h"
 #include "room/rooms.h"
 #include "spell/process-effect.h" // 暫定、後で消す.
index 06c5376..72a276b 100644 (file)
@@ -8,6 +8,7 @@
 #include "game-option/map-screen-options.h"
 #include "grid/grid.h"
 #include "main/sound-of-music.h"
+#include "mind/mind-ninja.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include "monster-race/race-flags7.h"
@@ -26,7 +27,6 @@
 #include "sv-definition/sv-amulet-types.h"
 #include "sv-definition/sv-protector-types.h"
 #include "sv-definition/sv-ring-types.h"
-#include "player/player-effects.h"
 #include "player/player-move.h"
 #include "util/bit-flags-calculator.h"
 #include "view/display-messages.h"
index 20b94d2..99ca885 100644 (file)
@@ -33,6 +33,7 @@
 #include "io/write-diary.h"
 #include "main/sound-of-music.h"
 #include "mind/mind-mirror-master.h"
+#include "mind/mind-ninja.h"
 #include "monster-floor/monster-generator.h"
 #include "monster-floor/monster-remover.h"
 #include "monster-floor/monster-summon.h"
@@ -53,7 +54,6 @@
 #include "object-hook/hook-enchant.h"
 #include "pet/pet-util.h"
 #include "player/player-class.h"
-#include "player/player-effects.h"
 #include "player/player-personalities-types.h"
 #include "player/special-defense-types.h"
 #include "spell-kind/spells-floor.h"
index f2b0ebb..f6027f9 100644 (file)
@@ -11,6 +11,7 @@
 #include "grid/grid.h"
 #include "grid/trap.h"
 #include "io/targeting.h"
+#include "mind/mind-ninja.h"
 #include "monster-floor/monster-generator.h"
 #include "monster-floor/monster-remover.h"
 #include "monster/monster-update.h"
@@ -22,7 +23,6 @@
 #include "object/object-generator.h"
 #include "object/object-kind.h"
 #include "perception/object-perception.h"
-#include "player/player-effects.h"
 #include "player/special-defense-types.h"
 #include "room/rooms.h"
 #include "util/bit-flags-calculator.h"
index 56c1c08..9cf93d8 100644 (file)
@@ -4,6 +4,7 @@
 #include "effect/effect-characteristics.h"
 #include "effect/spells-effect-util.h"
 #include "floor/floor-object.h"
+#include "game-option/disturbance-options.h"
 #include "grid/feature.h"
 #include "io/targeting.h"
 #include "monster-race/monster-race.h"
@@ -16,6 +17,7 @@
 #include "object/object-generator.h"
 #include "object/object-kind-hook.h"
 #include "player/player-effects.h"
+#include "player/player-move.h"
 #include "player/special-defense-types.h"
 #include "spell-kind/spells-teleport.h"
 #include "util/bit-flags-calculator.h"
@@ -244,3 +246,45 @@ void hayagake(player_type *creature_ptr)
 
     creature_ptr->energy_use = 0;
 }
+
+/*!
+ * @brief 超隠密状態をセットする
+ * @param set TRUEならば超隠密状態になる。
+ * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
+ */
+bool set_superstealth(player_type *creature_ptr, bool set)
+{
+    bool notice = FALSE;
+
+    if (creature_ptr->is_dead)
+        return FALSE;
+
+    if (set) {
+        if (!(creature_ptr->special_defense & NINJA_S_STEALTH)) {
+            if (creature_ptr->current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].info & CAVE_MNLT) {
+                msg_print(_("敵の目から薄い影の中に覆い隠された。", "You are mantled in weak shadow from ordinary eyes."));
+                creature_ptr->monlite = creature_ptr->old_monlite = TRUE;
+            } else {
+                msg_print(_("敵の目から影の中に覆い隠された!", "You are mantled in shadow from ordinary eyes!"));
+                creature_ptr->monlite = creature_ptr->old_monlite = FALSE;
+            }
+
+            notice = TRUE;
+            creature_ptr->special_defense |= NINJA_S_STEALTH;
+        }
+    } else {
+        if (creature_ptr->special_defense & NINJA_S_STEALTH) {
+            msg_print(_("再び敵の目にさらされるようになった。", "You are exposed to common sight once more."));
+            notice = TRUE;
+            creature_ptr->special_defense &= ~(NINJA_S_STEALTH);
+        }
+    }
+
+    if (!notice)
+        return FALSE;
+    creature_ptr->redraw |= (PR_STATUS);
+
+    if (disturb_state)
+        disturb(creature_ptr, FALSE, FALSE);
+    return TRUE;
+}
index 95cf7f8..613e2e1 100644 (file)
@@ -9,3 +9,4 @@ void process_surprise_attack(player_type *attacker_ptr, player_attack_type *pa_p
 void print_surprise_attack(player_attack_type *pa_ptr);
 void calc_surprise_attack_damage(player_type *attacker_ptr, player_attack_type *pa_ptr);
 void hayagake(player_type *creature_ptr);
+bool set_superstealth(player_type *creature_ptr, bool set);
index 998a01f..788b8a4 100644 (file)
@@ -15,6 +15,7 @@
 #include "io/write-diary.h"
 #include "main/sound-definitions-table.h"
 #include "main/sound-of-music.h"
+#include "mind/mind-ninja.h"
 #include "monster-attack/monster-attack-effect.h"
 #include "monster-attack/monster-attack-types.h"
 #include "monster-floor/monster-death.h"
index 6bbae61..ff2ea6a 100644 (file)
@@ -567,48 +567,6 @@ bool set_tim_stealth(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 }
 
 /*!
- * @brief 超隠密状態をセットする
- * @param set TRUEならば超隠密状態になる。
- * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
- */
-bool set_superstealth(player_type *creature_ptr, bool set)
-{
-    bool notice = FALSE;
-
-    if (creature_ptr->is_dead)
-        return FALSE;
-
-    if (set) {
-        if (!(creature_ptr->special_defense & NINJA_S_STEALTH)) {
-            if (creature_ptr->current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].info & CAVE_MNLT) {
-                msg_print(_("敵の目から薄い影の中に覆い隠された。", "You are mantled in weak shadow from ordinary eyes."));
-                creature_ptr->monlite = creature_ptr->old_monlite = TRUE;
-            } else {
-                msg_print(_("敵の目から影の中に覆い隠された!", "You are mantled in shadow from ordinary eyes!"));
-                creature_ptr->monlite = creature_ptr->old_monlite = FALSE;
-            }
-
-            notice = TRUE;
-            creature_ptr->special_defense |= NINJA_S_STEALTH;
-        }
-    } else {
-        if (creature_ptr->special_defense & NINJA_S_STEALTH) {
-            msg_print(_("再び敵の目にさらされるようになった。", "You are exposed to common sight once more."));
-            notice = TRUE;
-            creature_ptr->special_defense &= ~(NINJA_S_STEALTH);
-        }
-    }
-
-    if (!notice)
-        return FALSE;
-    creature_ptr->redraw |= (PR_STATUS);
-
-    if (disturb_state)
-        disturb(creature_ptr, FALSE, FALSE);
-    return TRUE;
-}
-
-/*!
  * @brief 一時的浮遊の継続時間をセットする / Set "tim_levitation", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
index 2982528..0ad8ee8 100644 (file)
@@ -50,7 +50,6 @@ bool set_tim_res_time(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
 bool choose_ele_attack(player_type *creature_ptr);
 bool choose_ele_immune(player_type *creature_ptr, TIME_EFFECT turn);
 bool set_wraith_form(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-bool set_superstealth(player_type *creature_ptr, bool set);
 void do_poly_wounds(player_type *creature_ptr);
 void change_race(player_type *creature_ptr, player_race_type new_race, concptr effect_msg);
 bool drop_weapons(player_type *creature_ptr);
index 3d3389f..6f08ce9 100644 (file)
 #include "locale/vowel-checker.h"
 #include "main/sound-definitions-table.h"
 #include "main/sound-of-music.h"
+#include "mind/mind-ninja.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags-resistance.h"
 #include "monster-race/race-flags1.h"
index 74cf169..e61e40e 100644 (file)
@@ -26,6 +26,7 @@
 #include "main/sound-of-music.h"
 #include "market/arena-info-table.h"
 #include "mind/mind-force-trainer.h"
+#include "mind/mind-ninja.h"
 #include "monster-race/race-flags1.h"
 #include "monster-race/race-flags2.h"
 #include "monster-race/race-flags3.h"
index ab364f3..26fd203 100644 (file)
@@ -8,6 +8,7 @@
 #include "game-option/text-display-options.h"
 #include "grid/grid.h"
 #include "io/write-diary.h"
+#include "mind/mind-ninja.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include "monster-race/race-flags2.h"
@@ -19,7 +20,6 @@
 #include "monster/smart-learn-types.h"
 #include "status/bad-status-setter.h"
 #include "player/player-damage.h"
-#include "player/player-effects.h"
 #include "player/player-move.h"
 #include "player/special-defense-types.h"
 #include "util/bit-flags-calculator.h"
index 46d10fd..8b05152 100644 (file)
@@ -21,6 +21,7 @@
 #include "grid/feature.h"
 #include "grid/grid.h"
 #include "io/write-diary.h"
+#include "mind/mind-ninja.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include "monster/monster-describer.h"
@@ -36,7 +37,6 @@
 #include "object/object-mark-types.h"
 #include "perception/object-perception.h"
 #include "status/bad-status-setter.h"
-#include "player/player-effects.h"
 #include "player/special-defense-types.h"
 #include "spell-kind/spells-teleport.h"
 #include "spell/process-effect.h"
index 557ca7f..4077342 100644 (file)
@@ -5,12 +5,12 @@
 #include "game-option/map-screen-options.h"
 #include "grid/grid.h"
 #include "io/targeting.h"
+#include "mind/mind-ninja.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags2.h"
 #include "monster/monster-describer.h"
 #include "monster/monster-status.h"
 #include "monster/monster-update.h"
-#include "player/player-effects.h"
 #include "player/special-defense-types.h"
 #include "spell-kind/spells-launcher.h"
 #include "spell/process-effect.h"