From 9a861e3dc412e25b7693ce272f72020964dfcdec Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Mon, 23 Nov 2009 15:03:49 +0100 Subject: Give a message and FX when you banish people. --- crawl-ref/source/monster.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crawl-ref/source/monster.cc') 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 -- cgit v1.2.3-54-g00ecf