OSDN Git Service

[WIP] [Refactor] #39963 Separated spells2.h from spells1.h
[hengband/hengband.git] / src / racial.c
index ca7b0b3..b99fd77 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
 #include "util.h"
 
 #include "cmd-basic.h"
@@ -21,7 +21,6 @@
 #include "cmd-pet.h"
 #include "melee.h"
 #include "object-hook.h"
-#include "realm-song.h"
 
 #include "mutation.h"
 #include "player-race.h"
 #include "spells-status.h"
 #include "spells-object.h"
 #include "spells-floor.h"
-#include "spells.h"
 #include "cmd-spell.h"
-#include "realm-hex.h"
+#include "realm/realm-hex.h"
 #include "targeting.h"
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
 #include "player-class.h"
+#include "effect/spells-effect-util.h"
+#include "spell/spells-type.h"
+#include "spell/spells2.h"
 
 /*!
  * @brief 修行僧の構え設定処理
@@ -63,7 +64,7 @@ static bool choose_kamae(player_type *creature_ptr)
        }
 
        prt("", 1, 0);
-       prt(_("        どの構えをとりますか?", "        Choose Form: "), 1, 14);
+       prt(_("        どの構えをとりますか?", "        Choose Stance: "), 1, 14);
 
        while (TRUE)
        {
@@ -81,7 +82,7 @@ static bool choose_kamae(player_type *creature_ptr)
                                set_action(creature_ptr, ACTION_NONE);
                        }
                        else
-                               msg_print(_("もともと構えていない。", "You are not assuming a posture."));
+                               msg_print(_("もともと構えていない。", "You are not in a special stance."));
                        screen_load();
                        return TRUE;
                }
@@ -110,14 +111,14 @@ static bool choose_kamae(player_type *creature_ptr)
 
        if (creature_ptr->special_defense & (KAMAE_GENBU << new_kamae))
        {
-               msg_print(_("構え直した。", "You reassume a posture."));
+               msg_print(_("構え直した。", "You reassume a stance."));
        }
        else
        {
                creature_ptr->special_defense &= ~(KAMAE_MASK);
                creature_ptr->update |= (PU_BONUS);
                creature_ptr->redraw |= (PR_STATE);
-               msg_format(_("%sの構えをとった。", "You assume a posture of %s form."),kamae_shurui[new_kamae].desc);
+               msg_format(_("%sの構えをとった。", "You assume the %s stance."), kamae_shurui[new_kamae].desc);
                creature_ptr->special_defense |= (KAMAE_GENBU << new_kamae);
        }
        creature_ptr->redraw |= PR_STATE;
@@ -156,13 +157,13 @@ static bool choose_kata(player_type *creature_ptr)
        {
                if (creature_ptr->lev >= kata_shurui[i].min_level)
                {
-                       sprintf(buf,_(" %c) %sの型    %s", " %c) Form of %-12s  %s"),I2A(i+1), kata_shurui[i].desc, kata_shurui[i].info);
+                       sprintf(buf,_(" %c) %sの型    %s", " %c) Stance of %-12s  %s"),I2A(i+1), kata_shurui[i].desc, kata_shurui[i].info);
                        prt(buf, 3+i, 20);
                }
        }
 
        prt("", 1, 0);
-       prt(_("        どの型で構えますか?", "        Choose Form: "), 1, 14);
+       prt(_("        どの型で構えますか?", "        Choose Stance: "), 1, 14);
 
        while (TRUE)
        {
@@ -180,7 +181,7 @@ static bool choose_kata(player_type *creature_ptr)
                                set_action(creature_ptr, ACTION_NONE);
                        }
                        else
-                               msg_print(_("もともと構えていない。", "You are not assuming posture."));
+                               msg_print(_("もともと構えていない。", "You are not in a special stance."));
                        screen_load();
                        return TRUE;
                }
@@ -209,13 +210,13 @@ static bool choose_kata(player_type *creature_ptr)
 
        if (creature_ptr->special_defense & (KATA_IAI << new_kata))
        {
-               msg_print(_("構え直した。", "You reassume a posture."));
+               msg_print(_("構え直した。", "You reassume a stance."));
        }
        else
        {
                creature_ptr->special_defense &= ~(KATA_MASK);
                creature_ptr->update |= (PU_BONUS | PU_MONSTERS);
-               msg_format(_("%sの型で構えた。", "You assume a posture of %s form."),kata_shurui[new_kata].desc);
+               msg_format(_("%sの型で構えた。", "You assume the %s stance."), kata_shurui[new_kata].desc);
                creature_ptr->special_defense |= (KATA_IAI << new_kata);
        }
        creature_ptr->redraw |= (PR_STATE | PR_STATUS);
@@ -225,14 +226,9 @@ static bool choose_kata(player_type *creature_ptr)
 
 
 /*!
- * @brief レイシャル・パワー情報のtypedef
- */
-typedef struct power_desc_type power_desc_type;
-
-/*!
  * @brief レイシャル・パワー情報の構造体定義
  */
-struct power_desc_type
+typedef struct power_desc_type
 {
        GAME_TEXT name[MAX_NLEN];      //!<レイシャル名
        PLAYER_LEVEL level;     //!<体得レベル
@@ -240,7 +236,7 @@ struct power_desc_type
        int stat;
        PERCENTAGE fail;
        int number;
-};
+} power_desc_type;
 
 
 /*!
@@ -405,6 +401,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
                        if (retval) creature_ptr->energy_use = 10;
                        return (retval);
                }
+                       /* Fall through */
                case CLASS_MAGE:
                /* case CLASS_HIGH_MAGE: */
                case CLASS_SORCERER:
@@ -466,7 +463,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
                {
                        if (!(empty_hands(creature_ptr, TRUE) & EMPTY_HAND_RARM))
                        {
-                               msg_print(_("素手じゃないとできません。", "You need to be bare hand."));
+                               msg_print(_("素手じゃないとできません。", "You need to be barehanded."));
                                return FALSE;
                        }
                        if (creature_ptr->riding)
@@ -501,7 +498,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
                        }
                        else if (command == -4)
                        {
-                               if (!identify_fully(creature_ptr, FALSE)) return FALSE;
+                               if (!identify_fully(creature_ptr, FALSE, 0)) return FALSE;
                        }
                        break;
                }
@@ -602,11 +599,11 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
                {
                        if (creature_ptr->lev > 29)
                        {
-                               if (!identify_fully(creature_ptr, TRUE)) return FALSE;
+                               if (!identify_fully(creature_ptr, TRUE, 0)) return FALSE;
                        }
                        else
                        {
-                               if (!ident_spell(creature_ptr, TRUE)) return FALSE;
+                               if (!ident_spell(creature_ptr, TRUE, 0)) return FALSE;
                        }
                        break;
                }
@@ -661,7 +658,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
 
                case RACE_GNOME:
                        msg_print(_("パッ!", "Blink!"));
-                       teleport_player(creature_ptr, 10, 0L);
+                       teleport_player(creature_ptr, 10, TELEPORT_SPONTANEOUS);
                        break;
 
                case RACE_HALF_ORC:
@@ -697,7 +694,7 @@ static bool exe_racial_power(player_type *creature_ptr, s32b command)
 
                case RACE_HALF_OGRE:
                        msg_print(_("爆発のルーンを慎重に仕掛けた...", "You carefully set an explosive rune..."));
-                       explosive_rune(creature_ptr->current_floor_ptr, creature_ptr->y, creature_ptr->x);
+                       explosive_rune(creature_ptr, creature_ptr->y, creature_ptr->x);
                        break;
 
                case RACE_HALF_GIANT:
@@ -876,7 +873,7 @@ void do_cmd_racial_power(player_type *creature_ptr)
        case CLASS_HIGH_MAGE:
                if (creature_ptr->realm1 == REALM_HEX)
                {
-                       strcpy(power_desc[num].name, _("詠唱をやめる", "Stop spelling"));
+                       strcpy(power_desc[num].name, _("詠唱をやめる", "Stop spell casting"));
                        power_desc[num].level = 1;
                        power_desc[num].cost = 0;
                        power_desc[num].stat = A_INT;
@@ -884,6 +881,7 @@ void do_cmd_racial_power(player_type *creature_ptr)
                        power_desc[num++].number = -3;
                        break;
                }
+               /* Fall through */
        case CLASS_MAGE:
                /* case CLASS_HIGH_MAGE: */
        case CLASS_SORCERER:
@@ -990,7 +988,7 @@ void do_cmd_racial_power(player_type *creature_ptr)
        }
        case CLASS_MONK:
        {
-               strcpy(power_desc[num].name, _("構える", "Assume a Posture"));
+               strcpy(power_desc[num].name, _("構える", "Assume a Stance"));
                power_desc[num].level = 25;
                power_desc[num].cost = 0;
                power_desc[num].stat = A_DEX;
@@ -1116,7 +1114,7 @@ void do_cmd_racial_power(player_type *creature_ptr)
                power_desc[num].fail = 0;
                power_desc[num++].number = -3;
 
-               strcpy(power_desc[num].name, _("型", "Assume a Posture"));
+               strcpy(power_desc[num].name, _("型", "Assume a Stance"));
                power_desc[num].level = 25;
                power_desc[num].cost = 0;
                power_desc[num].stat = A_DEX;