summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 30a44a7134..d4f2989a2b 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -477,8 +477,6 @@ bool dancing_weapon(int pow, bool force_hostile,
{
bool success = true;
- int monster;
-
const int dur = std::min(2 + (random2(pow) / 5), 6);
const int wpn = you.equip[EQ_WEAPON];
@@ -494,9 +492,12 @@ bool dancing_weapon(int pow, bool force_hostile,
// See if we can get an mitm for the dancing weapon:
int i = get_item_slot();
+
if (i == NON_ITEM)
success = false;
+ int monster;
+
if (success)
{
// Cursed weapons become hostile.
@@ -554,10 +555,8 @@ bool dancing_weapon(int pow, bool force_hostile,
return (true);
}
-//
-// This function returns true if the player can use controlled
-// teleport here.
-//
+// This function returns true if the player can use controlled teleport
+// here.
bool allow_control_teleport( bool silent )
{
bool ret = true;