summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc33
1 files changed, 26 insertions, 7 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 8c9ee35340..7750320fdf 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -413,14 +413,33 @@ bool cast_sublimation_of_blood(int pow)
return (success);
}
-bool summon_shadow(bool god_gift, bool force_hostile)
+bool summon_shadows(int how_many, bool god_gift,
+ bool force_hostile)
{
- return (create_monster(
- mgen_data(MONS_SHADOW,
- !force_hostile ? BEH_FRIENDLY : BEH_HOSTILE,
- 2, you.pos(),
- !force_hostile ? you.pet_target : MHITYOU,
- (god_gift ? MG_GOD_GIFT : 0))) != -1);
+ bool success = false;
+
+ mpr(how_many > 1 ? "Flickering shadows surround you."
+ : "A nearby shadow flickers.");
+
+ for (int i = 0; i < how_many; ++i)
+ {
+ int monster =
+ create_monster(
+ mgen_data(MONS_SHADOW,
+ !force_hostile ? BEH_FRIENDLY : BEH_HOSTILE,
+ 2, you.pos(),
+ !force_hostile ? you.pet_target : MHITYOU,
+ (god_gift ? MG_GOD_GIFT : 0) | MG_FORCE_BEH));
+
+ if (monster != -1)
+ {
+ success = true;
+
+ player_angers_monster(&menv[monster]);
+ }
+ }
+
+ return (success);
}
bool cast_call_imp(int pow, bool god_gift)