summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-07 18:31:25 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-07 18:31:25 +0100
commite4c1104b772b1f093e1c8230dd5f1cb62253a7a3 (patch)
tree0d5eb771b0f6f620aaaccda9f1bf4c3cfccf7466 /crawl-ref/source/player.cc
parent2ac4093ff9bbefed1ba51a3865507ac49a419bbd (diff)
downloadcrawl-ref-e4c1104b772b1f093e1c8230dd5f1cb62253a7a3.tar.gz
crawl-ref-e4c1104b772b1f093e1c8230dd5f1cb62253a7a3.zip
Remove extra hunger from rings of regeration when you're at full hp.
Increase the hunger when the rings work to compensate.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 9cf2e879fa..2316dc266d 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1140,7 +1140,7 @@ int player_hunger_rate(void)
if (you.species == SP_TROLL)
hunger += 3; // in addition to the +3 for fast metabolism
- if (you.duration[DUR_REGENERATION])
+ if (you.duration[DUR_REGENERATION] && you.hp < you.hp_max)
hunger += 4;
// If Cheibriados has slowed your life processes, there's a
@@ -1198,7 +1198,8 @@ int player_hunger_rate(void)
}
// rings
- hunger += 2 * player_equip( EQ_RINGS, RING_REGENERATION );
+ if (you.hp < you.hp_max)
+ hunger += 3 * player_equip( EQ_RINGS, RING_REGENERATION );
hunger += 4 * player_equip( EQ_RINGS, RING_HUNGER );
hunger -= 2 * player_equip( EQ_RINGS, RING_SUSTENANCE );
@@ -1215,7 +1216,7 @@ int player_hunger_rate(void)
}
// troll leather armour
- if (you.species != SP_TROLL)
+ if (you.species != SP_TROLL && you.hp < you.hp_max)
hunger += player_equip( EQ_BODY_ARMOUR, ARM_TROLL_LEATHER_ARMOUR );
// randarts