From fd89fbe84c262166ce919d8b22286b331c11186b Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 3 Aug 2009 10:33:42 +0000 Subject: Backport teleportation journey fix, and Ogre-Mage spellcasting description for ghosts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10485 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/skills2.cc | 2 +- crawl-ref/source/xom.cc | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc index e2d2f5774e..14744c9513 100644 --- a/crawl-ref/source/skills2.cc +++ b/crawl-ref/source/skills2.cc @@ -2001,7 +2001,7 @@ std::string skill_title( unsigned char best_skill, unsigned char skill_lev, break; case SK_SPELLCASTING: - if (player_genus(GENPC_OGRE)) + if (player_genus(GENPC_OGRE, static_cast(species))) { result = "Ogre-Mage"; break; diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 48a5beaa95..90bf73399b 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -1700,11 +1700,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. @@ -2719,15 +2718,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), -- cgit v1.2.3-54-g00ecf