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>2007-09-20 11:51:22 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-20 11:51:22 +0000
commit9b5bc8fd4f63dda5b587ab08b634d4f9cdf20a06 (patch)
tree0921a7194a4d72c4e60c148e48df8a45d9783b66 /crawl-ref/source/fight.cc
parent64707c2d565008f6c5fea165df96bc4c4c9e4be0 (diff)
downloadcrawl-ref-9b5bc8fd4f63dda5b587ab08b634d4f9cdf20a06.tar.gz
crawl-ref-9b5bc8fd4f63dda5b587ab08b634d4f9cdf20a06.zip
Previous commit applied to trunk:
* cleanup of weird_colour() * hooves mutation one level only * fixes for vampire food level checks * Xom gifts interrupt travel git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2164 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index e9e6370a61..ccc022ddb7 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -186,13 +186,13 @@ static int calc_your_to_hit_unarmed(int uattack = UNAT_NO_ATTACK,
your_to_hit += 1;
if (vampiric)
{
- if (you.hunger_state == HS_HUNGRY)
- your_to_hit += 1;
- else if (you.hunger_state == HS_STARVING)
+ if (you.hunger_state <= HS_STARVING)
your_to_hit += 2;
+ else if (you.hunger_state <= HS_HUNGRY)
+ your_to_hit += 1;
}
}
- else if (you.species != SP_VAMPIRE && you.hunger_state == HS_STARVING)
+ else if (you.species != SP_VAMPIRE && you.hunger_state <= HS_STARVING)
your_to_hit -= 3;
your_to_hit += slaying_bonus(PWPN_HIT);
@@ -1089,7 +1089,7 @@ int melee_attack::player_apply_misc_modifiers(int damage)
if (you.duration[DUR_MIGHT] > 1)
damage += 1 + random2(10);
- if (you.hunger_state == HS_STARVING && you.species != SP_VAMPIRE)
+ if (you.hunger_state <= HS_STARVING && you.species != SP_VAMPIRE)
damage -= random2(5);
return (damage);
@@ -2335,7 +2335,7 @@ int melee_attack::player_to_hit(bool random_factor)
your_to_hit += slaying_bonus(PWPN_HIT);
// hunger penalty
- if (you.hunger_state == HS_STARVING)
+ if (you.hunger_state <= HS_STARVING)
your_to_hit -= 3;
// armour penalty