summaryrefslogtreecommitdiffstats
path: root/crawl-ref
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
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')
-rw-r--r--crawl-ref/settings/init.txt5
-rw-r--r--crawl-ref/source/command.cc12
-rw-r--r--crawl-ref/source/it_use2.cc20
3 files changed, 22 insertions, 15 deletions
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt
index 3ed379ea86..2e726d5139 100644
--- a/crawl-ref/settings/init.txt
+++ b/crawl-ref/settings/init.txt
@@ -260,8 +260,9 @@ include = menu_colours.txt
# Colouring of autoinscribed god gifts
menu_colour = pickup:green:god gift
-# Highlight selected items
-menu_colour = white:\w \+ .
+# Highlight (partly) selected items
+menu_colour = white:\w \+
+menu_colour = white:\w \#
# Colouring of messages
include = messages.txt
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 9a6f33c56d..355a9d91e7 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -296,18 +296,18 @@ void adjust(void)
void swap_inv_slots(int from_slot, int to_slot, bool verbose)
{
- // swap items
+ // Swap items.
item_def tmp = you.inv[to_slot];
- you.inv[to_slot] = you.inv[from_slot];
+ you.inv[to_slot] = you.inv[from_slot];
you.inv[from_slot] = tmp;
- // slot switching
+ // Slot switching.
tmp.slot = you.inv[to_slot].slot;
- you.inv[to_slot].slot = you.inv[from_slot].slot;
+ you.inv[to_slot].slot = you.inv[from_slot].slot;
you.inv[from_slot].slot = tmp.slot;
you.inv[from_slot].link = from_slot;
- you.inv[to_slot].link = to_slot;
+ you.inv[to_slot].link = to_slot;
for (int i = 0; i < NUM_EQUIP; i++)
{
@@ -330,6 +330,8 @@ void swap_inv_slots(int from_slot, int to_slot, bool verbose)
you.wield_change = true;
you.m_quiver->on_weapon_changed();
}
+ else // just to make sure
+ you.redraw_quiver = true;
}
static void _adjust_item(void)
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;