Integrate some effects to cast_summon_demon().
#include "angband.h"
#include "cmd-activate.h"
#include "object-hook.h"
+#include "spells-summon.h"
/*!
* @brief ペット入りモンスターボールをソートするための比較関数
case ACT_SUMMON_DEMON:
{
- bool pet = one_in_(3);
- BIT_FLAGS mode = 0L;
-
- if (!(pet && (plev < 50))) mode |= PM_ALLOW_GROUP;
- if (pet) mode |= PM_FORCE_PET;
- else mode |= PM_NO_PET;
-
- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((plev * 3) / 2), SUMMON_DEMON, mode))
- {
- 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! お前の魂を頂くぞ!」", "'NON SERVIAM! Wretch! I shall feast on thy mortal soul!'"));
- }
-
+ cast_summon_demon((plev * 3) / 2);
break;
}
#include "angband.h"
#include "cmd-spell.h"
+#include "spells-summon.h"
/*!
* @brief カオス領域魔法の各処理を行う
{
if (cast)
{
- u32b flg = 0L;
- bool pet = !one_in_(3);
-
- 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 * 3) / 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!'"));
- }
- }
+ cast_summon_demon((plev * 3) / 2);
}
}
break;
#include "angband.h"
#include "cmd-spell.h"
+#include "spells-summon.h"
{
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;
}\r
\r
\r
+bool cast_summon_demon(int power)\r
+{\r
+ u32b flg = 0L;\r
+ bool pet = !one_in_(3);\r
+\r
+ if (pet) flg |= PM_FORCE_PET;\r
+ else flg |= PM_NO_PET;\r
+ if (!(pet && (p_ptr->lev < 50))) flg |= PM_ALLOW_GROUP;\r
+\r
+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, power, SUMMON_DEMON, flg))\r
+ {\r
+ msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));\r
+ if (pet)\r
+ {\r
+ msg_print(_("「ご用でございますか、ご主人様」", "'What is thy bidding... Master?'"));\r
+ }\r
+ else\r
+ {\r
+ msg_print(_("「卑しき者よ、我は汝の下僕にあらず! お前の魂を頂くぞ!」",\r
+ "'NON SERVIAM! Wretch! I shall feast on thy mortal soul!'"));\r
+ }\r
+ }\r
+ return TRUE;\r
+}\r
+\r
\r
/*!\r
* @brief 悪魔領域のグレーターデーモン召喚に利用可能な死体かどうかを返す。 / An "item_tester_hook" for offer\r
extern bool trump_summoning(int num, bool pet, POSITION y, POSITION x, DEPTH lev, int type, BIT_FLAGS mode);\r
+extern bool cast_summon_demon(int power);\r
extern bool item_tester_offer(object_type *o_ptr);\r
extern bool cast_summon_greater_demon(void);\r