From 13b1121d87549ae666939228fd7cf897c05354c1 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sun, 1 Apr 2007 07:20:19 +0000 Subject: Merge of tutorial cleanup and portable altar fix. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.2@1156 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/externs.h | 4 ++++ crawl-ref/source/it_use3.cc | 2 ++ crawl-ref/source/items.cc | 1 + crawl-ref/source/misc/build_dcss_release.rb | 4 ++-- crawl-ref/source/mon-util.cc | 6 ------ crawl-ref/source/output.cc | 8 +++++--- crawl-ref/source/player.cc | 2 +- crawl-ref/source/tags.cc | 3 +++ crawl-ref/source/tutorial.cc | 22 +++++++++++----------- 9 files changed, 29 insertions(+), 23 deletions(-) diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 83afba3a23..0f74a1a22b 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -681,6 +681,10 @@ public: int old_hunger; // used for hunger delta-meter (see output.cc) + // Hard-coded to store and restore the inscription of any altar + // you 'E'voke. Got to do this better sometime. + std::string last_altar_inscription; + // Warning: these two are quite different. // // The spell table is an index to a specific spell slot (you.spells). diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc index 82621c1c73..5d93ce8aeb 100644 --- a/crawl-ref/source/it_use3.cc +++ b/crawl-ref/source/it_use3.cc @@ -691,6 +691,8 @@ bool evoke_wielded( void ) else { mpr("You unfold the altar and place it on the floor."); + you.last_altar_inscription = + you.inv[you.equip[EQ_WEAPON]].inscription; grd[you.x_pos][you.y_pos] = DNGN_ALTAR_NEMELEX_XOBEH; dec_inv_item_quantity( you.equip[EQ_WEAPON], 1 ); seen_notable_thing( diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index bf7e525761..2ec10821ea 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1234,6 +1234,7 @@ void pickup() you.inv[m].special = 0; you.inv[m].colour = LIGHTMAGENTA; you.inv[m].quantity = 1; + you.inv[m].inscription = you.last_altar_inscription; set_ident_flags( you.inv[m], ISFLAG_IDENT_MASK ); you.inv[m].x = -1; diff --git a/crawl-ref/source/misc/build_dcss_release.rb b/crawl-ref/source/misc/build_dcss_release.rb index f8d5447608..1231d5b796 100755 --- a/crawl-ref/source/misc/build_dcss_release.rb +++ b/crawl-ref/source/misc/build_dcss_release.rb @@ -167,7 +167,7 @@ def build_win32 puts "\nBuilding stone_soup (non-debug) for #{release_version} release!" system( %{#{W32MAKE} -f makefile.mgw DOYACC=y "EXTRA_FLAGS=-O2 } + %{-DCLUA_BINDINGS -DREGEX_PCRE" } + - %{"LIB=-lwinmm -static -llua -llualib -lpcre"} ) or + %{"LIB=-lwinmm -static -llua -lpcre"} ) or raise "#{W32MAKE} failed: #$?" clean_w32build_area @@ -175,7 +175,7 @@ def build_win32 puts "\nBuilding stone_soup (debug) for #{release_version}!" system( %{#{W32MAKE} -f makefile.mgw debug DEBUG_CRAWL=y "EXTRA_FLAGS=-O2 } + %{-DCLUA_BINDINGS -DREGEX_PCRE -DFULLDEBUG -DWIZARD" } + - %{"LIB=-lwinmm -static -llua -llualib -lpcre" } + + %{"LIB=-lwinmm -static -llua -lpcre" } + %{DOYACC=y} ) or raise "#{W32MAKE} failed: #$?" diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 3aec975697..56d3ccbaae 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -1324,12 +1324,6 @@ void define_monster(int index) hd += random2(10); ac += random2(5); ev += random2(5); - - if (hd >= 7) - { - mons.type = MONS_BLACK_DRACONIAN + random2(8); - col = mons_class_colour( mons.type ); - } break; case MONS_DRACONIAN_CALLER: diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 201dc2a34b..506290aaff 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1115,12 +1115,14 @@ void print_overview_screen() } } - int xp_needed = (exp_needed(you.experience_level+2)-you.experience)+1; + int xp_needed = (exp_needed(you.experience_level + 2) - you.experience) + 1; snprintf(buf, sizeof buf, - "Exp: %d/%lu (%d), need: %d\n" + "Exp: %d/%lu (%d)%s\n" "God: %s%s Gold: %d\n" "Spells: %2d memorised, %2d level%s left\n", - you.experience_level, you.experience, you.exp_available, xp_needed, + you.experience_level, you.experience, you.exp_available, + (you.experience_level < 27? + make_stringf(", need: %d", xp_needed).c_str() : ""), god_colour_tag, godpowers.c_str(), you.gold, you.spell_no, player_spell_levels(), (player_spell_levels() == 1) ? "" : "s"); cols1.add_formatted(3, buf, false); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 66df37f249..dd6f5fff6d 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3165,7 +3165,7 @@ void display_char_status(void) // "difficult" - worse than 2 in 3 // "hard" - worse than fair chance snprintf( info, INFO_SIZE, - "%s in your current equipment.", + "%s given your current equipment.", (to_hit < 1) ? "You are completely incapable of fighting" : (to_hit < 5) ? "Hitting even clumsy monsters is extremely awkward" : (to_hit < 10) ? "Hitting average monsters is awkward" : diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index e64d7460d6..fbddb4c692 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -830,6 +830,7 @@ static void tag_construct_you(struct tagHeader &th) // you.magic_contamination 05/03/05 marshallShort(th, you.magic_contamination); + marshallString(th, you.last_altar_inscription.c_str(), 80); } static void tag_construct_you_items(struct tagHeader &th) @@ -1136,6 +1137,8 @@ static void tag_read_you(struct tagHeader &th, char minorVersion) you.num_turns = unmarshallLong(th); you.magic_contamination = unmarshallShort(th); + unmarshallString( th, buff, 80 ); + you.last_altar_inscription = buff; } static void tag_read_you_items(struct tagHeader &th, char minorVersion) diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index aa842b9e79..9c38a90109 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -226,8 +226,8 @@ static formatted_string tut_starting_info(unsigned int width) text += info; text += "safely through the depths of the dungeon, retrieving the fabled orb of Zot and " "returning it to the surface. In the beginning, however, let discovery be your " - "main goal: try to delve as deeply as possible but beware as death lurks around " - "every corner here." EOL EOL; + "main goal. Try to delve as deeply as possible but beware; death lurks around " + "every corner." EOL EOL; linebreak_string2(text, width); result += formatted_string::parse_string(text); @@ -236,7 +236,7 @@ static formatted_string tut_starting_info(unsigned int width) result += " S - saves the game, to be resumed later (but note that death is permanent)" EOL; result += " x - examine something in your vicinity" EOL EOL; - text = "This tutorial will help you playing Crawl without reading any documentation. " + text = "This tutorial will help you play Crawl without reading any documentation. " "If you feel intrigued, there is more information available in these files " "(all of which can also be read in-game):" EOL; linebreak_string2(text, width); @@ -539,7 +539,7 @@ void tutorial_death_screen() Options.tutorial_left = 0; std::string text; - mpr( "Condolences! Your character's premature perishing is a sad, but " + mpr( "Condolences! Your character's premature death is a sad, but " "common occurence in Crawl. Rest assured that with diligence and " "playing experience your characters will last longer.\n", MSGCH_TUTORIAL); mpr( "Perhaps the following advice can improve your playing style:", MSGCH_TUTORIAL); @@ -603,7 +603,7 @@ void tutorial_death_screen() "potion of speed can really save your bacon."; break; case 5: - text = "Never fight more than one monster if you can help it. Always " + text = "Never fight more than one monster, if you can help it. Always " "back into a corridor so that they are forced to fight you one " "on one."; break; @@ -1028,7 +1028,7 @@ void learned_something_new(unsigned int seen_what, int x, int y) break; case TUT_SEEN_TRAPS: - text = "Oops... you just entered a trap. An unwary adventurer will " + text = "Oops... you just triggered a trap. An unwary adventurer will " "occasionally stumble into one of these nasty constructions " "depicted by ^. They can do physical damage (with " "darts or needles, for example) or have other, more magical " @@ -1101,17 +1101,17 @@ void learned_something_new(unsigned int seen_what, int x, int y) break; case TUT_YOU_ENCHANTED: text = "Enchantments of all types can befall you temporarily. " - "Abbreviated signalisation appears at the lower end of the stats " + "Brief descriptions of these appear at the lower end of the stats " "area. Press @ for more details. A list of all " - "possible enchantments is given in the manual."; + "possible enchantments is in the manual."; break; case TUT_YOU_SICK: learned_something_new(TUT_YOU_ENCHANTED); - text = "Corpses can be spoiled or inedible, resulting in sickness. " + text = "Corpses can be spoiled or inedible, making you sick. " "Also, some monsters' flesh is less palatable than others'. " - "During sickness your hitpoints won't regenerate and sometimes " + "While sick, your hitpoints won't regenerate and sometimes " "an attribute may decrease. It wears off with time (wait with " - "5) or you could quaff a potion of healing."; + "5) or you can quaff a potion of healing."; break; case TUT_YOU_POISON: learned_something_new(TUT_YOU_ENCHANTED); -- cgit v1.2.3-54-g00ecf