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.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 657d8941c4..4afc154f26 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1180,13 +1180,15 @@ bool cast_summon_scorpions(int pow, god_type god)
// Creates a mixed swarm of typical swarming animals.
// Number, duration and friendlinesss depend on spell power.
-bool cast_summon_swarm(int pow, god_type god, bool force_hostile)
+bool cast_summon_swarm(int pow, god_type god,
+ bool force_hostile,
+ bool permanent)
{
bool success = false;
monster_type mon = MONS_PROGRAM_BUG;
- const int dur = std::min(2 + (random2(pow) / 4), 6);
+ const int dur = !permanent ? std::min(2 + (random2(pow) / 4), 6) : 0;
const int how_many = stepdown_value(2 + random2(pow)/10 + random2(pow)/25,
2, 2, 6, 8);