summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-08 23:14:34 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-08 23:14:34 +0000
commit228bd3081cfdcc717bc22a7c47348f19a3309c89 (patch)
tree0497e1aca57f4110739e65c4c35d99e5e7131e2c /crawl-ref
parent4000c36207d475d52ea646d9a66dd05e04828cd5 (diff)
downloadcrawl-ref-228bd3081cfdcc717bc22a7c47348f19a3309c89.tar.gz
crawl-ref-228bd3081cfdcc717bc22a7c47348f19a3309c89.zip
Fix [2580344]: don't give the Drain Life mutation unless your top
weapon skill is Unarmed Combat. (Giving Drain Life to secondary attacks is a bit over the top.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9000 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/mutation.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 6388994b26..edc8dcded6 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -2721,10 +2721,17 @@ void demonspawn()
howm = 1;
}
- if (you.skills[SK_UNARMED_COMBAT] > 5 && one_chance_in(14))
+ if (you.skills[SK_UNARMED_COMBAT] > 5)
{
- whichm = MUT_DRAIN_LIFE;
- howm = 1;
+ // Drain Life only works if you're unarmed, so only
+ // give it if unarmed is your best attacking skill.
+ skill_type wpn_skill = best_skill(SK_SHORT_BLADES, SK_STAVES);
+ if ((you.skills[SK_UNARMED_COMBAT] > you.skills[wpn_skill])
+ && one_chance_in(14))
+ {
+ whichm = MUT_DRAIN_LIFE;
+ howm = 1;
+ }
}
}