summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-24 05:28:37 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-24 05:28:37 +0000
commite91373c5cee34bd369bc8171161981301099c5a4 (patch)
tree4641da52297c6c55e3760ad18e50c44257167cec
parent06c7460834600ec11b2123ad73193d10e083ae39 (diff)
downloadcrawl-ref-e91373c5cee34bd369bc8171161981301099c5a4.tar.gz
crawl-ref-e91373c5cee34bd369bc8171161981301099c5a4.zip
Fix bad logic for determining the behavior of Xom's factions.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6104 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/xom.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index e02af6de29..d38e3d01da 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -511,16 +511,13 @@ static bool _xom_is_good(int sever)
else
god_speaks(GOD_XOM, _get_xom_speech("multiple summons"));
- if (numdifferent == numdemons)
- {
- // If we have only demons, they'll always be friendly.
- if (numdifferent == 0)
- hostiletype = 0;
- // If we have only non-demons, there's a chance that
- // they may be hostile.
- else if (one_chance_in(4))
- hostiletype = 2;
- }
+ // If we have only non-demons, there's a chance that they
+ // may be hostile.
+ if (numdifferent == numdemons && one_chance_in(4))
+ hostiletype = 2;
+ // If we have only demons, they'll always be friendly.
+ else if (numdifferent == 0)
+ hostiletype = 0;
for (int i = 0; i < numdemons; ++i)
{