summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/xom.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-23 02:18:21 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-23 02:18:21 +0000
commitc34de0e4c69980dddbbfbacd067356b8fbd4f48a (patch)
treef18f6e5be3e215200a1d199036f864461aa3cb37 /crawl-ref/source/xom.cc
parent3f80cfb900d7fed4e4dca0c89af68cb15dfcda52 (diff)
downloadcrawl-ref-c34de0e4c69980dddbbfbacd067356b8fbd4f48a.tar.gz
crawl-ref-c34de0e4c69980dddbbfbacd067356b8fbd4f48a.zip
Fix message sequences again.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6063 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r--crawl-ref/source/xom.cc29
1 files changed, 13 insertions, 16 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index e1a4012a7a..1746e57143 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -503,12 +503,19 @@ static bool xom_is_good(int sever)
success = true;
}
- for (int i = 0; i < numdemons; ++i)
+ if (success)
{
- if (summons[i] != -1)
+ if (numdifferent == numdemons)
+ god_speaks(GOD_XOM, _get_xom_speech("multiple holy summons"));
+ else if (numdifferent > 0)
+ god_speaks(GOD_XOM, _get_xom_speech("multiple mixed summons"));
+ else
+ god_speaks(GOD_XOM, _get_xom_speech("multiple summons"));
+
+ for (int i = 0; i < numdemons; ++i)
{
- if (numdifferent != numdemons && numdifferent > 0
- && hostiletype != 0)
+ if (summons[i] != -1 && hostiletype != 0
+ && numdifferent != numdemons && numdifferent > 0)
{
monsters *mon = &menv[i];
const bool is_demonic = (mons_holiness(mon) == MH_DEMONIC);
@@ -525,21 +532,11 @@ static bool xom_is_good(int sever)
player_angers_monster(&menv[summons[i]]);
}
- }
-
- delete[] summons;
-
- if (success)
- {
- if (numdifferent == numdemons)
- god_speaks(GOD_XOM, _get_xom_speech("multiple holy summons"));
- else if (numdifferent > 0)
- god_speaks(GOD_XOM, _get_xom_speech("multiple mixed summons"));
- else
- god_speaks(GOD_XOM, _get_xom_speech("multiple summons"));
done = true;
}
+
+ delete[] summons;
}
else if (random2(sever) <= 4)
{