summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-03 20:00:42 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-03 20:00:42 +0000
commitc07f2c46323c57f9d5699293e3e4458d5bbacde5 (patch)
tree4afb8218230bd780be1d925a84f4abe8542aef32 /crawl-ref/source/item_use.cc
parent774610f0402dc15c10a1a39105e2427484364006 (diff)
downloadcrawl-ref-c07f2c46323c57f9d5699293e3e4458d5bbacde5.tar.gz
crawl-ref-c07f2c46323c57f9d5699293e3e4458d5bbacde5.zip
Some cleanup (replacing you.duration[DUR_CONF] with you.confused())
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7108 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 66eec08c36..dedab92eac 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1915,7 +1915,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
pbolt.range = max_range;
// Don't do the tracing when using Portaled Projectile, or when confused.
- if (!teleport && !you.duration[DUR_CONF])
+ if (!teleport && !you.confused())
{
// Init tracer variables.
pbolt.foe_count = pbolt.fr_count = 0;
@@ -1964,7 +1964,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
init_stack_blood_potions(item, val);
}
- if (you.duration[DUR_CONF])
+ if (you.confused())
{
thr.isTarget = true;
thr.target = you.pos() + coord_def(random2(13)-6, random2(13)-6);
@@ -3517,7 +3517,7 @@ void zap_wand( int slot )
}
- if (you.duration[DUR_CONF])
+ if (you.confused())
{
zap_wand.target = you.pos() + coord_def(random2(13)-6, random2(13)-6);
}
@@ -4346,7 +4346,7 @@ void read_scroll( int slot )
// Decrement and handle inventory if any scroll other than paper {dlb}:
const scroll_type which_scroll = static_cast<scroll_type>(scroll.sub_type);
if (which_scroll != SCR_PAPER
- && (which_scroll != SCR_IMMOLATION || you.duration[DUR_CONF]))
+ && (which_scroll != SCR_IMMOLATION || you.confused()))
{
mpr("As you read the scroll, it crumbles to dust.");
// Actual removal of scroll done afterwards. -- bwr
@@ -4358,7 +4358,7 @@ void read_scroll( int slot )
// Scrolls of paper are also exempted from this handling {dlb}:
if (which_scroll != SCR_PAPER)
{
- if (you.duration[DUR_CONF])
+ if (you.confused())
{
random_uselessness(item_slot);
dec_inv_item_quantity( item_slot, 1 );