summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc30
1 files changed, 19 insertions, 11 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 6f22a8fa27..5d32629448 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1614,11 +1614,9 @@ bool summon_berserker(int pow, god_type god, bool force_hostile)
return (true);
}
-static bool _summon_holy_being_wrapper(int pow, god_type god,
- monster_type mon, bool quiet)
+static bool _summon_holy_being_wrapper(god_type god, monster_type mon, int dur,
+ bool friendly, bool quiet)
{
- const int dur = std::min(2 + (random2(pow) / 4), 6);
-
const int monster =
create_monster(
mgen_data(mon, BEH_FRIENDLY, dur,
@@ -1633,25 +1631,35 @@ static bool _summon_holy_being_wrapper(int pow, god_type god,
if (!quiet)
{
- mprf("You are momentarily dazzled by a brilliant %s light.",
- (mon == MONS_DAEVA) ? "golden"
- : "white");
+ mprf("You are momentarily dazzled by a brilliant %slight.",
+ (mon == MONS_DAEVA) ? "golden " :
+ (mon == MONS_ANGEL) ? "white "
+ : "");
}
+
player_angers_monster(&menv[monster]);
return (true);
}
// TSO sends an angel for a follower.
-bool summon_angel(int pow, god_type god, bool quiet)
+bool summon_angel(int pow, god_type god, bool quiet,
+ bool force_hostile, bool permanent)
{
- return _summon_holy_being_wrapper(pow, god, MONS_ANGEL, quiet);
+ int dur = !permanent ? std::min(2 + (random2(pow) / 4), 6) : 0;
+
+ return _summon_holy_being_wrapper(god, MONS_ANGEL, dur, !force_hostile,
+ quiet);
}
// TSO sends a daeva for a follower.
-bool summon_daeva(int pow, god_type god, bool quiet)
+bool summon_daeva(int pow, god_type god, bool quiet,
+ bool force_hostile, bool permanent)
{
- return _summon_holy_being_wrapper(pow, god, MONS_DAEVA, quiet);
+ int dur = !permanent ? std::min(2 + (random2(pow) / 4), 6) : 0;
+
+ return _summon_holy_being_wrapper(god, MONS_DAEVA, dur, !force_hostile,
+ quiet);
}
bool cast_tukimas_dance(int pow, god_type god,