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 12:03:41 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-23 12:03:41 +0000
commitd3e93c074746027e209a67a247c7a0be78c5f40e (patch)
treefdcb4fc3520eaebe070455e4a30c67e1cabfe777 /crawl-ref/source/xom.cc
parent25178bf21218cca469f1b05c0634c8e0c2bc2a41 (diff)
downloadcrawl-ref-d3e93c074746027e209a67a247c7a0be78c5f40e.tar.gz
crawl-ref-d3e93c074746027e209a67a247c7a0be78c5f40e.zip
Backport r10380, and also backport flavour messages for entering Zot.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10381 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r--crawl-ref/source/xom.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index ee26016165..39533c4d4f 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.\"");
@@ -597,6 +607,9 @@ static void _xom_make_item(object_class_type base, int subtype, int power)
static void _xom_acquirement(object_class_type force_class)
{
+ if (grid_destroys_items(grd(you.pos())))
+ return;
+
god_acting gdact(GOD_XOM);
int item_index = NON_ITEM;
@@ -1689,7 +1702,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 +2722,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();