summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/chardump.cc94
-rw-r--r--crawl-ref/source/initfile.cc4
-rw-r--r--crawl-ref/source/notes.cc6
-rw-r--r--crawl-ref/source/notes.h1
-rw-r--r--crawl-ref/source/ouch.cc5
-rw-r--r--crawl-ref/source/overmap.cc22
-rw-r--r--crawl-ref/source/religion.cc5
7 files changed, 103 insertions, 34 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 1805077d84..c5f3abebaf 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -79,6 +79,7 @@ static void sdump_screenshot(dump_params &);
static void sdump_kills(dump_params &);
static void sdump_newline(dump_params &);
static void sdump_overview(dump_params &);
+static void sdump_hiscore(dump_params &);
static void sdump_separator(dump_params &);
#ifdef CLUA_BINDINGS
static void sdump_lua(dump_params &);
@@ -126,6 +127,7 @@ static dump_section_handler dump_handlers[] = {
{ "screenshot", sdump_screenshot },
{ "kills", sdump_kills },
{ "overview", sdump_overview },
+ { "hiscore", sdump_hiscore },
// Conveniences for the .crawlrc artist.
{ "", sdump_newline },
@@ -189,13 +191,15 @@ static void sdump_stats(dump_params &par)
static void sdump_burden(dump_params &par)
{
+ std::string verb = par.se? "were" : "are";
+
switch (you.burden_state)
{
case BS_OVERLOADED:
- par.text += "You are overloaded with stuff.\n";
+ par.text += "You " + verb + " overloaded with stuff.\n";
break;
case BS_ENCUMBERED:
- par.text += "You are encumbered.\n";
+ par.text += "You " + verb + " encumbered.\n";
break;
default:
break;
@@ -204,7 +208,13 @@ static void sdump_burden(dump_params &par)
static void sdump_hunger(dump_params &par)
{
- par.text += std::string("You are ") + hunger_level() + ".\n\n";
+ if (par.se)
+ par.text += "You were ";
+ else
+ par.text += "You are ";
+
+ par.text += hunger_level();
+ par.text += ".\n\n";
}
static void sdump_transform(dump_params &par)
@@ -212,37 +222,39 @@ static void sdump_transform(dump_params &par)
std::string &text(par.text);
if (you.attribute[ATTR_TRANSFORMATION])
{
+ std::string verb = par.se? "were" : "are";
+
switch (you.attribute[ATTR_TRANSFORMATION])
{
case TRAN_SPIDER:
- text += "You are in spider-form.";
+ text += "You " + verb + " in spider-form.";
break;
case TRAN_BAT:
- text += "You are in ";
+ text += "You " + verb + " in ";
if (you.species == SP_VAMPIRE)
text += "vampire ";
text += "bat-form.";
break;
case TRAN_BLADE_HANDS:
- text += "Your hands are blades.";
+ text += "Your hands " + verb + " blades.";
break;
case TRAN_STATUE:
- text += "You are a stone statue.";
+ text += "You " + verb + " a stone statue.";
break;
case TRAN_ICE_BEAST:
- text += "You are a creature of crystalline ice.";
+ text += "You " + verb + " a creature of crystalline ice.";
break;
case TRAN_DRAGON:
- text += "You are a fearsome dragon!";
+ text += "You " + verb + " a fearsome dragon!";
break;
case TRAN_LICH:
- text += "You are in lich-form.";
+ text += "You " + verb + " in lich-form.";
break;
case TRAN_SERPENT_OF_HELL:
- text += "You are a huge, demonic serpent!";
+ text += "You " + verb + " a huge, demonic serpent!";
break;
case TRAN_AIR:
- text += "You are a cloud of diffuse gas.";
+ text += "You " + verb + " a cloud of diffuse gas.";
break;
}
@@ -410,6 +422,8 @@ static void sdump_location(dump_params &par)
&& you.where_are_you == BRANCH_MAIN_DUNGEON
&& you.level_type == LEVEL_DUNGEON)
par.text += "You escaped";
+ else if (par.se)
+ par.text += "You were " + prep_branch_level_name();
else
par.text += "You are " + prep_branch_level_name();
@@ -422,11 +436,14 @@ static void sdump_religion(dump_params &par)
std::string &text(par.text);
if (you.religion != GOD_NO_GOD)
{
- text += "You worship ";
+ if (par.se)
+ text += "You worshipped ";
+ else
+ text += "You worship ";
text += god_name(you.religion);
- text += ".";
- text += "\n";
+ text += ".\n";
+ std::string verb = par.se? "was" : "is";
if (!player_under_penance())
{
text += god_prayer_reaction();
@@ -435,8 +452,7 @@ static void sdump_religion(dump_params &par)
else
{
text += god_name(you.religion);
- text += " is demanding penance.";
- text += "\n";
+ text += verb + " demanding penance.\n";
}
}
}
@@ -616,7 +632,11 @@ static void sdump_skills(dump_params &par)
std::string &text(par.text);
char tmp_quant[20];
- text += " You have ";
+ if (par.se)
+ text += " You had ";
+ else
+ text += " You have ";
+
itoa( you.exp_available, tmp_quant, 10 );
text += tmp_quant;
text += " experience left.";
@@ -696,13 +716,22 @@ static void sdump_spells(dump_params &par)
int spell_levels = player_spell_levels();
+ std::string verb = par.se? "had" : "have";
+
if (spell_levels == 1)
- text += "You have one spell level left.";
+ text += "You " + verb + " one spell level left.";
else if (spell_levels == 0)
- text += "You cannot memorise any spells.";
+ {
+ verb = par.se? "couldn't" : "cannot";
+
+ text += "You " + verb + " memorise any spells.";
+ }
else
{
- text += "You have ";
+ if (par.se)
+ text += "You had ";
+ else
+ text += "You have ";
itoa( spell_levels, tmp_quant, 10 );
text += tmp_quant;
text += " spell levels left.";
@@ -712,14 +741,15 @@ static void sdump_spells(dump_params &par)
if (!you.spell_no)
{
- text += "You don't know any spells.";
- text += "\n";
-
+ verb = par.se? "didn't" : "don't";
+
+ text += "You " + verb + " know any spells.\n\n";
}
else
{
- text += "You know the following spells:" "\n";
- text += "\n";
+ verb = par.se? "knew" : "know";
+
+ text += "You " + verb + " the following spells:\n\n";
text += " Your Spells Type Power Success Level" "\n";
@@ -774,6 +804,7 @@ static void sdump_spells(dump_params &par)
text += spell_line;
}
}
+ text += "\n\n";
}
} // end dump_spells()
@@ -792,6 +823,17 @@ static void sdump_overview(dump_params &par)
par.text += "\n\n";
}
+static void sdump_hiscore(dump_params &par)
+{
+ if (!par.se)
+ return;
+
+ std::string hiscore = hiscores_format_single_long( *(par.se), true );
+ trim_string(hiscore);
+ par.text += hiscore;
+ par.text += "\n\n";
+}
+
static void sdump_mutations(dump_params &par)
{
std::string &text(par.text);
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 6a48aea5d2..3f7f4493ac 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -740,8 +740,8 @@ void game_options::reset_options()
extra_levels.clear();
dump_order.clear();
- new_dump_fields("header,stats,misc,inventory,skills,"
- "spells,,overview,mutations,messages,screenshot,"
+ new_dump_fields("header,hiscore,stats,misc,inventory,skills,"
+ "spells,overview,mutations,messages,screenshot,"
"kills,notes");
hp_colour.clear();
diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc
index 1d913205ab..ca74093ad0 100644
--- a/crawl-ref/source/notes.cc
+++ b/crawl-ref/source/notes.cc
@@ -110,7 +110,8 @@ static bool is_noteworthy( const Note& note )
note.type == NOTE_USER_NOTE ||
note.type == NOTE_MESSAGE ||
note.type == NOTE_LOSE_GOD ||
- note.type == NOTE_MOLLIFY_GOD )
+ note.type == NOTE_MOLLIFY_GOD ||
+ note.type == NOTE_DEATH )
return true;
/* never noteworthy, hooked up for fun or future use */
@@ -305,6 +306,9 @@ std::string Note::describe( bool when, bool where, bool what ) const
<< mutation_name(static_cast<mutation_type>(first),
second == 3 ? 3 : second+1);
break;
+ case NOTE_DEATH:
+ result << name;
+ break;
case NOTE_USER_NOTE:
result << name;
break;
diff --git a/crawl-ref/source/notes.h b/crawl-ref/source/notes.h
index 2b6b4bc584..d0445ce827 100644
--- a/crawl-ref/source/notes.h
+++ b/crawl-ref/source/notes.h
@@ -39,6 +39,7 @@ enum NOTE_TYPES
NOTE_MESSAGE, /* needs: message string */
NOTE_LOSE_GOD, /* needs: god id */
NOTE_MOLLIFY_GOD, /* needs: god id */
+ NOTE_DEATH, /* needs: death cause */
NOTE_NUM_TYPES
};
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 62a3500289..6675ba667d 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -843,6 +843,11 @@ void ouch( int dam, int death_source, kill_method_type death_type,
crawl_state.need_save = false;
crawl_state.updating_scores = true;
+ take_note(
+ Note( NOTE_DEATH, you.hp, you.hp_max,
+ scorefile_entry(dam, death_source, death_type, aux)
+ .death_description(scorefile_entry::DDV_NORMAL).c_str()), true );
+
// prevent bogus notes
activate_notes(false);
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc
index 078e3f3415..ae3155fed9 100644
--- a/crawl-ref/source/overmap.cc
+++ b/crawl-ref/source/overmap.cc
@@ -193,7 +193,10 @@ std::string overview_description_string()
{
if ( !branchcount )
{
- disp += "\n<green>Branches:</green> (use <white>Ctrl-G</white> to reach them)\n";
+ disp += "\n<green>Branches:</green>";
+ if (crawl_state.need_save || !crawl_state.updating_scores)
+ disp += " (use <white>Ctrl-G</white> to reach them)";
+ disp += EOL;
seen_anything = true;
}
@@ -220,7 +223,10 @@ std::string overview_description_string()
// we loop through everything a dozen times, oh well
if ( !notable_altars.empty() )
{
- disp += "\n<green>Altars:</green> (use <white>Ctrl-F \"altar\"</white> to reach them)\n";
+ disp += "\n<green>Altars:</green>";
+ if (crawl_state.need_save || !crawl_state.updating_scores)
+ disp += " (use <white>Ctrl-F \"altar\"</white> to reach them)";
+ disp += EOL;
seen_anything = true;
}
@@ -266,7 +272,10 @@ std::string overview_description_string()
// print shops
if (!shops_present.empty())
{
- disp +="\n<green>Shops:</green> (use <white>Ctrl-F \"shop\"</white> to reach them)\n";
+ disp +="\n<green>Shops:</green>";
+ if (crawl_state.need_save || !crawl_state.updating_scores)
+ disp += " (use <white>Ctrl-F \"shop\"</white> to reach them)";
+ disp += EOL;
seen_anything = true;
}
last_id.depth = 10000;
@@ -349,7 +358,12 @@ std::string overview_description_string()
}
if (!seen_anything)
- disp += "You haven't discovered anything interesting yet.";
+ {
+ if (crawl_state.need_save || !crawl_state.updating_scores)
+ disp += "You haven't discovered anything interesting yet.";
+ else
+ disp += "You didn't discover anything interesting.";
+ }
return disp;
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 9ac09230fd..9ed248847c 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -710,7 +710,10 @@ std::string god_prayer_reaction()
{
std::string result;
result += god_name(you.religion);
- result += " is ";
+ if (!crawl_state.need_save && crawl_state.updating_scores)
+ result += " was ";
+ else
+ result += " is ";
result +=
(you.piety > 130) ? "exalted by your worship" :