summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-03 11:29:17 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-03 11:29:17 +0000
commit8a7f4ec404cbbb329622a85c56886749af1b7af4 (patch)
tree6358a9d65e90407e05cc5a776841fe7437eb5085 /crawl-ref/source
parent2a26233126e10117267fc9393539af56f66b0116 (diff)
downloadcrawl-ref-8a7f4ec404cbbb329622a85c56886749af1b7af4.tar.gz
crawl-ref-8a7f4ec404cbbb329622a85c56886749af1b7af4.zip
Implement [2480452] following dpeg's suggestion:
You can't go berserk while mesmerised; being berserk provides immunity to mesmerisation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8880 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/monstuff.cc7
-rw-r--r--crawl-ref/source/player.cc7
2 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 6ca599a1a7..87cb8ae73e 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -5680,12 +5680,15 @@ static bool _handle_special_ability(monsters *monster, bolt & beem)
|| mons_is_fleeing(monster)
|| mons_is_pacified(monster)
|| mons_friendly(monster)
- || silenced(monster->pos())
- || silenced(you.pos()))
+ || !player_can_hear(monster->pos()))
{
break;
}
+ // Don't even try on berserkers. Mermaids know their limits.
+ if (you.duration[DUR_BERSERKER])
+ break;
+
// Reduce probability because of spamminess.
if (you.species == SP_MERFOLK && !one_chance_in(4))
break;
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 22ea31ecc9..8fae69b5f7 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -6573,7 +6573,14 @@ bool player::can_go_berserk(bool verbose) const
{
if (verbose)
mpr("You're too exhausted to go berserk.");
+ // or else they won't notice -- no message here
+ return (false);
+ }
+ if (you.duration[DUR_MESMERISED])
+ {
+ if (verbose)
+ mpr("You are too mesmerised to rage.");
// or else they won't notice -- no message here
return (false);
}