summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-23 11:25:01 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-23 11:25:01 +0000
commit933b0c361d7ee4914b89e725a8886abb5f5e9d2c (patch)
tree6cd9a4618f4a953e519ba9b0af24d1a184e0b501 /crawl-ref/source/item_use.cc
parent82fa0cb1d1d28ae309754c0dbcd620c554f7f1d9 (diff)
downloadcrawl-ref-933b0c361d7ee4914b89e725a8886abb5f5e9d2c.tar.gz
crawl-ref-933b0c361d7ee4914b89e725a8886abb5f5e9d2c.zip
Fixed bad message with RAP_MAGICAL_POWER.
Type safety; this required moving randart_prop_type to enum.h. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2518 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 2dcb74a054..69f8862bde 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3986,7 +3986,7 @@ void use_randart(item_def &item)
// Only give property messages for previously unknown properties.
if (proprt[RAP_AC])
{
- you.redraw_armour_class = 1;
+ you.redraw_armour_class = true;
if (!known[RAP_AC])
{
mprf("You feel %s.", proprt[RAP_AC] > 0?
@@ -3997,7 +3997,7 @@ void use_randart(item_def &item)
if (proprt[RAP_EVASION])
{
- you.redraw_evasion = 1;
+ you.redraw_evasion = true;
if (!known[RAP_EVASION])
{
mprf("You feel somewhat %s.", proprt[RAP_EVASION] > 0?
@@ -4008,11 +4008,11 @@ void use_randart(item_def &item)
if (proprt[RAP_MAGICAL_POWER])
{
- you.redraw_magic_points = 1;
+ you.redraw_magic_points = true;
if (!known[RAP_MAGICAL_POWER])
{
- mprf("You feel your mana capacity %s.", proprt[RAP_EVASION] > 0?
- "increase" : "decrease");
+ mprf("You feel your mana capacity %s.",
+ proprt[RAP_MAGICAL_POWER] > 0? "increase" : "decrease");
randart_wpn_learn_prop(item, RAP_MAGICAL_POWER);
}
}
@@ -4023,7 +4023,9 @@ void use_randart(item_def &item)
modify_stat( STAT_INTELLIGENCE, proprt[RAP_INTELLIGENCE], false, item );
modify_stat( STAT_DEXTERITY, proprt[RAP_DEXTERITY], false, item );
- int stat_props[3] = {RAP_STRENGTH, RAP_INTELLIGENCE, RAP_DEXTERITY};
+ const randart_prop_type stat_props[3] =
+ {RAP_STRENGTH, RAP_INTELLIGENCE, RAP_DEXTERITY};
+
for (int i = 0; i < 3; i++)
if (unknown_proprt(stat_props[i]))
randart_wpn_learn_prop(item, stat_props[i]);