summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-23 17:33:20 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-23 17:33:20 +0000
commitfaed135e4f21ba80b74be7aab83d34cfabcf2efc (patch)
tree898823eda0ded041a19a42151618d136ad4b58aa /crawl-ref/source/fight.cc
parent68631458c7c936fb0fed22b87feb888fc3ee5d75 (diff)
downloadcrawl-ref-faed135e4f21ba80b74be7aab83d34cfabcf2efc.tar.gz
crawl-ref-faed135e4f21ba80b74be7aab83d34cfabcf2efc.zip
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
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc13
1 files changed, 9 insertions, 4 deletions
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);