From ff118ee31297737d34888c4ca07fd76f2b7ff184 Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 7 Apr 2008 21:24:45 +0000 Subject: Allow the player to swap places with neutral god gifts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4112 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/acr.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/acr.cc') diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 534c6117c5..596c57d734 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1674,7 +1674,7 @@ static void _experience_check() } #ifdef DEBUG_DIAGNOSTICS if (wearing_amulet(AMU_THE_GOURMAND)) - mprf(MSGCH_DIAGNOSTICS, "Gourmand charge: %d", + mprf(MSGCH_DIAGNOSTICS, "Gourmand charge: %d", you.duration[DUR_GOURMAND]); mprf(MSGCH_DIAGNOSTICS, "Turns spent on this level: %d", @@ -1682,7 +1682,7 @@ static void _experience_check() #endif } -static bool _mons_hostile( const monsters *mon) +static bool _mons_hostile(const monsters *mon) { return (!mons_friendly(mon) && !mons_neutral(mon)); } @@ -4079,17 +4079,17 @@ static void _move_player(int move_x, int move_y) const unsigned short targ_monst = mgrd[ targ_x ][ targ_y ]; const bool targ_pass = you.can_pass_through(targ_x, targ_y); - // you can swap places with a friendly monster if you're not confused - // or if both of you are inside a sanctuary + // you can swap places with a swappable monster if you're not + // confused, or if both of you are inside a sanctuary const bool can_swap_places = targ_monst != NON_MONSTER - && (mons_friendly(&menv[targ_monst]) + && (mons_is_swappable(&menv[targ_monst]) && !you.duration[DUR_CONF] || is_sanctuary(you.x_pos, you.y_pos) && is_sanctuary(targ_x, targ_y)); // cannot move away from mermaid but you CAN fight neighbouring squares if (you.duration[DUR_BEHELD] && !you.duration[DUR_CONF]) - { + { for (unsigned int i = 0; i < you.beheld_by.size(); i++) { monsters* mon = &menv[you.beheld_by[i]]; @@ -4134,7 +4134,7 @@ static void _move_player(int move_x, int move_y) snprintf(info, INFO_SIZE, "Really attack %s, despite your sanctuary?", mon->name(DESC_NOCAP_THE).c_str()); - + if (!yesno(info, true, 'n')) return; } -- cgit v1.2.3-54-g00ecf