From d0e22192444cc1a233c24d234cc71c77b35f4c38 Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 28 Apr 2008 02:38:40 +0000 Subject: Handle it properly when Xom tries to make your weapon a hostile dancing weapon and fails. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4720 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/xom.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/xom.cc') diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index bb8e61bc80..9f056c8932 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -837,13 +837,14 @@ static bool xom_is_bad(int sever) } else if (random2(sever) <= 9) { + bool success = false; + if (one_chance_in(4)) - dancing_weapon(100, true); // nasty, but fun + success = dancing_weapon(100, true); // nasty, but fun else { const int numdemons = std::min(random2(random2(random2(sever+1)+1)+1)+1, 14); - bool success = false; for (int i = 0; i < numdemons; i++) { @@ -854,13 +855,13 @@ static bool xom_is_bad(int sever) success = true; } } + } - if (success) - { - god_speaks(GOD_XOM, _get_xom_speech("hostile monster")); + if (success) + { + god_speaks(GOD_XOM, _get_xom_speech("hostile monster")); - done = true; - } + done = true; } } else if (random2(sever) <= 10) -- cgit v1.2.3-54-g00ecf