From 8cbb227becdc172839b901aedf972022dc73118d Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 8 Dec 2008 20:15:03 +0000 Subject: Apply a bunch of trunk commits, mostly by Haran, namely: 6766 (partly), 6834 (partly), 6867, 6892, 6903, 6906, 6908, 6909, 6927, 6928, 6929, 6943, 6945, 6946 * Message/description tweaks. * Fix enchanting hides not updating AC. * Fix incorrect score calculation. * All 't' commands now take a turn. * Don't prompt when swapping into dangerous terrain. * Fix backwards stealth check. * Fix off-by-1 error when selecting starting weapon. * Lichform discards holy wrath weapons. * Reinitialise zap counter for recharged wands, mention charges. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7786 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index a651eacd98..494de41b99 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1831,6 +1831,13 @@ bool swap_check(monsters *monster, coord_def &loc) const int mgrid = grd[monster->x][monster->y]; + // Don't move onto dangerous terrain. + if (is_grid_dangerous(mgrid)) + { + canned_msg(MSG_UNTHINKING_ACT); + return (false); + } + if (mons_is_caught(monster)) { simple_monster_message(monster, " is held in a net!"); @@ -2753,7 +2760,7 @@ static void _handle_behaviour(monsters *mon) { if (mon->foe == MHITYOU) { - if (random2(you.skills[SK_STEALTH]/3)) + if (one_chance_in(you.skills[SK_STEALTH]/3)) { mon->target_x = you.x_pos; mon->target_y = you.y_pos; -- cgit v1.2.3-54-g00ecf