summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 16:02:32 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 16:02:32 +0000
commitcf3c0bb3c21f28a112f691bdbf9189bb579dc4c4 (patch)
tree8a0f01497bb33790029b30fe711cd06c4ce74c70 /crawl-ref
parent214d0f6490fb4409dfd51ca4a62f78fcba59bff6 (diff)
downloadcrawl-ref-cf3c0bb3c21f28a112f691bdbf9189bb579dc4c4.tar.gz
crawl-ref-cf3c0bb3c21f28a112f691bdbf9189bb579dc4c4.zip
Add still more summoning-related cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5655 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/monplace.cc4
-rw-r--r--crawl-ref/source/monplace.h4
-rw-r--r--crawl-ref/source/spells2.cc30
3 files changed, 22 insertions, 16 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 5d63153828..4a00052e01 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -2230,11 +2230,11 @@ monster_type summon_any_holy_being(holy_being_class_type hbct)
switch (hbct)
{
- case HOLY_BEING_ANGEL:
+ case HOLY_BEING_ZIN:
mon = MONS_ANGEL;
break;
- case HOLY_BEING_DAEVA:
+ case HOLY_BEING_TSO:
mon = MONS_DAEVA;
break;
diff --git a/crawl-ref/source/monplace.h b/crawl-ref/source/monplace.h
index 5d1dd88d58..7ff492d728 100644
--- a/crawl-ref/source/monplace.h
+++ b/crawl-ref/source/monplace.h
@@ -79,8 +79,8 @@ enum demon_class_type
enum holy_being_class_type
{
- HOLY_BEING_ANGEL, // 0: Angel
- HOLY_BEING_DAEVA, // 1: Daeva
+ HOLY_BEING_ZIN, // 0: Angel
+ HOLY_BEING_TSO, // 1: Daeva
HOLY_BEING_RANDOM // any of the above
};
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 4a04ba9aa5..8a37908ef8 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1849,22 +1849,18 @@ bool summon_berserker(int pow, bool god_gift, bool force_hostile)
}
static bool _summon_holy_being_wrapper(int pow, bool god_gift,
- holy_being_class_type hbct)
+ monster_type mon)
{
bool success = false;
- monster_type mon = summon_any_holy_being(hbct);
-
const int dur = std::min(2 + (random2(pow) / 4), 6);
- mprf("You open a gate to %s's realm!",
- (mon == MONS_DAEVA) ? god_name(GOD_SHINING_ONE).c_str()
- : god_name(GOD_ZIN).c_str());
+ const int monster =
+ create_monster(
+ mgen_data(mon, BEH_FRIENDLY, dur, you.pos(),
+ you.pet_target,
+ (god_gift ? MG_GOD_GIFT : 0) | MG_FORCE_BEH));
- int monster = create_monster(
- mgen_data(mon, BEH_FRIENDLY, dur, you.pos(),
- you.pet_target,
- god_gift ? MG_GOD_GIFT : 0));
if (monster != -1)
{
success = true;
@@ -1875,19 +1871,29 @@ static bool _summon_holy_being_wrapper(int pow, bool god_gift,
mprf("You are momentarily dazzled by a brilliant %s light.",
(mon == MONS_DAEVA) ? "golden"
: "white");
+
+ player_angers_monster(&menv[monster]);
}
return (success);
}
+static bool _summon_holy_being_wrapper(int pow, bool god_gift,
+ holy_being_class_type hbct)
+{
+ monster_type mon = summon_any_holy_being(hbct);
+
+ return _summon_holy_being_wrapper(pow, god_gift, mon);
+}
+
// Zin sends an angel for a follower.
bool summon_guardian(int pow, bool god_gift)
{
- return _summon_holy_being_wrapper(pow, god_gift, HOLY_BEING_ANGEL);
+ return _summon_holy_being_wrapper(pow, god_gift, MONS_ANGEL);
}
// TSO sends a daeva for a follower.
bool summon_daeva(int pow, bool god_gift)
{
- return _summon_holy_being_wrapper(pow, god_gift, HOLY_BEING_DAEVA);
+ return _summon_holy_being_wrapper(pow, god_gift, MONS_DAEVA);
}