OSDN Git Service

[Refactor] #37353 鏡使いのレイシャル「静水」を mirror_concentration() に分離。 / Separate Mirror master...
[hengband/hengband.git] / src / realm-death.c
index ec18b73..0d4f92a 100644 (file)
@@ -1,5 +1,9 @@
 #include "angband.h"
 #include "cmd-spell.h"
+#include "projection.h"
+#include "spells-summon.h"
+#include "spells-status.h"
+#include "avatar.h"
 
 
 
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
 */
-cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_death_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;
 
-       static const char s_dam[] = _("損傷:", "dam ");
-       static const char s_random[] = _("ランダム", "random");
-
        DIRECTION dir;
        PLAYER_LEVEL plev = p_ptr->lev;
 
@@ -47,7 +48,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3 + (plev - 1) / 5;
-                       int sides = 4;
+                       DICE_SID sides = 4;
                        POSITION rad = 0;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -197,7 +198,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3;
-                       int sides = 6;
+                       DICE_SID sides = 6;
                        POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
@@ -224,7 +225,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 8 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -291,7 +292,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 1;
-                       int sides = plev * 2;
+                       DICE_SID sides = plev * 2;
                        int base = plev * 2;
 
                        if (info) return info_damage(dice, sides, base);
@@ -397,7 +398,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 4 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -474,7 +475,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の生命のあるモンスターにダメージを与える。", "Damages all living monsters in sight.");
 
                {
-                       int sides = plev * 3;
+                       DICE_SID sides = plev * 3;
 
                        if (info) return info_damage(1, sides, 0);
 
@@ -537,7 +538,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                if (pet) flg |= PM_FORCE_PET;
                                else flg |= (PM_ALLOW_UNIQUE | PM_NO_PET);
 
-                               if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, type, flg))
+                               if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, type, flg, '\0'))
                                {
                                        msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
                                                "Cold winds begin to blow around you, carrying with them the stench of decay..."));