From 8011d5b9610bd259faa1604db0a4400edf6a3f40 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 30 Oct 2008 20:02:49 +0000 Subject: 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 --- crawl-ref/source/spells2.cc | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'crawl-ref/source/spells2.cc') 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, -- cgit v1.2.3-54-g00ecf