summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-12 22:08:45 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-12 22:11:20 +1000
commiteae49c6fcb7586e447e4b2fe2a7f2eb5b6bb7a2e (patch)
tree8a9ca92bcf32762acccf8a43f9454006aa9ea18a /crawl-ref/source/view.cc
parent078019644214628520c8116a9b4a16f30d8fadf2 (diff)
downloadcrawl-ref-eae49c6fcb7586e447e4b2fe2a7f2eb5b6bb7a2e.tar.gz
crawl-ref-eae49c6fcb7586e447e4b2fe2a7f2eb5b6bb7a2e.zip
Further tweaks to Dowan/Duvessa death effects.
New MF_GOING_BERSERK flag: monsters with this flag will go berserk the next turn after they see you. Remove sight limitations from Dowan/Duvessa death effects. Flavour messages will now always occur, as will Dowan's fear effect, even if you cannot see him. Duvessa's berserk effect is only triggered if you are in her line of sight upon Dowan's death. If you are not, she's given the MF_GOING_BERSERK flag, and will go berserk when she next sees you. Reasoning is that they have some magical ability to sense the other's death.
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 35efb6d0a2..8bcadd08fe 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -139,6 +139,15 @@ void monster_grid_updates()
beogh_follower_convert(*mi);
slime_convert(*mi);
fedhas_neutralise(*mi);
+
+ // XXX: Probably quite hackish. Allows for monsters going berserk when
+ // they see the player. Currently only used for Duvessa, see the
+ // function _elven_twin_dies in mon-stuff.cc.
+ if (mi->flags & MF_GOING_BERSERK)
+ {
+ mi->flags &= ~MF_GOING_BERSERK;
+ mi->go_berserk(true);
+ }
}
}