From faed135e4f21ba80b74be7aab83d34cfabcf2efc Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 23 Jul 2008 17:33:20 +0000 Subject: Implement 2022051: Skip hjklyubn (well, currently only bhjkl) when targetting via monster list, so you can both directly target a monster and manually move your cursor. Has the side-effect of reallowing direct selection of monsters via 'x'. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6641 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 5fe29481fd..82460bd819 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -3418,7 +3418,7 @@ std::string melee_attack::mons_weapon_desc() if (!you.can_see(attacker)) return (""); - if (weapon && attacker->id() != MONS_DANCING_WEAPON) + if (weapon) { std::string result = ""; const item_def wpn = *weapon; @@ -3429,8 +3429,13 @@ std::string melee_attack::mons_weapon_desc() if (dx == 2 && dy <= 2 || dy == 2 && dx <= 2) result += " from afar"; } - result += " with "; - result += weapon->name(DESC_NOCAP_A); + + if (attacker->id() != MONS_DANCING_WEAPON) + { + result += " with "; + result += weapon->name(DESC_NOCAP_A); + } + return result; } @@ -3727,7 +3732,7 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) break; case AF_DRAIN_STR: - if ((one_chance_in(20) || (damage_done > 0 && one_chance_in(3))) + if ((one_chance_in(20) || damage_done > 0 && one_chance_in(3)) && defender->res_negative_energy() < random2(4)) { defender->drain_stat(STAT_STRENGTH, 1, attacker); -- cgit v1.2.3-54-g00ecf