diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-28 02:38:40 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-28 02:38:40 +0000 |
commit | d0e22192444cc1a233c24d234cc71c77b35f4c38 (patch) | |
tree | f349ff515c5094e7e4f8293428d312adbae5c740 /crawl-ref/source/xom.cc | |
parent | 2aa24954694bc86a4f9a8dbce8e991997c229311 (diff) | |
download | crawl-ref-d0e22192444cc1a233c24d234cc71c77b35f4c38.tar.gz crawl-ref-d0e22192444cc1a233c24d234cc71c77b35f4c38.zip |
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
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r-- | crawl-ref/source/xom.cc | 15 |
1 files changed, 8 insertions, 7 deletions
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) |