From 285e514f699f1adc6064c1fce860d5e6b0cef8b3 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Thu, 22 Oct 2009 15:08:25 +0200 Subject: Make Chronos account for player's haste/slow/statue form. --- crawl-ref/source/godabil.cc | 2 +- crawl-ref/source/mon-util.cc | 5 +++-- crawl-ref/source/ouch.cc | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc index c3cb8bbe36..2b797635fb 100644 --- a/crawl-ref/source/godabil.cc +++ b/crawl-ref/source/godabil.cc @@ -490,7 +490,7 @@ static int _slouch_monsters(coord_def where, int pow, int, actor* agent) if (mon == NULL) return (0); - int dmg = (mon->speed - 100/player_movement_speed()); + int dmg = (mon->speed - 1000/player_movement_speed()/player_speed()); dmg = (dmg > 0 ? dmg * dmg : 0); mon->hurt(agent, dmg, BEAM_MMISSILE, true); diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 81258cbdc6..9ad32ef80d 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -513,11 +513,12 @@ bool mons_is_stationary(const monsters *mon) bool mons_is_fast(const monsters *mon) { + int pspeed = 1000/player_movement_speed()/player_speed(); #ifdef DEBUG_DIAGNOSTICS mprf(MSGCH_DIAGNOSTICS, "Your delay: %d, your speed: %d, mon speed: %d", - player_movement_speed(), 100/player_movement_speed(), mon->speed); + player_movement_speed(), pspeed, mon->speed); #endif - return (mon->speed > 100/player_movement_speed()); + return (mon->speed > pspeed); } bool mons_is_insubstantial(int mc) diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 2b1eeef209..cfcc31cd54 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -787,7 +787,7 @@ static void _xom_checks_damage(kill_method_type death_type, if (!player_monster_visible(monster)) amusementvalue += 10; - if (monster->speed < (int)player_movement_speed()) + if (monster->speed < 100/player_movement_speed()) amusementvalue += 8; if (death_type != KILLED_BY_BEAM -- cgit v1.2.3-54-g00ecf