OSDN Git Service

[Refactor] #37353 店処理のヘッダを externs.h から store.h へ分離。
[hengband/hengband.git] / src / realm-sorcery.c
index 22ad00f..7951151 100644 (file)
@@ -15,8 +15,8 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
        bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
        bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
 
-       int dir;
-       int plev = p_ptr->lev;
+       DIRECTION dir;
+       PLAYER_LEVEL plev = p_ptr->lev;
 
        switch (spell)
        {
@@ -25,7 +25,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全ての見えるモンスターを感知する。", "Detects all monsters in your vicinity unless invisible.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -57,7 +57,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全ての扉と罠を感知する。", "Detects traps, doors, and stairs in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -75,9 +75,9 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
 
                {
-                       int dice = 2;
-                       int sides = plev / 2;
-                       int rad = plev / 10 + 1;
+                       DICE_NUMBER dice = 2;
+                       DICE_SID sides = plev / 2;
+                       POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -93,7 +93,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("モンスター1体を混乱させる。抵抗されると無効。", "Attempts to confuse a monster.");
 
                {
-                       int power = (plev * 3) / 2;
+                       PLAYER_LEVEL power = (plev * 3) / 2;
 
                        if (info) return info_power(power);
 
@@ -161,7 +161,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("周辺の地形を感知する。", "Maps nearby area.");
 
                {
-                       int rad = DETECT_RAD_MAP;
+                       POSITION rad = DETECT_RAD_MAP;
 
                        if (info) return info_radius(rad);
 
@@ -242,7 +242,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = plev;
-                       int sides = 20 + plev;
+                       DICE_SID sides = 20 + plev;
 
                        if (info) return info_duration(base, sides);
 
@@ -259,7 +259,7 @@ cptr do_sorcery_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);
 
@@ -287,7 +287,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("近くの全てのアイテムと財宝を感知する。", "Detects all treasures and items in your vicinity.");
 
                {
-                       int rad = DETECT_RAD_DEFAULT;
+                       POSITION rad = DETECT_RAD_DEFAULT;
 
                        if (info) return info_radius(rad);
 
@@ -313,7 +313,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               charm_monster(dir, power);
+                               charm_monster(dir, plev);
                        }
                }
                break;
@@ -324,7 +324,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 30;
+                       DICE_SID sides = 30;
 
                        if (info) return info_duration(base, sides);
 
@@ -380,7 +380,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
@@ -427,8 +427,8 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Sets a glyph under you. The glyph will explode when a monster moves on it.");
 
                {
-                       int dice = 7;
-                       int sides = 7;
+                       DICE_NUMBER dice = 7;
+                       DICE_SID sides = 7;
                        int base = plev;
 
                        if (info) return info_damage(dice, sides, base);
@@ -445,7 +445,7 @@ cptr do_sorcery_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);
 
@@ -465,7 +465,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 30;
+                       DICE_SID sides = 30;
 
                        if (info) return info_duration(base, sides);