OSDN Git Service

[Refactor] #40414 Moved clear_mind() from spells2.c/h to mind-force-trainer.c/h
authorHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 12:32:17 +0000 (21:32 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 12:32:17 +0000 (21:32 +0900)
src/mind/mind-force-trainer.c
src/mind/mind-force-trainer.h
src/mind/racial.c
src/spell/spells2.c
src/spell/spells2.h

index 0402302..33da7f9 100644 (file)
@@ -1,4 +1,5 @@
 #include "mind/mind-force-trainer.h"
+#include "cmd-action/cmd-pet.h"
 
 /*!
  * @brief 練気術師が「練気」で溜めた気の量を返す
@@ -26,3 +27,22 @@ void set_current_ki(player_type *caster_ptr, bool is_reset, MAGIC_NUM1 ki)
 
     caster_ptr->magic_num1[0] += ki;
 }
+
+bool clear_mind(player_type *creature_ptr)
+{
+    if (total_friends) {
+        msg_print(_("今はペットを操ることに集中していないと。", "Your pets demand all of your attention."));
+        return FALSE;
+    }
+
+    msg_print(_("少し頭がハッキリした。", "You feel your head clear a little."));
+
+    creature_ptr->csp += (3 + creature_ptr->lev / 20);
+    if (creature_ptr->csp >= creature_ptr->msp) {
+        creature_ptr->csp = creature_ptr->msp;
+        creature_ptr->csp_frac = 0;
+    }
+
+    creature_ptr->redraw |= (PR_MANA);
+    return TRUE;
+}
index 02192bc..ece8add 100644 (file)
@@ -4,3 +4,4 @@
 
 MAGIC_NUM1 get_current_ki(player_type *caster_ptr);
 void set_current_ki(player_type *caster_ptr, bool is_reset, MAGIC_NUM1 ki);
+bool clear_mind(player_type *creature_ptr);
index 9bb8072..a518737 100644 (file)
@@ -23,6 +23,7 @@
 #include "mind/racial-balrog.h"
 #include "mind/mind-cavalry.h"
 #include "mind/racial-draconian.h"
+#include "mind/mind-force-trainer.h"
 #include "mind/mind-mirror-master.h"
 #include "mind/mind-samurai.h"
 #include "mind/mind-warrior.h"
index 43fb6c1..2edbc41 100644 (file)
@@ -331,25 +331,3 @@ bool comvert_mp_to_hp(player_type *creature_ptr)
        creature_ptr->redraw |= (PR_HP | PR_MANA);
        return TRUE;
 }
-
-
-bool clear_mind(player_type *creature_ptr)
-{
-       if (total_friends)
-       {
-               msg_print(_("今はペットを操ることに集中していないと。", "Your pets demand all of your attention."));
-               return FALSE;
-       }
-
-       msg_print(_("少し頭がハッキリした。", "You feel your head clear a little."));
-
-       creature_ptr->csp += (3 + creature_ptr->lev / 20);
-       if (creature_ptr->csp >= creature_ptr->msp)
-       {
-               creature_ptr->csp = creature_ptr->msp;
-               creature_ptr->csp_frac = 0;
-       }
-
-       creature_ptr->redraw |= (PR_MANA);
-       return TRUE;
-}
index 5b0c4d8..0c1e422 100644 (file)
@@ -12,5 +12,4 @@ void hayagake(player_type* creature_ptr);
 bool double_attack(player_type* creature_ptr);
 bool comvert_hp_to_mp(player_type* creature_ptr);
 bool comvert_mp_to_hp(player_type* creature_ptr);
-bool clear_mind(player_type* creature_ptr);
 bool vanish_dungeon(player_type* caster_ptr);