OSDN Git Service

[Refactor] #37353 バリアント名称とバージョン定義を core.h へ移動.
[hengband/hengband.git] / src / realm-death.c
index 26b35f0..1bdddb1 100644 (file)
@@ -1,7 +1,14 @@
 #include "angband.h"
 #include "cmd-spell.h"
-
-
+#include "spells.h"
+#include "spells-summon.h"
+#include "spells-status.h"
+#include "avatar.h"
+#include "player-status.h"
+#include "player-effects.h"
+#include "targeting.h"
+#include "player-class.h"
+#include "player-race.h"
 
 /*!
 * @brief 暗黒領域魔法の各処理を行う
 * @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;
 
@@ -380,7 +384,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("ランダムで様々な効果が起こる。", "Causes random effects.");
 
                {
-                       if (info) return s_random;
+                       if (info) return KWD_RANDOM;
 
                        if (cast)
                        {
@@ -449,7 +453,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                {
                        HIT_POINT dam = 100;
 
-                       if (info) return format("%s3*%d", s_dam, dam);
+                       if (info) return format("%s3*%d", KWD_DAM, dam);
 
                        if (cast)
                        {
@@ -521,43 +525,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 25:
                if (name) return _("死者召喚", "Raise the Dead");
                if (desc) return _("1体のアンデッドを召喚する。", "Summons an undead monster.");
-
-               {
-                       if (cast)
-                       {
-                               int type;
-                               bool pet = one_in_(3);
-                               u32b flg = 0L;
-
-                               type = (plev > 47 ? SUMMON_HI_UNDEAD : SUMMON_UNDEAD);
-
-                               if (!pet || (pet && (plev > 24) && one_in_(3)))
-                                       flg |= PM_ALLOW_GROUP;
-
-                               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, '\0'))
-                               {
-                                       msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
-                                               "Cold winds begin to blow around you, carrying with them the stench of decay..."));
-
-
-                                       if (pet)
-                                       {
-                                               msg_print(_("古えの死せる者共があなたに仕えるため土から甦った!",
-                                                       "Ancient, long-dead forms arise from the ground to serve you!"));
-                                       }
-                                       else
-                                       {
-                                               msg_print(_("死者が甦った。眠りを妨げるあなたを罰するために!",
-                                                       "'The dead arise... to punish you for disturbing them!'"));
-                                       }
-
-                                       chg_virtue(V_UNLIFE, 1);
-                               }
-                       }
-               }
+               if (cast) cast_summon_undead(p_ptr, (plev * 3) / 2);
                break;
 
        case 26: