summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/notes.cc2
-rw-r--r--crawl-ref/source/ouch.cc31
-rw-r--r--crawl-ref/source/ouch.h2
-rw-r--r--crawl-ref/source/player.cc7
-rw-r--r--crawl-ref/source/tutorial.cc4
5 files changed, 29 insertions, 17 deletions
diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc
index c675b30639..e92c71ff3d 100644
--- a/crawl-ref/source/notes.cc
+++ b/crawl-ref/source/notes.cc
@@ -130,7 +130,9 @@ static bool is_noteworthy( const Note& note )
/* hp noteworthiness is handled in its own function */
if ( note.type == NOTE_HP_CHANGE &&
!is_noteworthy_hp(note.first, note.second) )
+ {
return false;
+ }
/* skills are noteworthy if in the skill value list or if
it's a new maximal skill (depending on options) */
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index ed81b0e3bf..b388b4e500 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -732,7 +732,7 @@ static void xom_checks_damage(kill_method_type death_type,
// death_source should be set to zero for non-monsters {dlb}
void ouch( int dam, int death_source, kill_method_type death_type,
- const char *aux )
+ const char *aux, bool see_source )
{
ait_hp_loss hpl(dam, death_type);
interrupt_activity( AI_HP_LOSS, &hpl );
@@ -797,18 +797,25 @@ void ouch( int dam, int death_source, kill_method_type death_type,
}
xom_checks_damage(death_type, dam, death_source);
- return;
- }
-
- take_note(
- Note(
- NOTE_HP_CHANGE,
- you.hp,
- you.hp_max,
- scorefile_entry(dam, death_source, death_type, aux, true)
- .death_description(scorefile_entry::DDV_TERSE)
- .c_str()) );
+ // for note taking
+ std::string damage_desc = "";
+ if (!see_source)
+ {
+ snprintf(info, INFO_SIZE, "something (%d)", dam);
+ damage_desc = info;
+ }
+ else
+ {
+ damage_desc = scorefile_entry(dam, death_source, death_type, aux, true)
+ .death_description(scorefile_entry::DDV_TERSE);
+ }
+
+ take_note(
+ Note(NOTE_HP_CHANGE, you.hp, you.hp_max, damage_desc.c_str()) );
+
+ return;
+ } // else hp <= 0
}
#ifdef WIZARD
diff --git a/crawl-ref/source/ouch.h b/crawl-ref/source/ouch.h
index 42dd31c35e..c1c063bdfb 100644
--- a/crawl-ref/source/ouch.h
+++ b/crawl-ref/source/ouch.h
@@ -96,7 +96,7 @@ void scrolls_burn(char burn_strength, char target_class);
* ouch - output - religion - spells - spells2 - spells4
* *********************************************************************** */
void ouch(int dam, int death_source, kill_method_type death_type,
- const char *aux = NULL);
+ const char *aux = NULL, bool see_source = true);
// last updated 12may2000 {dlb}
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index cbb42c5678..5f33f10c4d 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5705,9 +5705,12 @@ void player::teleport(bool now, bool abyss_shift)
void player::hurt(const actor *agent, int amount)
{
+ const monsters *mon = dynamic_cast<const monsters*>(agent);
if (agent->atype() == ACT_MONSTER)
- ouch(amount, monster_index( dynamic_cast<const monsters*>(agent) ),
- KILLED_BY_MONSTER);
+ {
+ ouch(amount, monster_index( mon ),
+ KILLED_BY_MONSTER, "", player_monster_visible(mon));
+ }
else
{
// Should never happen!
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index a0642733cb..38cb5fe1c6 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -979,7 +979,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
more();
text << "\n\nAs a worshipper of "
<< god_name(GOD_TROG)
- << ", though, you might instead wish to burn this tome of "
+ << ", though, you might instead wish to burn those tomes of "
"hated magic by using the corresponding "
"<w>a<magenta>bility.";
}
@@ -996,7 +996,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
if (Options.tutorial_type == TUT_BERSERK_CHAR)
{
text << "\nAs you're already trained in Axes you should stick "
- "with these. Checking other axes can be worthwhile.";
+ "with these. Checking other axes can be worthwhile.";
}
break;