diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-29 10:13:35 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-29 10:13:35 +0000 |
commit | f945c65280cfb899a523faa5a510a897e2758ea0 (patch) | |
tree | 918b84bc6050de932360cdb63f588f13475eedf9 /crawl-ref/source/fight.cc | |
parent | a0fe746d9733dec01dc27f120042b76ed1c658f6 (diff) | |
download | crawl-ref-f945c65280cfb899a523faa5a510a897e2758ea0.tar.gz crawl-ref-f945c65280cfb899a523faa5a510a897e2758ea0.zip |
Fix 2030729: + and * not working when examining (targetting?)
Merge r6641 into branch: skip direction keys when targetting via monster
list.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6713 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 9f1f518690..e2e10491df 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -3427,7 +3427,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; @@ -3438,8 +3438,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; } @@ -3736,7 +3741,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); |