From bf52b8a42b11cf6c3bad310e32afb9801bf2944c Mon Sep 17 00:00:00 2001 From: dolorous Date: Tue, 24 Jun 2008 02:14:54 +0000 Subject: If Xom gives you multiple non-demonic summons, make them friendly only 3/4 of the time, for consistency with single non-demonic summons. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6093 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/xom.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/xom.cc') diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 418858720d..754c6f5bd8 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -501,6 +501,16 @@ static bool _xom_is_good(int sever) (hostile < 11) ? (coinflip() ? 1 : 2) // 2/3: one is hostile : 3; // 1/12: both are hostile + // If we get only demons, they'll always be friendly. If we get + // only non-demons, there's a chance that they may be hostile. + if (numdifferent == numdemons) + { + if (numdifferent == 0) + hostiletype = 0; + else if (one_chance_in(4)) + hostiletype = 2; + } + bool success = false; for (int i = 0; i < numdemons; ++i) @@ -511,8 +521,7 @@ static bool _xom_is_good(int sever) { success = true; - if (hostiletype != 0 && numdifferent != numdemons - && numdifferent > 0) + if (hostiletype != 0) { monsters *mon = &menv[i]; -- cgit v1.2.3-54-g00ecf