diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-25 13:23:23 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-25 13:23:23 +0000 |
commit | bdb45bf27b86ff63c5afdff311b4065c83faf37d (patch) | |
tree | cf3a914532ecc372932b8d897e8c9abf57fbe2a4 /crawl-ref/source/effects.cc | |
parent | c500c6b3582877a10bd362722bde81eb9b94b917 (diff) | |
download | crawl-ref-bdb45bf27b86ff63c5afdff311b4065c83faf37d.tar.gz crawl-ref-bdb45bf27b86ff63c5afdff311b4065c83faf37d.zip |
Merged in crawl.akrasiac.org patches (simple messaging, milestones). These take
effect only if compiled with -DDGAMELAUNCH.
Simple messaging: interacts with dgamelaunch's messaging facility allowing
viewers to send messages to the player.
Milestones: Writes a milestones.txt file (in xlogfile format) for things like
the player killing uniques, reaching the end of a dungeon branch, etc. (similar
to notes). milestones.txt is used for game announcements by an IRC bot.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1095 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index bd9e8452bf..5cbf2ed192 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -21,6 +21,7 @@ #include "beam.h" #include "direct.h" #include "dungeon.h" +#include "hiscores.h" #include "itemname.h" #include "itemprop.h" #include "items.h" @@ -128,11 +129,24 @@ void torment(int caster, int tx, int ty) apply_area_within_radius(torment_monsters, tx, ty, 0, 8, caster); } // end torment() -void banished(int gate_type) +static std::string who_banished(const std::string &who) { + return (who.empty()? who : " (" + who + ")"); +} + +void banished(int gate_type, const std::string &who) +{ +#ifdef MILESTONES + if (gate_type == DNGN_ENTER_ABYSS) + mark_milestone("abyss.enter", who_banished(who)); + else if (gate_type == DNGN_EXIT_ABYSS) + mark_milestone("abyss.exit", who_banished(who)); +#endif + if (gate_type == DNGN_ENTER_ABYSS) { - take_note(Note(NOTE_USER_NOTE, 0, 0, "Cast into the Abyss"), true); + const std::string what = "Cast into the Abyss" + who_banished(who); + take_note(Note(NOTE_USER_NOTE, 0, 0, what.c_str()), true); } down_stairs(true, you.your_level, gate_type); // heh heh |