OSDN Git Service

[Refactor] #37353 型の置換。 / Type replacement.
[hengband/hengband.git] / src / mutation.c
index 0c7797b..ffdf682 100644 (file)
  */
 
 #include "angband.h"
+#include "mutation.h"
+
 #include "selfinfo.h"
+#include "spells-summon.h"
+#include "avatar.h"
+#include "player-status.h"
+#include "spells-status.h"
 
 /*!
  * @brief プレイヤーに突然変異を与える
@@ -22,7 +28,7 @@
 bool gain_random_mutation(int choose_mut)
 {
        int attempts_left = 20;
-       cptr muta_desc = "";
+       concptr muta_desc = "";
        bool muta_chosen = FALSE;
        BIT_FLAGS muta_which = 0;
        BIT_FLAGS *muta_class = NULL;
@@ -860,7 +866,7 @@ bool gain_random_mutation(int choose_mut)
 bool lose_mutation(int choose_mut)
 {
        int attempts_left = 20;
-       cptr muta_desc = "";
+       concptr muta_desc = "";
        bool muta_chosen = FALSE;
        BIT_FLAGS muta_which = 0;
        BIT_FLAGS *muta_class = NULL;
@@ -2001,7 +2007,7 @@ void dump_mutations(FILE *OutFile)
 void do_cmd_knowledge_mutations(void)
 {
        FILE *fff;
-       char file_name[1024];
+       GAME_TEXT file_name[1024];
 
        /* Open a new file */
        fff = my_fopen_temp(file_name, 1024);
@@ -2197,7 +2203,7 @@ bool mutation_power_aux(int power)
                                DIRECTION i;
                                for (i = 0; i < 8; i++)
                                {
-                                       summon_specific(-1, p_ptr->y, p_ptr->x, lvl, SUMMON_MOLD, PM_FORCE_PET);
+                                       summon_specific(-1, p_ptr->y, p_ptr->x, lvl, SUMMON_MOLD, PM_FORCE_PET, '\0');
                                }
                        }
                        break;
@@ -2269,7 +2275,7 @@ bool mutation_power_aux(int power)
                        break;
 
                case MUT1_RECALL:
-                       if (!word_of_recall()) return FALSE;
+                       if (!recall_player(p_ptr, randint0(21) + 15)) return FALSE;
                        break;
 
                case MUT1_BANISH:
@@ -2302,7 +2308,7 @@ bool mutation_power_aux(int power)
                                {
                                        if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
                                        {
-                                               char m_name[80];
+                                               GAME_TEXT m_name[MAX_NLEN];
                                                monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
                                                do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_GENOCIDE, m_name);
                                        }
@@ -2344,7 +2350,7 @@ bool mutation_power_aux(int power)
                        break;
 
                default:
-                       p_ptr->energy_use = 0;
+                       free_turn(p_ptr);
                        msg_format(_("能力 %s は実装されていません。", "Power %s not implemented. Oops."), power);
        }