OSDN Git Service

[Refactor] #37353 聖浄の杖の効果を cleasing_nova() に分離。 / Separate implementation of 'staff...
[hengband/hengband.git] / src / realm-crusade.c
index ffdde91..10d545e 100644 (file)
@@ -1,6 +1,7 @@
 #include "angband.h"
 #include "cmd-spell.h"
 #include "spells-summon.h"
+#include "projection.h"
 
 
 
@@ -10,7 +11,7 @@
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST時はNULL文字列を返す。
 */
-cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
        bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
@@ -26,8 +27,8 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (name) return _("懲罰", "Punishment");
                if (desc) return _("電撃のボルトもしくはビームを放つ。", "Fires a bolt or beam of lightning.");
                {
-                       int dice = 3 + (plev - 1) / 5;
-                       int sides = 4;
+                       DICE_NUMBER dice = 3 + (plev - 1) / 5;
+                       DICE_SID sides = 4;
                        if (info) return info_damage(dice, sides, 0);
                        if (cast)
                        {
@@ -99,8 +100,8 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("ターゲット付近に閃光のボルトを連射する。", "Fires many bolts of light near the target.");
 
                {
-                       int dice = 3 + (plev - 1) / 9;
-                       int sides = 2;
+                       DICE_NUMBER dice = 3 + (plev - 1) / 9;
+                       DICE_SID sides = 2;
                        if (info) return info_multi_damage_dice(dice, sides);
                        if (cast)
                        {
@@ -172,7 +173,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与え、邪悪なモンスターを恐怖させる。",
                        "Damages all undead and demons in sight, and scares all evil monsters in sight.");
                {
-                       int sides = plev;
+                       DICE_SID sides = plev;
                        int power = plev;
                        if (info) return info_damage(1, sides, 0);
                        if (cast)
@@ -188,13 +189,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (name) return _("解呪", "Remove Curse");
                if (desc) return _("アイテムにかかった弱い呪いを解除する。", "Removes normal curses from equipped items.");
                {
-                       if (cast)
-                       {
-                               if (remove_curse())
-                               {
-                                       msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
-                               }
-                       }
+                       if (cast) (void)remove_curse();
                }
                break;
 
@@ -220,7 +215,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 3 * plev;
+                       DICE_SID sides = 3 * plev;
 
                        if (info) return info_duration(base, sides);
 
@@ -323,7 +318,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与える。", "Damages all undead and demons in sight.");
 
                {
-                       int sides = plev * 4;
+                       DICE_SID sides = plev * 4;
 
                        if (info) return info_damage(1, sides, 0);
 
@@ -340,7 +335,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全ての邪悪なモンスターにダメージを与える。", "Damages all evil monsters in sight.");
 
                {
-                       int sides = plev * 4;
+                       DICE_SID sides = plev * 4;
 
                        if (info) return info_damage(1, sides, 0);
 
@@ -396,7 +391,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                else flg |= PM_NO_PET;
                                if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
 
-                               if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_ANGEL, flg))
+                               if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_ANGEL, flg, '\0'))
                                {
                                        if (pet)
                                        {
@@ -432,13 +427,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("アイテムにかかった強力な呪いを解除する。", "Removes normal and heavy curse from equipped items.");
 
                {
-                       if (cast)
-                       {
-                               if (remove_all_curse())
-                               {
-                                       msg_print(_("誰かに見守られているような気がする。", "You feel as if someone is watching over you."));
-                               }
-                       }
+                       if (cast) (void)remove_all_curse();
                }
                break;
 
@@ -468,7 +457,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 12;
-                       int sides = 4;
+                       DICE_SID sides = 4;
 
                        if (cast)
                        {
@@ -564,7 +553,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                                if (cave_empty_bold2(my, mx)) break;
                                        }
                                        if (attempt < 0) continue;
-                                       summon_specific(-1, my, mx, plev, SUMMON_KNIGHTS, (PM_ALLOW_GROUP | PM_FORCE_PET | PM_HASTE));
+                                       summon_specific(-1, my, mx, plev, SUMMON_KNIGHTS, (PM_ALLOW_GROUP | PM_FORCE_PET | PM_HASTE), '\0');
                                }
                                set_hero(randint1(base) + base, FALSE);
                                set_blessed(randint1(base) + base, FALSE);