From 10210317e5e2c2f49992a374363753043e01e1f2 Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 30 Dec 2006 12:36:46 +0000 Subject: Made Abyss banishment noteworthy (somewhat hackish, uses USER_NOTE.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@741 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/abl-show.cc | 4 ++++ crawl-ref/source/effects.cc | 4 ++++ crawl-ref/source/notes.cc | 4 ++-- crawl-ref/source/notes.h | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index 25014497b9..95821ef64d 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -42,6 +42,7 @@ #include "message.h" #include "misc.h" #include "monplace.h" +#include "notes.h" #include "player.h" #include "religion.h" #include "skills.h" @@ -1221,7 +1222,10 @@ bool activate_ability(void) mpr("That doesn't work from Pandemonium."); return false; } + + activate_notes(false); // this banishment shouldn't be noted banished(DNGN_ENTER_ABYSS); + activate_notes(true); break; //jmf: intended as invocations from evil god(s): diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 81c7edb13c..3123e073a8 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -30,6 +30,7 @@ #include "mon-util.h" #include "mutation.h" #include "newgame.h" +#include "notes.h" #include "ouch.h" #include "player.h" #include "randart.h" @@ -134,6 +135,9 @@ void banished(unsigned char gate_type) // this is to ensure that you're standing on a suitable space (67) grd[you.x_pos][you.y_pos] = gate_type; + if ( gate_type == DNGN_ENTER_ABYSS ) + take_note(Note(NOTE_USER_NOTE, 0, 0, "Cast into the Abyss"), true); + down_stairs(true, you.your_level, true); // heh heh untag_followers(); // safety } // end banished() diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc index a7c16bfe6c..94af4546e7 100644 --- a/crawl-ref/source/notes.cc +++ b/crawl-ref/source/notes.cc @@ -352,8 +352,8 @@ bool notes_are_active() { return notes_active; } -void take_note( const Note& note ) { - if ( notes_active && is_noteworthy( note ) ) +void take_note( const Note& note, bool force ) { + if ( notes_active && (force || is_noteworthy(note)) ) note_list.push_back( note ); } diff --git a/crawl-ref/source/notes.h b/crawl-ref/source/notes.h index adc67e531e..6dfa327992 100644 --- a/crawl-ref/source/notes.h +++ b/crawl-ref/source/notes.h @@ -60,7 +60,7 @@ struct Note { extern std::vector note_list; void activate_notes( bool active ); bool notes_are_active(); -void take_note( const Note& note ); +void take_note( const Note& note, bool force = false ); void save_notes( FILE* fp ); void load_notes( FILE* fp ); void make_user_note(); -- cgit v1.2.3-54-g00ecf