From f3b1762e5a7ce54cb41729e3d4cedf482c4a42e9 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 26 Mar 2009 23:24:34 +0000 Subject: * Fix Xom's interest wrapping around from 0 to 255. (!!!) * In xom_acts, if Xom was bored (and now did something bad) reroll interest. * Greatly decrease amusement derived from the player entering a new level. (However, entering a new level via escape hatch or shaft is REALLY amusing, more so the deeper the shaft.) * Xom may be amused if you are caught in a net and there are hostile monsters around. * Fix draconian tiles not showing up correctly for Detect Creatures. * Improve card descriptions output for Triple Draw/Stack Five. * In inventory, add '&' hotkey for useless (== inedible) chunks. Still needs documentation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9557 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/traps.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/traps.cc') diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index f156d6e0d3..ced11f2d1f 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -43,6 +43,7 @@ REVISION("$Rev$"); #include "transfor.h" #include "tutorial.h" #include "view.h" +#include "xom.h" bool trap_def::active() const { @@ -271,15 +272,15 @@ void monster_caught_in_net(monsters *mon, bolt &pbolt) } } -void player_caught_in_net() +bool player_caught_in_net() { if (you.body_size(PSIZE_BODY) >= SIZE_GIANT) - return; + return (false); if (you.flight_mode() == FL_FLY && (!you.confused() || one_chance_in(3))) { mpr("You dart out from under the net!"); - return; + return (false); } if (!you.attribute[ATTR_HELD]) @@ -297,7 +298,9 @@ void player_caught_in_net() } stop_delay(true); // even stair delays + return (true); } + return (false); } void check_net_will_hold_monster(monsters *mons) @@ -496,7 +499,8 @@ void trap_def::trigger(actor& triggerer, bool flat_footed) else { mpr("A large net falls onto you!"); - player_caught_in_net(); + if (player_caught_in_net() && player_in_a_dangerous_place()) + xom_is_stimulated(64); } item_def item = this->generate_trap_item(); @@ -573,6 +577,9 @@ void trap_def::trigger(actor& triggerer, bool flat_footed) { mpr((trig_knows) ? "You enter the Zot trap." : "Oh no! You have blundered into a Zot trap!"); + if (!trig_knows) + xom_is_stimulated(32); + MiscastEffect( &you, ZOT_TRAP_MISCAST, SPTYP_RANDOM, 3, "a Zot trap" ); } -- cgit v1.2.3-54-g00ecf