summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-30 20:02:49 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-30 20:02:49 +0000
commit8011d5b9610bd259faa1604db0a4400edf6a3f40 (patch)
treefbd787e2b06ddab5a0642370f7f8cbcc03a4472b /crawl-ref/source/spells2.cc
parentafa3bd5cf599e0d3c220866e3eb67c673ffca1b9 (diff)
downloadcrawl-ref-8011d5b9610bd259faa1604db0a4400edf6a3f40.tar.gz
crawl-ref-8011d5b9610bd259faa1604db0a4400edf6a3f40.zip
Add more holy being-related cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7315 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc33
1 files changed, 19 insertions, 14 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 318eb43fc4..28222a96e1 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1616,9 +1616,11 @@ bool summon_berserker(int pow, god_type god, bool force_hostile)
return (true);
}
-static bool _summon_holy_being_wrapper(god_type god, monster_type mon, int dur,
- bool friendly, bool quiet)
+static bool _summon_holy_being_wrapper(int pow, god_type god, monster_type mon,
+ int dur, bool friendly, bool quiet)
{
+ UNUSED(pow);
+
const int monster =
create_monster(
mgen_data(mon,
@@ -1646,24 +1648,27 @@ static bool _summon_holy_being_wrapper(god_type god, monster_type mon, int dur,
return (true);
}
-// TSO sends an angel for a follower.
-bool summon_angel(int pow, god_type god, bool quiet,
- bool force_hostile, bool permanent)
+static bool _summon_holy_being_wrapper(int pow, god_type god,
+ holy_being_class_type hbct,
+ int dur, bool friendly, bool quiet)
{
- int dur = !permanent ? std::min(2 + (random2(pow) / 4), 6) : 0;
+ monster_type mon = summon_any_holy_being(hbct);
- return _summon_holy_being_wrapper(god, MONS_ANGEL, dur, !force_hostile,
- quiet);
+ return _summon_holy_being_wrapper(pow, god, mon, dur, friendly, quiet);
}
-// TSO sends a daeva for a follower.
-bool summon_daeva(int pow, god_type god, bool quiet,
- bool force_hostile, bool permanent)
+bool summon_holy_warrior(int pow, god_type god, bool quiet)
{
- int dur = !permanent ? std::min(2 + (random2(pow) / 4), 6) : 0;
+ return _summon_holy_being_wrapper(pow, god, HOLY_BEING_WARRIOR,
+ std::min(2 + (random2(pow) / 4), 6),
+ true, quiet);
+}
- return _summon_holy_being_wrapper(god, MONS_DAEVA, dur, !force_hostile,
- quiet);
+bool summon_holy_being_type(monster_type mon, int pow, god_type god)
+{
+ return _summon_holy_being_wrapper(pow, god, mon,
+ std::min(2 + (random2(pow) / 4), 6),
+ true, false);
}
bool cast_tukimas_dance(int pow, god_type god,