summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-30 18:08:26 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-30 18:08:26 +0000
commite506e3ecf0f3fc0a00dc385dcfe99a462b6e1962 (patch)
tree1ce625e8842b58a3a868bc6e957a78ea9e51bc7e /crawl-ref/source
parent55cd93aada9e358fe27cb9ba15396bf965d5ef9d (diff)
downloadcrawl-ref-e506e3ecf0f3fc0a00dc385dcfe99a462b6e1962.tar.gz
crawl-ref-e506e3ecf0f3fc0a00dc385dcfe99a462b6e1962.zip
Make Zin's retribution-summoned plagues permanent.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7309 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/religion.cc2
-rw-r--r--crawl-ref/source/spells2.cc6
-rw-r--r--crawl-ref/source/spells2.h5
3 files changed, 7 insertions, 6 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index a24a26ce4f..7db608706a 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3662,7 +3662,7 @@ static bool _zin_retribution()
else
{
bool success = cast_summon_swarm(you.experience_level * 20,
- god, true);
+ god, true, true);
simple_god_message(success ? " sends a plague down upon you!"
: "'s plague fails to arrive.", god);
}
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);
diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h
index 66b4300281..34cd7a4271 100644
--- a/crawl-ref/source/spells2.h
+++ b/crawl-ref/source/spells2.h
@@ -52,10 +52,9 @@ bool cast_summon_small_mammals(int pow, god_type god = GOD_NO_GOD);
bool cast_sticks_to_snakes(int pow, god_type god = GOD_NO_GOD);
bool cast_summon_scorpions(int pow, god_type god = GOD_NO_GOD);
bool cast_summon_swarm(int pow, god_type god = GOD_NO_GOD,
- bool force_hostile = false);
-
+ bool force_hostile = false,
+ bool permanent = false);
bool cast_call_canine_familiar(int pow, god_type god = GOD_NO_GOD);
-
bool cast_summon_elemental(int pow, god_type god = GOD_NO_GOD,
monster_type restricted_type = MONS_PROGRAM_BUG,
int unfriendly = 2);