summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/it_use2.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-25 07:54:57 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-25 07:54:57 +0000
commit64066374ba039726a4ab7a7a9a7456f48f12b0ab (patch)
tree25648570d9ce5cb83495d9b1895a6bae536aa9a4 /crawl-ref/source/it_use2.cc
parent18fa676cf1f8c9dd674bec700c095187fab2ab0b (diff)
downloadcrawl-ref-64066374ba039726a4ab7a7a9a7456f48f12b0ab.tar.gz
crawl-ref-64066374ba039726a4ab7a7a9a7456f48f12b0ab.zip
Fix 2026078: Quiver not updated after item slot adjustment.
Fix 2027292: potion_effect() adapting to vampire hunger for non-potion effects. Fix 2026910: Make !invisibility/resistance/speed use MSGCH_DURATION. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6679 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/it_use2.cc')
-rw-r--r--crawl-ref/source/it_use2.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index 5d7c6413e3..ad53a89f49 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -53,17 +53,18 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known )
if (pow > 150)
pow = 150;
- const int factor =
- (you.species == SP_VAMPIRE && you.hunger_state < HS_SATIATED ? 2 : 1);
+ const int factor = (you.species == SP_VAMPIRE
+ && you.hunger_state < HS_SATIATED && pow == 40 ? 2
+ : 1);
switch (pot_eff)
{
case POT_HEALING:
- inc_hp( (5 + random2(7)) / factor, false);
+ inc_hp((5 + random2(7)) / factor, false);
mpr("You feel better.");
- // only fix rot when healed to full
+ // Only fix rot when healed to full.
if (you.hp == you.hp_max)
{
unrot_hp(1);
@@ -180,7 +181,8 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known )
break;
case POT_LEVITATION:
- mprf("You feel %s buoyant.", !player_is_airborne() ? "very"
+ mprf(MSGCH_DURATION,
+ "You feel %s buoyant.", !player_is_airborne() ? "very"
: "more");
if (!player_is_airborne())
@@ -203,7 +205,8 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known )
}
else
{
- mprf("That liquid tasted %s nasty...",
+ mprf(MSGCH_WARN,
+ "That liquid tasted %s nasty...",
(pot_eff == POT_POISON) ? "very" : "extremely" );
poison_player( ((pot_eff == POT_POISON) ? 1 + random2avg(5, 2)
@@ -229,7 +232,8 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known )
case POT_INVISIBILITY:
mpr(!you.duration[DUR_INVIS] ? "You fade into invisibility!"
- : "You fade further into invisibility.");
+ : "You fade further into invisibility.",
+ MSGCH_DURATION);
// Invisibility cancels backlight.
you.duration[DUR_BACKLIGHT] = 0;
@@ -364,7 +368,7 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known )
break;
case POT_RESISTANCE:
- mpr("You feel protected.");
+ mpr("You feel protected.", MSGCH_DURATION);
you.duration[DUR_RESIST_FIRE] += (random2(pow) + 10) / factor;
you.duration[DUR_RESIST_COLD] += (random2(pow) + 10) / factor;
you.duration[DUR_RESIST_POISON] += (random2(pow) + 10) / factor;