OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
[hengband/hengband.git] / src / realm-trump.c
index b5ea23f..6a153d0 100644 (file)
@@ -1,5 +1,9 @@
 #include "angband.h"
 #include "cmd-spell.h"
+#include "projection.h"
+#include "spells-summon.h"
+#include "mutation.h"
+#include "spells-status.h"
 
 
 /*!
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
 */
-cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
        bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
        bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
        bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
        bool fail = (mode == SPELL_FAIL) ? TRUE : FALSE;
-       static const char s_random[] = _("ランダム", "random");
 
        DIRECTION dir;
-       int plev = p_ptr->lev;
+       PLAYER_LEVEL plev = p_ptr->lev;
 
        switch (spell)
        {
@@ -105,7 +108,7 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 30;
+                       DICE_SID sides = 30;
 
                        if (info) return info_duration(base, sides);
 
@@ -159,7 +162,7 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("アイテムを自分の足元へ移動させる。", "Pulls a distant item close to you.");
 
                {
-                       int weight = plev * 15;
+                       WEIGHT weight = plev * 15;
 
                        if (info) return info_weight(weight);
 
@@ -292,13 +295,13 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
                        if (cast)
                        {
-                               if (!word_of_recall()) return NULL;
+                               if (!recall_player(p_ptr, randint0(21) + 15)) return NULL;
                        }
                }
                break;
@@ -489,7 +492,7 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Detects all monsters, traps, doors, stairs, treasures and items in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -566,7 +569,7 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        HIT_POINT dam = plev * 2;
-                       int rad = 2;
+                       POSITION rad = 2;
 
                        if (info) return info_multi_damage(dam);