diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-22 01:40:14 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-22 01:40:14 +0000 |
commit | 9aea04f45a0902a19877de1f383264def728c862 (patch) | |
tree | f37110792345ede143fe84989b01c7e3875169f6 /crawl-ref/source/traps.cc | |
parent | 308d03bae861cbc312797d064efa46ac69dfd4d9 (diff) | |
download | crawl-ref-9aea04f45a0902a19877de1f383264def728c862.tar.gz crawl-ref-9aea04f45a0902a19877de1f383264def728c862.zip |
make player::has_claws() return an int indicating the level of claws
available; this removes the need for some special cases dealing with
trolls' and ghouls' built-in claws
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2890 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/traps.cc')
-rw-r--r-- | crawl-ref/source/traps.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index 7b22ca0f52..db6d7b1f49 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -644,12 +644,11 @@ static int damage_or_escape_net(int hold) damage += 2; else if (you.has_usable_claws()) { - if (you.species == SP_TROLL || you.species == SP_GHOUL) - damage += 2; - else if (you.mutation[MUT_CLAWS] == 1) + int level = you.has_claws(); + if (level == 1) damage += coinflip(); else - damage += you.mutation[MUT_CLAWS] - 1; + damage += level - 1; } // Berserkers get a fighting bonus |