summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-23 15:03:49 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-23 15:04:33 +0100
commit9a861e3dc412e25b7693ce272f72020964dfcdec (patch)
tree0938a1ef62f5aa639085bbe89decdc9fe098d770 /crawl-ref/source/monster.cc
parent3bea6e2e7aadb7df468b8a00c3a8fb42dde3dfb5 (diff)
downloadcrawl-ref-9a861e3dc412e25b7693ce272f72020964dfcdec.tar.gz
crawl-ref-9a861e3dc412e25b7693ce272f72020964dfcdec.zip
Give a message and FX when you banish people.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index c5c018c8f5..7faa489318 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -6,6 +6,7 @@
#include "AppHdr.h"
+#include "areas.h"
#include "beam.h"
#include "cloud.h"
#include "coordit.h"
@@ -2765,7 +2766,24 @@ void monsters::expose_to_element(beam_type flavour, int strength)
void monsters::banish(const std::string &)
{
+ coord_def old_pos = pos();
+
+ if (!silenced(pos()) && can_speak())
+ simple_monster_message(this, (" screams as " + pronoun(PRONOUN_OBJECTIVE)
+ + " is devoured by a tear in reality.").c_str(),
+ MSGCH_BANISHMENT);
+ else
+ simple_monster_message(this, " is devoured by a tear in reality.",
+ MSGCH_BANISHMENT);
monster_die(this, KILL_RESET, NON_MONSTER);
+
+ place_cloud(CLOUD_TLOC_ENERGY, old_pos, 5 + random2(8), KC_OTHER);
+ for (adjacent_iterator ai(old_pos); ai; ++ai)
+ if (!feat_is_solid(grd(*ai)) && env.cgrid(*ai) == EMPTY_CLOUD
+ && coinflip())
+ {
+ place_cloud(CLOUD_TLOC_ENERGY, *ai, 1 + random2(8), KC_OTHER);
+ }
}
bool monsters::has_spells() const