OSDN Git Service

[Refactor] #37353 buki_motteruka() を has_melee_weapon() に改名。 / Rename buki_motteruka...
[hengbandforosx/hengbandosx.git] / src / racial.c
index f0852e5..df59f85 100644 (file)
 #include "melee.h"
 #include "object-hook.h"
 
+#include "mutation.h"
+#include "player-status.h"
+#include "spells-status.h"
+
 /*!
  * @brief レイシャル「弾/矢の製造」処理 / do_cmd_cast calls this function if the player's class is 'archer'.
  * Hook to determine if an object is contertible in an arrow/bolt
@@ -129,7 +133,7 @@ static bool do_cmd_archer(void)
        else if (ext == 2)
        {
                OBJECT_IDX item;
-               cptr q, s;
+               concptr q, s;
                s16b slot;
 
                item_tester_hook = item_tester_hook_convertible;
@@ -175,7 +179,7 @@ static bool do_cmd_archer(void)
        else if (ext == 3)
        {
                OBJECT_IDX item;
-               cptr q, s;
+               concptr q, s;
                s16b slot;
 
                item_tester_hook = item_tester_hook_convertible;
@@ -230,7 +234,7 @@ bool gain_magic(void)
        OBJECT_IDX item;
        PARAMETER_VALUE pval;
        int ext = 0;
-       cptr q, s;
+       concptr q, s;
        object_type *o_ptr;
        GAME_TEXT o_name[MAX_NLEN];
 
@@ -240,7 +244,7 @@ bool gain_magic(void)
        q = _("どのアイテムの魔力を取り込みますか? ", "Gain power of which item? ");
        s = _("魔力を取り込めるアイテムがない。", "You have nothing to gain power.");
 
-       o_ptr = choose_item(&item, q, s, (USE_INVEN | USE_FLOOR));
+       o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
        if (!o_ptr) return (FALSE);
 
        if (o_ptr->tval == TV_STAFF && o_ptr->sval == SV_STAFF_NOTHING)
@@ -989,7 +993,7 @@ static bool cmd_racial_power_aux(s32b command)
                        }
                        else if (command == -4)
                        {
-                               if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+                               if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
                                {
                                        msg_print(_("武器を持たないといけません。", "You need to wield a weapon."));
                                        return FALSE;
@@ -1054,7 +1058,7 @@ static bool cmd_racial_power_aux(s32b command)
                }
                case CLASS_BERSERKER:
                {
-                       if (!word_of_recall()) return FALSE;
+                       if (!recall_player(p_ptr, randint0(21) + 15)) return FALSE;
                        break;
                }
                case CLASS_SMITH:
@@ -1273,7 +1277,7 @@ static bool cmd_racial_power_aux(s32b command)
                case RACE_DRACONIAN:
                        {
                                int Type = (one_in_(3) ? GF_COLD : GF_FIRE);
-                               cptr Type_desc = ((Type == GF_COLD) ? _("冷気", "cold") : _("炎", "fire"));
+                               concptr Type_desc = ((Type == GF_COLD) ? _("冷気", "cold") : _("炎", "fire"));
 
                                if (!get_aim_dir(&dir)) return FALSE;