diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-24 02:14:54 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-24 02:14:54 +0000 |
commit | bf52b8a42b11cf6c3bad310e32afb9801bf2944c (patch) | |
tree | ea54967717cfa93692c0504888f57178175b4e68 /crawl-ref/source/xom.cc | |
parent | aaa3e6a3caa51c41fc70582ed2d33e440b20e8e8 (diff) | |
download | crawl-ref-bf52b8a42b11cf6c3bad310e32afb9801bf2944c.tar.gz crawl-ref-bf52b8a42b11cf6c3bad310e32afb9801bf2944c.zip |
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
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r-- | crawl-ref/source/xom.cc | 13 |
1 files changed, 11 insertions, 2 deletions
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]; |