diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-11-23 15:03:49 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-11-23 15:04:33 +0100 |
commit | 9a861e3dc412e25b7693ce272f72020964dfcdec (patch) | |
tree | 0938a1ef62f5aa639085bbe89decdc9fe098d770 | |
parent | 3bea6e2e7aadb7df468b8a00c3a8fb42dde3dfb5 (diff) | |
download | crawl-ref-9a861e3dc412e25b7693ce272f72020964dfcdec.tar.gz crawl-ref-9a861e3dc412e25b7693ce272f72020964dfcdec.zip |
Give a message and FX when you banish people.
-rw-r--r-- | crawl-ref/source/initfile.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/main.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/message.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/monster.cc | 18 | ||||
-rw-r--r-- | crawl-ref/source/mpr.h | 1 |
5 files changed, 25 insertions, 2 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 022b18caef..3c2e79b500 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -112,7 +112,7 @@ static const std::string message_channel_names[ NUM_MESSAGE_CHANNELS ] = "warning", "food", "recovery", "sound", "talk", "talk_visual", "intrinsic_gain", "mutation", "monster_spell", "monster_enchant", "friend_spell", "friend_enchant", "monster_damage", "monster_target", - "rotten_meat", "equipment", "floor", "multiturn", "examine", + "banishment", "rotten_meat", "equipment", "floor", "multiturn", "examine", "examine_filter", "diagnostic", "error", "tutorial" }; diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc index 5449141656..347fac22f4 100644 --- a/crawl-ref/source/main.cc +++ b/crawl-ref/source/main.cc @@ -2690,7 +2690,7 @@ static void _check_banished() you.banished = false; if (you.level_type != LEVEL_ABYSS) { - mpr("You are cast into the Abyss!"); + mpr("You are cast into the Abyss!", MSGCH_BANISHMENT); more(); banished(DNGN_ENTER_ABYSS, you.banished_by); } diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index 5fe386c565..440221e2b6 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -338,6 +338,10 @@ int channel_to_colour( msg_channel_type channel, int param ) ret = LIGHTMAGENTA; break; + case MSGCH_BANISHMENT: + ret = MAGENTA; + break; + case MSGCH_MONSTER_DAMAGE: ret = ((param == MDAM_DEAD) ? RED : (param >= MDAM_SEVERELY_DAMAGED) ? LIGHTRED : 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 diff --git a/crawl-ref/source/mpr.h b/crawl-ref/source/mpr.h index 5ccc14774f..e2eb48451d 100644 --- a/crawl-ref/source/mpr.h +++ b/crawl-ref/source/mpr.h @@ -33,6 +33,7 @@ enum msg_channel_type MSGCH_FRIEND_ENCHANT, // allied monsters' enchantments up and down MSGCH_MONSTER_DAMAGE, // monster damage reports (param is level) MSGCH_MONSTER_TARGET, // message marking the monster as a target + MSGCH_BANISHMENT, // Abyss-related messages MSGCH_ROTTEN_MEAT, // messages about chunks/corpses becoming rotten MSGCH_EQUIPMENT, // equipment listing messages MSGCH_FLOOR_ITEMS, // like equipment, but lists of floor items |