From d035522cf4d03a1420e88eff05b98b157cccd2a1 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 2 Nov 2007 13:36:20 +0000 Subject: Fixed broken MHITNOT/MHITYOU, changed handling of DUR_SLOW to be like DUR_HASTE, reduced paralysis duration for crystal balls of fixation. MHITNOT fix breaks saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2725 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/cloud.cc | 4 ---- crawl-ref/source/defines.h | 10 +++++----- crawl-ref/source/it_use3.cc | 9 +++++---- crawl-ref/source/monstuff.cc | 5 ----- crawl-ref/source/output.cc | 2 -- crawl-ref/source/player.cc | 5 +++-- 6 files changed, 13 insertions(+), 22 deletions(-) diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc index d36106ad72..3685977ee8 100644 --- a/crawl-ref/source/cloud.cc +++ b/crawl-ref/source/cloud.cc @@ -142,10 +142,6 @@ void manage_clouds(void) dissipate *= 4; } - // double the amount when slowed - must be applied last(!): - if (you.duration[DUR_SLOW]) - dissipate *= 2; - dissipate_cloud( cc, env.cloud[cc], dissipate ); } diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index 823f9cbca1..f846c167cc 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -57,6 +57,11 @@ // non-monster for mgrd[][] -- (MNST + 1) {dlb}: #define NON_MONSTER (MAX_MONSTERS + 1) +// (MNG) -- for a reason! see usage {dlb}: +#define MHITNOT (MAX_MONSTERS + 1) +// (MNG + 1) -- for a reason! see usage {dlb}: +#define MHITYOU (MAX_MONSTERS + 2) + #define MAX_SUBTYPES 50 // max size of item list {dlb}: @@ -208,11 +213,6 @@ const int LABYRINTH_BORDER = 12; #define mgrd env.mgrid #define igrd env.igrid -// (MNG) -- for a reason! see usage {dlb}: -#define MHITNOT 201 -// (MNG + 1) -- for a reason! see usage {dlb}: -#define MHITYOU 202 - // colors, such pretty colors ... #ifndef DOS #define BLACK 0 diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc index 6379dc4773..c3a0da556c 100644 --- a/crawl-ref/source/it_use3.cc +++ b/crawl-ref/source/it_use3.cc @@ -1054,15 +1054,16 @@ static bool ball_of_energy(void) } return (ret); -} // end ball_of_energy() +} static bool ball_of_fixation(void) { mpr("You gaze into the crystal ball."); mpr("You are mesmerised by a rainbow of scintillating colours!"); - you.duration[DUR_PARALYSIS] = 100; - you.duration[DUR_SLOW] = 100; + const int duration = random_range(15, 40); + you.duration[DUR_PARALYSIS] = duration; + you.duration[DUR_SLOW] = duration; return (true); -} // end ball_of_fixation() +} diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 3dbe99cb1a..3894c45254 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -3921,9 +3921,6 @@ static void monster_add_energy(monsters *monster) energy_gained = 1; monster->speed_increment += energy_gained; - - if (you.duration[DUR_SLOW] > 0) - monster->speed_increment += energy_gained; } // Do natural regeneration for monster. @@ -4016,8 +4013,6 @@ static void handle_monster_move(int i, monsters *monster) // Apply monster enchantments once for every normal-speed // player turn. monster->ench_countdown -= you.time_taken; - if (you.duration[DUR_SLOW] > 0) - monster->ench_countdown -= you.time_taken; while (monster->ench_countdown < 0) { monster->ench_countdown += 10; diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 47eb274478..69f768e4cc 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1419,8 +1419,6 @@ std::string status_mut_abilities() text += "bonded with blade, "; int move_cost = (player_speed() * player_movement_speed()) / 10; - if ( you.duration[DUR_SLOW] ) - move_cost *= 2; text += (move_cost < 8) ? "very quick, " : (move_cost < 10) ? "quick, " : diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 68a9b48d8d..d8350b300f 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1612,6 +1612,9 @@ int player_speed(void) { int ps = 10; + if (you.duration[DUR_SLOW]) + ps *= 2; + if (you.duration[DUR_HASTE]) ps /= 2; @@ -3541,8 +3544,6 @@ void display_char_status() } int move_cost = (player_speed() * player_movement_speed()) / 10; - if ( you.duration[DUR_SLOW] ) - move_cost *= 2; const bool water = player_in_water(); const bool swim = player_is_swimming(); -- cgit v1.2.3-54-g00ecf