From a55c0a4160710417bb79deedf0bb63f824e79067 Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 30 Nov 2006 09:48:24 +0000 Subject: Noted and hooked god mollification. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@530 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/notes.cc | 9 +++++++-- crawl-ref/source/notes.h | 6 +++--- crawl-ref/source/religion.cc | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc index 75880e47f3..a3a9d40c10 100644 --- a/crawl-ref/source/notes.cc +++ b/crawl-ref/source/notes.cc @@ -138,9 +138,10 @@ static bool is_noteworthy( const Note& note ) { note.type == NOTE_POLY_MONSTER || note.type == NOTE_USER_NOTE || note.type == NOTE_MESSAGE || - note.type == NOTE_LOSE_GOD ) + note.type == NOTE_LOSE_GOD || + note.type == NOTE_MOLLIFY_GOD ) return true; - + /* never noteworthy, hooked up for fun or future use */ if ( note.type == NOTE_GET_ITEM || note.type == NOTE_MP_CHANGE || @@ -284,6 +285,10 @@ std::string Note::describe( bool when, bool where, bool what ) const { snprintf(buf, sizeof buf, "Fell from the grace of %s", god_name(first)); break; + case NOTE_MOLLIFY_GOD: + snprintf(buf, sizeof buf, "Was forgiven by %s", + god_name(first)); + break; case NOTE_GOD_GIFT: snprintf(buf, sizeof buf, "Received a gift from %s", god_name(first)); diff --git a/crawl-ref/source/notes.h b/crawl-ref/source/notes.h index 6a604e485c..adc67e531e 100644 --- a/crawl-ref/source/notes.h +++ b/crawl-ref/source/notes.h @@ -29,15 +29,15 @@ enum NOTE_TYPES { NOTE_GET_MUTATION, /* needs: mutation idx */ NOTE_LOSE_MUTATION, /* needs: mutation idx */ NOTE_ID_ITEM, /* needs: item name (string) */ - /* NOT HOOKED YET */ - NOTE_GET_ITEM, /* needs: item name (string) */ + NOTE_GET_ITEM, /* needs: item name (string) NOT HOOKED */ NOTE_GAIN_SKILL, /* needs: skill id, level */ NOTE_SEEN_MONSTER, /* needs: monster name (string) */ NOTE_KILL_MONSTER, /* needs: monster name (string) */ NOTE_POLY_MONSTER, /* needs: monster name (string) */ NOTE_USER_NOTE, /* needs: description string */ - NOTE_MESSAGE, /* needs: message string */ + NOTE_MESSAGE, /* needs: message string */ NOTE_LOSE_GOD, /* needs: god id */ + NOTE_MOLLIFY_GOD, /* needs: god id */ NOTE_NUM_TYPES }; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 403bbf06fd..72089060fd 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -91,6 +91,7 @@ void dec_penance(int god, int val) if (you.penance[god] <= val) { simple_god_message(" seems mollified.", god); + take_note(Note(NOTE_MOLLIFY_GOD, god)); you.penance[god] = 0; } else -- cgit v1.2.3-54-g00ecf