summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-14 23:26:17 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-14 23:26:17 +0000
commitd5a459111e73159720455c50ab27366ffaded5d5 (patch)
treeb88000ccfce273e59b804f199387ddac87344cfb /crawl-ref/source/spells3.cc
parent07dae10ec572e5757acffd430760b2f05214172f (diff)
downloadcrawl-ref-d5a459111e73159720455c50ab27366ffaded5d5.tar.gz
crawl-ref-d5a459111e73159720455c50ab27366ffaded5d5.zip
Simplify.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9485 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index ace14c81ce..7d6eeafdde 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -987,7 +987,7 @@ int animate_dead(actor *caster, int pow, beh_type beha, unsigned short hitting,
// reforming the original monster out of ice anyways.
bool cast_simulacrum(int pow, god_type god)
{
- bool success = false;
+ int count = 0;
const item_def* weapon = you.weapon();
@@ -1013,7 +1013,7 @@ bool cast_simulacrum(int pow, god_type god)
if (monster != -1)
{
- success = true;
+ count++;
dec_inv_item_quantity(you.equip[EQ_WEAPON], 1);
@@ -1021,7 +1021,7 @@ bool cast_simulacrum(int pow, god_type god)
}
}
- if (!success)
+ if (count == 0)
canned_msg(MSG_NOTHING_HAPPENS);
}
else
@@ -1030,7 +1030,7 @@ bool cast_simulacrum(int pow, god_type god)
"effective!");
}
- return (success);
+ return (count > 0);
}
bool cast_twisted_resurrection(int pow, god_type god)