summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/xom.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-23 09:53:41 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-23 09:53:41 +0000
commitd40b5c49a223cb2bdad1e9a0df10631140b700a3 (patch)
tree1ce05afb305aafd41354bba5e853ea79796a819a /crawl-ref/source/xom.cc
parent2487cbfe7787fdd3d8908ec9ad384fbebf30ac9a (diff)
downloadcrawl-ref-d40b5c49a223cb2bdad1e9a0df10631140b700a3.tar.gz
crawl-ref-d40b5c49a223cb2bdad1e9a0df10631140b700a3.zip
* Fix Xom gifts not going Splash! in deep water.
* Limit Xom tele rounds to a maximum of 12 (unlikely, but you know...) * Update player doll for Merfolk entering/leaving water. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10379 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r--crawl-ref/source/xom.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 74c5af7596..b3ab56009a 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -575,6 +575,16 @@ static void _xom_make_item(object_class_type base, int subtype, int power)
items(true, base, subtype, true, power, MAKE_ITEM_RANDOM_RACE,
0, 0, GOD_XOM);
+ if (grid_destroys_items(grd(you.pos())))
+ {
+ if (!silenced(you.pos()))
+ mprf(MSGCH_SOUND, grid_item_destruction_message(grd(you.pos())));
+
+ simple_god_message(" snickers.", GOD_XOM);
+ destroy_item(thing_created, true);
+ thing_created = NON_ITEM;
+ }
+
if (thing_created == NON_ITEM)
{
god_speaks(GOD_XOM, "\"No, never mind.\"");
@@ -1689,7 +1699,8 @@ static bool _xom_is_good(int sever, int tension)
if (one_chance_in(10))
break;
}
- while (x_chance_in_y(3, 4) || player_in_a_dangerous_place());
+ while (x_chance_in_y(3, 4) || count > 7 + random2(5)
+ || player_in_a_dangerous_place());
maybe_update_stashes();
// Take a note.
@@ -2708,7 +2719,8 @@ static bool _xom_is_bad(int sever, int tension)
you_teleport_now(false);
more();
}
- while (x_chance_in_y(3, 4) && !player_in_a_dangerous_place());
+ while (count > 7 + random2(5)
+ || x_chance_in_y(3, 4) && !player_in_a_dangerous_place());
badness = player_in_a_dangerous_place() ? 3 : 1;
maybe_update_stashes();