diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-09-20 19:50:18 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-09-20 19:50:18 +0000 |
commit | cb57dfea1ea5e58d45f8f1d4378369bdaf975fe5 (patch) | |
tree | 24f6b63381415029b59b676329ddeec1e9f341dd /crawl-ref/source | |
parent | bf3897048c960a93d6bc1485b32060868c955da1 (diff) | |
download | crawl-ref-cb57dfea1ea5e58d45f8f1d4378369bdaf975fe5.tar.gz crawl-ref-cb57dfea1ea5e58d45f8f1d4378369bdaf975fe5.zip |
* Fix wizmode autoexplore (used for debugging) not nuking traps, as it
claimed to do.
* Fix post-berserk exhaustion not cancelling haste if not wearing the "RS.
* Update change log.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10752 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/acr.cc | 57 | ||||
-rw-r--r-- | crawl-ref/source/beam.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/debug.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/terrain.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/tilepick.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/traps.cc | 4 |
7 files changed, 48 insertions, 32 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index e79c2508a6..42a1b8a72a 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1124,15 +1124,16 @@ static void _input() // as a resting turn, rather than "other". static bool prev_was_rest = false; - if (!you.delay_queue.empty() && - you.delay_queue.front().type == DELAY_REST) + if (!you.delay_queue.empty() + && you.delay_queue.front().type == DELAY_REST) + { prev_was_rest = true; + } if (prev_was_rest) { delta.turns_resting++; delta.elapsed_resting += you.time_taken; - } else { @@ -1140,10 +1141,11 @@ static void _input() delta.elapsed_other += you.time_taken; } - if (you.delay_queue.empty() || - you.delay_queue.front().type != DELAY_REST) + if (you.delay_queue.empty() + || you.delay_queue.front().type != DELAY_REST) + { prev_was_rest = false; - + } break; } @@ -2363,22 +2365,6 @@ static void _decrement_durations() int dur = 12 + roll_dice(2, 12); you.duration[DUR_EXHAUSTED] += dur; - // While the amulet of resist slowing does prevent the post-berserk - // slowing, exhaustion still ends haste. - if (you.duration[DUR_HASTE] > 0 && wearing_amulet(AMU_RESIST_SLOW)) - { - if (you.duration[DUR_HASTE > 6]) - { - you.duration[DUR_HASTE] = 2 + coinflip(); - mpr("Your extra speed is starting to run out.", MSGCH_DURATION); - } - else - { - mpr("You feel yourself slow down.", MSGCH_DURATION); - you.duration[DUR_HASTE] = 0; - } - } - // Don't trigger too many tutorial messages. const bool tut_slow = Options.tutorial_events[TUT_YOU_ENCHANTED]; Options.tutorial_events[TUT_YOU_ENCHANTED] = false; @@ -2386,7 +2372,32 @@ static void _decrement_durations() { // Don't give duplicate 'You feel yourself slow down' messages. no_messages nm; - slow_player(dur); + + // While the amulet of resist slowing does prevent the post-berserk + // slowing, exhaustion still ends haste. + if (you.duration[DUR_HASTE] > 0) + { + if (wearing_amulet(AMU_RESIST_SLOW)) + { + if (you.duration[DUR_HASTE > 6]) + { + you.duration[DUR_HASTE] = 2 + coinflip(); + mpr("Your extra speed is starting to run out.", + MSGCH_DURATION); + } + else + { + mpr("You feel yourself slow down.", MSGCH_DURATION); + you.duration[DUR_HASTE] = 0; + } + } + else + { + // Silently cancel haste, then slow player. + you.duration[DUR_HASTE] = 0; + slow_player(dur); + } + } } make_hungry(700, true); diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index b3a4c334e0..06e016e146 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3235,6 +3235,10 @@ void bolt::affect_place_explosion_clouds() // A little helper function to handle the calling of ouch()... void bolt::internal_ouch(int dam) { + mprf("aimed_at_feet: %s, effect_known: %s", + aimed_at_feet ? "true" : "false", + effect_known ? "true" : "false"); + monsters *monst = NULL; if (!invalid_monster_index(beam_source) && menv[beam_source].type != -1) monst = &menv[beam_source]; diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 83d5c00ddc..72c2e356a6 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -4627,9 +4627,9 @@ static int find_trap_slot() void debug_make_trap() { char requested_trap[80]; - int trap_slot = find_trap_slot(); + int trap_slot = find_trap_slot(); trap_type trap = TRAP_UNASSIGNED; - int gridch = grd(you.pos()); + int gridch = grd(you.pos()); if (trap_slot == -1) { @@ -4654,7 +4654,7 @@ void debug_make_trap() for (int t = TRAP_DART; t < NUM_TRAPS; ++t) { const trap_type tr = static_cast<trap_type>(t); - const char* tname = trap_name(tr); + const char* tname = trap_name(tr); if (strstr(requested_trap, tname)) { trap = tr; @@ -5193,7 +5193,7 @@ static void _debug_kill_traps() { for (rectangle_iterator ri(1); ri; ++ri) if (grid_is_trap(grd(*ri), true)) - grd(*ri) = DNGN_FLOOR; + destroy_trap(*ri); } static int _debug_time_explore() @@ -5247,7 +5247,7 @@ static void _debug_destroy_doors() void debug_test_explore() { wizard_dismiss_all_monsters(true); - _debug_kill_traps(); // doesn't work? (jpeg) + _debug_kill_traps(); _debug_destroy_doors(); forget_map(100); diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index e43b1633d7..f4a2b62621 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -7308,7 +7308,7 @@ static void _chequerboard( spec_room &sr, dungeon_feature_type target, if (sr.br.x < sr.tl.x || sr.br.y < sr.tl.y) return; - for ( rectangle_iterator ri(sr.tl, sr.br); ri; ++ri ) + for (rectangle_iterator ri(sr.tl, sr.br); ri; ++ri) if (grd(*ri) == target) grd(*ri) = ((ri->x + ri->y) % 2) ? floor2 : floor1; } diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index aa4eba2335..86da9f5936 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -231,7 +231,7 @@ bool grid_is_trap(dungeon_feature_type grid, bool undiscovered_too) { return (grid == DNGN_TRAP_MECHANICAL || grid == DNGN_TRAP_MAGICAL || grid == DNGN_TRAP_NATURAL - || (undiscovered_too && grid == DNGN_UNDISCOVERED_TRAP)); + || undiscovered_too && grid == DNGN_UNDISCOVERED_TRAP); } bool grid_is_water(dungeon_feature_type grid) diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 91f8c9946b..66bdd74145 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -711,6 +711,7 @@ int tileidx_monster_base(const monsters *mon, bool detected) case MONS_KRAKEN: return TILEP_MONS_KRAKEN_HEAD; case MONS_KRAKEN_TENTACLE: + // Pick a random tentacle tile. return TILEP_MONS_KRAKEN_TENTACLE + random2(tile_player_count(TILEP_MONS_KRAKEN_TENTACLE)); diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index 3203f672e7..39bcb433ed 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -87,8 +87,8 @@ void trap_def::destroy() grd(this->pos) = DNGN_FLOOR; this->ammo_qty = 0; - this->pos = coord_def(-1,-1); - this->type = TRAP_UNASSIGNED; + this->pos = coord_def(-1,-1); + this->type = TRAP_UNASSIGNED; } void trap_def::hide() |