OSDN Git Service

[Refactor] #37353 コメント整理。 update_mon()をupdate_monster()に改名。 / Refactor comments and...
[hengband/hengband.git] / src / realm-daemon.c
index 1cb36e5..71939c0 100644 (file)
@@ -27,8 +27,8 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("弱い魔法の矢を放つ。", "Fires a weak bolt of magic.");
 
                {
-                       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);
 
@@ -114,8 +114,8 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("地獄のボルトもしくはビームを放つ。", "Fires a bolt or beam of nether.");
 
                {
-                       int dice = 6 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_NUMBER dice = 6 + (plev - 5) / 4;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -149,8 +149,8 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Fires a ball of evil power. Hurts good monsters greatly.");
 
                {
-                       int dice = 3;
-                       int sides = 6;
+                       DICE_NUMBER dice = 3;
+                       DICE_SID sides = 6;
                        POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
@@ -226,8 +226,8 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("プラズマのボルトもしくはビームを放つ。", "Fires a bolt or beam of plasma.");
 
                {
-                       int dice = 11 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_NUMBER dice = 11 + (plev - 5) / 4;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -297,32 +297,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               bool pet = !one_in_(3);
-                               u32b flg = 0L;
-
-                               if (pet) flg |= PM_FORCE_PET;
-                               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 * 2 / 3 + randint1(plev / 2), SUMMON_DEMON, flg))
-                               {
-                                       msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
-
-                                       if (pet)
-                                       {
-                                               msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));
-                                       }
-                                       else
-                                       {
-                                               msg_print(_("「卑しき者よ、我は汝の下僕にあらず! お前の魂を頂くぞ!」",
-                                                       "'NON SERVIAM! Wretch! I shall feast on thy mortal soul!'"));
-                                       }
-                               }
-                               else
-                               {
-                                       msg_print(_("悪魔は現れなかった。", "No demons arrive."));
-                               }
-                               break;
+                               cast_summon_demon(plev * 2 / 3 + randint1(plev / 2));
                        }
                }
                break;
@@ -333,7 +308,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 30;
-                       int sides = 25;
+                       DICE_SID sides = 25;
 
                        if (info) return info_duration(base, sides);