From: <j-...@us...> - 2007-08-22 16:58:16
|
Revision: 2027 http://crawl-ref.svn.sourceforge.net/crawl-ref/?rev=2027&view=rev Author: j-p-e-g Date: 2007-08-22 09:58:15 -0700 (Wed, 22 Aug 2007) Log Message: ----------- Added verbose hiscore output to char_dump, and mostly changed morgue information to past time, e.g. "Vehumet was exalted by your worship." (The exception being mutations.) I admit this was very low priority, but it has always bugged me. Included new options (explore_stop for gates and dump hiscore) in the relevant documentation. Modified Paths: -------------- trunk/crawl-ref/docs/crawl_manual.txt trunk/crawl-ref/docs/crawl_options.txt trunk/crawl-ref/init.txt trunk/crawl-ref/source/chardump.cc trunk/crawl-ref/source/initfile.cc trunk/crawl-ref/source/notes.cc trunk/crawl-ref/source/notes.h trunk/crawl-ref/source/ouch.cc trunk/crawl-ref/source/overmap.cc trunk/crawl-ref/source/religion.cc Modified: trunk/crawl-ref/docs/crawl_manual.txt =================================================================== --- trunk/crawl-ref/docs/crawl_manual.txt 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/docs/crawl_manual.txt 2007-08-22 16:58:15 UTC (rev 2027) @@ -38,13 +38,13 @@ If you have never played Crawl (or a similar game) before, you may want to try out a tutorial. These are accessed by entering 'T' in the class or species selection screens. You can choose among three quite popular -and rather straight forward combinations: a strong melee fighter with +and rather straightforward combinations: a strong melee fighter with the additional help of a mighty war god, a Centaur hunter using bow and arrows, and an Elven battle magician. The prime aim of the tutorials is to explain Crawl's interface. They do not focus on 'optimal' gameplay (also, many experienced players share different views on the latter). The tutorial has a special help screen (viewed by pressing '?') and ends -when you reach the fifth experience level. +when you reach the seventh experience level. Detailed instructions for playing Crawl follow. To simplify this manual, we assume that you use the standard distribution and that @@ -306,7 +306,7 @@ direction. They can be closed with the 'c' command. If there is no closed door in the indicated space, both Ctrl-direction and * direction will attempt to attack any monster which may be standing there (this is -the only way to attack a friendly creature hand-to- hand). If there is +the only way to attack a friendly creature hand-to-hand). If there is no creature there, you will attempt to disarm any trap in the target square. If there is apparently nothing there you will still attack it, just in case there's something invisible lurking around. @@ -1888,7 +1888,7 @@ Ranged combat skills: --------------------- Ranged Combat is the basic skill used when throwing or shooting things. -It affects in particular how effectively poisoned missiles are. There +It affects in particular how effective poisoned missiles are. There are a number of individual weapon skills for missile weapons as well: o Darts (and hand crossbows as optional laucnhers) @@ -2335,6 +2335,8 @@ kenku, lucky draconians, characters using Dragon form, or those levitating while wearing an amulet of controlled flight. +Held You are held in a net and cannot move freely and instead + only try to fight your way out of the net. Fire You are plagued with sticky fire. It will time out. Regen You regenerate: health points will increase at an unnaturally fast rate. This is only shown for temporary Modified: trunk/crawl-ref/docs/crawl_options.txt =================================================================== --- trunk/crawl-ref/docs/crawl_options.txt 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/docs/crawl_options.txt 2007-08-22 16:58:15 UTC (rev 2027) @@ -629,7 +629,7 @@ for instance). Default is false (no greedy explore) and using greedy explore may slow down the performance. -explore_stop = items,stairs,shops,altars +explore_stop = items,stairs,shops,altars,gates Explore will stop for one of these conditions. Whatever you set this option to, anything that stops travel will also stop explore. Multiple explore_stop lines are *not* cumulative! The last explore_stop line @@ -1090,7 +1090,7 @@ dump_message_count = 7 The number of last messages to be displayed in character dump files. -dump_order = header,stats,misc,notes,inventory,skills +dump_order = header,hiscore,stats,misc,notes,inventory,skills dump_order += spells,overview,mutations,messages,screenshot,kills Controls the order of sections in the dump. You can use multiple dump_order lines - all lines but the first must use dump_order += Modified: trunk/crawl-ref/init.txt =================================================================== --- trunk/crawl-ref/init.txt 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/init.txt 2007-08-22 16:58:15 UTC (rev 2027) @@ -126,7 +126,7 @@ # travel_avoid_terrain = shallow water # # explore_greedy = true -# explore_stop = items,stairs,shops,altars +# explore_stop = items,stairs,shops,altars,gates # tc_reachable = blue # tc_dangerous = cyan @@ -223,7 +223,7 @@ # dump_item_origins = all,artifacts,ego_arm,ego_weap,jewellery,runes # dump_item_origin_price = 100 # dump_message_count = 7 -# dump_order = header,stats,misc,notes,inventory,skills +# dump_order = header,hiscore,stats,misc,notes,inventory,skills # dump_order += spells,overview,mutations,messages,screenshot,kills ##### 5-b Notes ################################# Modified: trunk/crawl-ref/source/chardump.cc =================================================================== --- trunk/crawl-ref/source/chardump.cc 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/source/chardump.cc 2007-08-22 16:58:15 UTC (rev 2027) @@ -79,6 +79,7 @@ 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 @@ { "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_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_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 @@ 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 @@ && 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 @@ 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 @@ else { text += god_name(you.religion); - text += " is demanding penance."; - text += "\n"; + text += verb + " demanding penance.\n"; } } } @@ -616,7 +632,11 @@ 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 @@ 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,15 +741,16 @@ 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"; for (int j = 0; j < 52; j++) @@ -774,6 +804,7 @@ text += spell_line; } } + text += "\n\n"; } } // end dump_spells() @@ -792,6 +823,17 @@ 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); Modified: trunk/crawl-ref/source/initfile.cc =================================================================== --- trunk/crawl-ref/source/initfile.cc 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/source/initfile.cc 2007-08-22 16:58:15 UTC (rev 2027) @@ -740,8 +740,8 @@ 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(); Modified: trunk/crawl-ref/source/notes.cc =================================================================== --- trunk/crawl-ref/source/notes.cc 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/source/notes.cc 2007-08-22 16:58:15 UTC (rev 2027) @@ -110,7 +110,8 @@ 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 @@ << 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; Modified: trunk/crawl-ref/source/notes.h =================================================================== --- trunk/crawl-ref/source/notes.h 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/source/notes.h 2007-08-22 16:58:15 UTC (rev 2027) @@ -39,6 +39,7 @@ 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 }; Modified: trunk/crawl-ref/source/ouch.cc =================================================================== --- trunk/crawl-ref/source/ouch.cc 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/source/ouch.cc 2007-08-22 16:58:15 UTC (rev 2027) @@ -843,6 +843,11 @@ 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); Modified: trunk/crawl-ref/source/overmap.cc =================================================================== --- trunk/crawl-ref/source/overmap.cc 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/source/overmap.cc 2007-08-22 16:58:15 UTC (rev 2027) @@ -193,7 +193,10 @@ { 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 @@ // 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 @@ // 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 @@ } 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; } Modified: trunk/crawl-ref/source/religion.cc =================================================================== --- trunk/crawl-ref/source/religion.cc 2007-08-22 11:02:10 UTC (rev 2026) +++ trunk/crawl-ref/source/religion.cc 2007-08-22 16:58:15 UTC (rev 2027) @@ -710,7 +710,10 @@ { 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" : This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |