summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-11 12:29:52 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-11 12:29:52 +0000
commit8d6d28ffbb9f2e453fa01e6dcd7111554c191f2e (patch)
treedfb811fa3fd71cb3db4c7bd46a553691cdc4e4f0
parenta4fed84d4b82c0751f2ef272dc440a08f580fd3e (diff)
downloadcrawl-ref-8d6d28ffbb9f2e453fa01e6dcd7111554c191f2e.tar.gz
crawl-ref-8d6d28ffbb9f2e453fa01e6dcd7111554c191f2e.zip
Fixed 1594109: Bad messages when non-existing weapons dance, plus
Xom shouldn't try to make it happen. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@379 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/religion.cc2
-rw-r--r--crawl-ref/source/spells3.cc6
2 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index ddaa4a7182..805c652d77 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -733,7 +733,7 @@ void Xom_acts(bool niceness, int sever, bool force_sever)
(temp_rand == 2) ? "\"Let's see if it's strong enough to survive yet.\""
: "You hear Xom's maniacal laughter.");
- if (one_chance_in(4))
+ if (one_chance_in(4) && (you.equip[EQ_WEAPON] != -1) )
dancing_weapon(100, true); // nasty, but fun
else
{
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index a913396f0a..2d74e8a92f 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -39,6 +39,7 @@
#include "player.h"
#include "randart.h"
#include "spells1.h"
+#include "spells4.h"
#include "spl-cast.h"
#include "spl-util.h"
#include "stuff.h"
@@ -502,7 +503,10 @@ void dancing_weapon(int pow, bool force_hostile)
return;
failed_spell:
- mpr("Your weapon vibrates crazily for a second.");
+ if ( wpn != -1 )
+ mpr("Your weapon vibrates crazily for a second.");
+ else
+ mprf(MSGCH_PLAIN, "Your %s twitch.", your_hand(true));
} // end dancing_weapon()
static bool monster_on_level(int monster)