diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-14 10:58:08 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-14 10:58:08 +0000 |
commit | 5f0047a46771cbb691ed76feb3a66d8bbbaf674d (patch) | |
tree | 42a42851c04160c9975058a8bad2f807e8005bf7 /crawl-ref | |
parent | 1de6c3e73bc19e4c7c6573ce3be9d77befd4cf02 (diff) | |
download | crawl-ref-5f0047a46771cbb691ed76feb3a66d8bbbaf674d.tar.gz crawl-ref-5f0047a46771cbb691ed76feb3a66d8bbbaf674d.zip |
Another round of patches, namely:
1794580, 1794576 and 1794376 by zelgadis, and
1794388, 1794372, 1794368 by dolorous.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2086 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/acr.cc | 11 | ||||
-rw-r--r-- | crawl-ref/source/debug.cc | 18 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/mutation.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/travel.cc | 28 |
8 files changed, 60 insertions, 24 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index f22d2fbf48..5e0cf7eb1b 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -782,10 +782,19 @@ static void handle_wizard_command( void ) case ':': j = 0; for (i = 0; i < NUM_BRANCHES; i++) + { if (branches[i].startdepth != - 1) + { mprf(MSGCH_DIAGNOSTICS, "Branch %d (%s) is on level %d of %s", i, branches[i].longname, branches[i].startdepth, branches[branches[i].parent_branch].abbrevname); + } + else if (i == BRANCH_SWAMP || i == BRANCH_SHOALS) + { + mprf(MSGCH_DIAGNOSTICS, "Branch %d (%s) was not generated " + "this game", i, branches[i].longname); + } + } break; case '{': @@ -1516,7 +1525,7 @@ void process_command( command_type cmd ) if (Options.tutorial_events[TUT_MAP_VIEW]) Options.tutorial_events[TUT_MAP_VIEW] = 0; #if (!DEBUG_DIAGNOSTICS) - if (you.level_type == LEVEL_LABYRINTH || you.level_type == LEVEL_ABYSS) + if (!player_in_mappable_area()) { mpr("It would help if you knew where you were, first."); break; diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index dd5ebc914d..367b023fda 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -522,19 +522,15 @@ static dungeon_feature_type find_appropriate_stairs(bool down) else if (you.where_are_you == BRANCH_MAIN_DUNGEON) return DNGN_STONE_STAIRS_UP_I; - // General case: look for branch exit and copy it - for (int y = 1; y < GYM; ++y) + dungeon_feature_type stairs = your_branch().exit_stairs; + + if (stairs < DNGN_RETURN_FROM_ORCISH_MINES + || stairs > DNGN_RETURN_RESERVED_4) { - for (int x = 1; x < GXM; ++x) - { - if (grd[x][y] >= DNGN_RETURN_FROM_ORCISH_MINES && - grd[x][y] <= DNGN_RETURN_RESERVED_4) - return grd[x][y]; - } + mpr("This branch has no exit stairs defined."); + return DNGN_UNSEEN; } - - mpr("Unable to find appropriate branch exit."); - return DNGN_UNSEEN; + return (stairs); } // Branch non-edge cases else if (depth >= 1) diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 9619b92e38..2a3ef7d577 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1525,7 +1525,10 @@ void melee_attack::drain_defender() { // What to do, they're different... if (defender->atype() == ACT_PLAYER) + { drain_player(); + obvious_effect = true; + } else drain_monster(); } diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 87fdbb15dd..d7af5bd861 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -512,10 +512,7 @@ bool eat_food(bool run_hook) if (igrd[you.x_pos][you.y_pos] != NON_ITEM) { if (eat_from_floor()) - { - burden_change(); // ghouls regain strength from rotten food return (true); - } } return (prompt_eat_from_inventory()); @@ -1608,6 +1605,7 @@ static void heal_from_food(int hp_amt, int mp_amt, bool unrot, mpr("You feel your strength returning."); you.strength++; you.redraw_strength = true; + burden_change(); } calc_hp(); diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 8c49fd5a9c..04e560c402 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -168,7 +168,8 @@ static const std::string message_channel_names[ NUM_MESSAGE_CHANNELS ] = "plain", "prompt", "god", "pray", "duration", "danger", "warning", "food", "recovery", "sound", "talk", "intrinsic_gain", "mutation", "monster_spell", "monster_enchant", "monster_damage", "monster_target", - "rotten_meat", "equipment", "floor", "multiturn", "diagnostic","tutorial" + "rotten_meat", "equipment", "floor", "multiturn", "examine", + "examine_filter", "diagnostic","tutorial" }; // returns -1 if unmatched else returns 0--(NUM_MESSAGE_CHANNELS-1) diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index cc0bbd550b..9ffd6978d5 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1122,6 +1122,13 @@ void up_stairs(dungeon_feature_type force_stair) mprf("Welcome back to %s!", branches[branches[i].parent_branch].longname); you.where_are_you = branches[i].parent_branch; + + // If leaving a branch which wasn't generated in this + // particular game (like the Swamp or Shoals), then + // its startdepth is set to -1; compensate for that, + // so we don't end up on "level -1". + if (branches[i].startdepth == -1) + you.your_level += 2; break; } } diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index 147dbaa063..5555f93c7f 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -720,7 +720,9 @@ const char *lose_mutation[][3] = { {"Your hooves expand and flesh out into feet!", "", ""}, // 60 - {"Your teeth shrink and become duller.", "", ""}, + {"Your teeth shrink to normal size.", + "Your teeth shrink and become duller.", + "Your teeth shrink and become duller."}, {"", "", ""}, {"", "", ""}, @@ -942,15 +944,9 @@ formatted_string describe_mutations() case SP_CENTAUR: result += "You cannot wear boots." EOL; - result += "You are unusually fast." EOL; have_any = true; break; - case SP_SPRIGGAN: - result += "You are unusually fast." EOL; - have_any = true; - break; - case SP_TROLL: if ( you.mutation[MUT_CLAWS] ) result += "<cyan>"; diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 67e9d656b4..381aa76727 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -1869,7 +1869,7 @@ static std::vector<branch_type> get_branches(bool (*selector)(const Branch &)) static bool is_valid_branch(const Branch &br) { - return (!!br.shortname); + return (br.shortname != NULL && br.depth != -1); } static int prompt_travel_branch(int prompt_flags) @@ -1970,7 +1970,33 @@ static int prompt_travel_branch(int prompt_flags) for (int i = 0, count = br.size(); i < count; ++i) { if (toupper(keyin) == branches[br[i]].travel_shortcut) + { +#ifdef WIZARD + Branch &target = branches[br[i]]; + std::string msg = ""; + + if (target.startdepth == -1 + && (i == BRANCH_SWAMP || i == BRANCH_SHOALS )) + { + msg += "Branch not generated this game. "; + } + + if (target.entry_stairs == NUM_FEATURES + && br[i] != BRANCH_MAIN_DUNGEON) + { + msg += "Branch has no entry stairs. "; + } + + if (msg != "") + { + msg += "Go there anyways?"; + if(!yesno(msg.c_str())) + return (ID_CANCEL); + } +#endif + return (br[i]); + } } // Possibly a waypoint number? |