summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-20 03:35:47 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-20 03:35:47 +0000
commit76045c6d3d8d2fb15acf777d5998ef26aab764fa (patch)
tree9cfe433a26ca922e960eb71a5aaf74f0637239ab /crawl-ref/source/spells2.cc
parentd92b5fb96be89a88b46a1061d4aba731bd56cd2b (diff)
downloadcrawl-ref-76045c6d3d8d2fb15acf777d5998ef26aab764fa.tar.gz
crawl-ref-76045c6d3d8d2fb15acf777d5998ef26aab764fa.zip
Add various patches of mine:
[1824221] don't give Yred-worshipping demonspawn the "raise dead" mutation [1829258] remove wrongly hardcoded exp-draining resistance for undead [1829691] typo fixes [1830030] clean up random god servant handling [1829890] fix divine retribution messages, generalize berserker summoning git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2877 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 5b1f6b5350..00bfd13163 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1480,12 +1480,13 @@ void summon_ice_beast_etc(int pow, int ibc, bool divine_gift)
false, false, false, true);
} // end summon_ice_beast_etc()
-// Trog sends some fighting buddies for his followers
-void summon_berserker()
+// Trog sends some fighting buddies for his followers (or enemies if
+// god_gift is false)
+bool summon_berserker(int pow, bool god_gift)
{
- beh_type beha = BEH_GOD_GIFT;
- int pow = you.piety + random2(you.piety/4) - random2(you.piety/4);
+ beh_type beha = (god_gift) ? BEH_GOD_GIFT : BEH_HOSTILE;
int numsc = std::min(2 + (random2(pow) / 4), 6);
+ bool success = false;
monster_type mon = MONS_TROLL;
@@ -1540,6 +1541,8 @@ void summon_berserker()
if (mons != -1)
{
+ success = true;
+
monsters *summon = &menv[mons];
summon->go_berserk(false);
mon_enchant berserk = summon->get_ench(ENCH_BERSERK);
@@ -1553,6 +1556,8 @@ void summon_berserker()
summon->update_ench(berserk);
summon->update_ench(abj);
}
+
+ return success;
} // end summon_berserker()
bool summon_swarm( int pow, bool unfriendly, bool god_gift )