diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-03 10:28:09 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-03 10:28:09 +0000 |
commit | 5b034d3af0173944e41aba9ba060f8edfd23a952 (patch) | |
tree | bcf953188ad1249f5b7cd8de6178004b32723340 /crawl-ref/source/xom.cc | |
parent | e3193b3225032156f6de6bfef6159790bb3b9b25 (diff) | |
download | crawl-ref-5b034d3af0173944e41aba9ba060f8edfd23a952.tar.gz crawl-ref-5b034d3af0173944e41aba9ba060f8edfd23a952.zip |
Really fix Xom's teleportation journeys.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10484 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r-- | crawl-ref/source/xom.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index c1d0419e53..ca6782ae57 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -1697,11 +1697,10 @@ static bool _xom_is_good(int sever, int tension) count++; you_teleport_now(false); more(); - if (one_chance_in(10)) + if (one_chance_in(10) || count >= 7 + random2(5)) break; } - while (x_chance_in_y(3, 4) || count <= 7 + random2(5) - || player_in_a_dangerous_place()); + while (x_chance_in_y(3, 4) || player_in_a_dangerous_place()); maybe_update_stashes(); // Take a note. @@ -2716,15 +2715,16 @@ static bool _xom_is_bad(int sever, int tension) int count = 0; do { - count++; you_teleport_now(false); more(); + if (count++ >= 7 + random2(5)) + break; } - while (count <= 7 + random2(5) - || x_chance_in_y(3, 4) && !player_in_a_dangerous_place()); - badness = player_in_a_dangerous_place() ? 3 : 1; + while (x_chance_in_y(3, 4) && !player_in_a_dangerous_place()); maybe_update_stashes(); + badness = player_in_a_dangerous_place() ? 3 : 1; + // Take a note. static char tele_buf[80]; snprintf(tele_buf, sizeof(tele_buf), |