simple_monster_message uses instead of MSGCH_PLAIN if the monster in question is friendly, and such messages (e.g. "Your imp blinks", but also all other similar messages) won't interrupt resting nor running.
Also clean up travel.cc a bit, esp. the traversable_grid check that now simply uses a for loop rather than list all traversable grids.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5297 c06c8d41-db1a-0410-9941-cceddc491573
EJRKMYKMOYRQXTWGFTMADEWIGWLMWHMUDA73AUT7HO5OBK2GUQEAC NO2TVO6BFGXCJWEWQVJJU7TYUPAZS5ESQAOUUKZOIU52I2AFX6FQC HIPFIMUOA7DFOFV3DQ55YZJVGNU2GNDYFUCB4MRPUR5DTYDO5YMAC DHXIQXK5VTL5JDDEERAVLZK4KBQLXFTBN5TQ6MH3PRBLG5ULOS4AC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC RC6L3CIBLJEH4GWRFD7UQNGI6PZT74FRUVOYHSAN2XCC74NZUASQC 2WRXQTGYDBLV46WRNVIUKGNA5QS563XZNNW3N2L6PVOCHIP2YGHQC TAHSTXR7ROOMDFUSBUU4ZAIEWQLAS5CIRCTARLD4Q2BGNLSL7E5QC SCWXQW5H65OXUP2MEJ2MEEAVPSRJDT3RQGKYCMKVTORS2334PQSQC 6VWEOFSQULR4MFAPQATLUPHQVSOGB4LGSSTDWLRROFDC62TDW2VAC LDBTCT5WIPLJPZWXS2RUQ26QKISCUUTLO77M464WOE6VSYSNPKYAC E7DV36ZR6TOGBD75BHGARCMIQQS6MSV7V3A7M7V4LOFHEC5NF6CQC 45EMD3KLQPMERNMIKU5G76H6556XOMIW352TSBP7VLWJX2YYGS7AC WWR4IDWLXP4XLBWDZBA5GFG7CRKUJQNRK7FFUFOISK6OJTMYQPFQC TZ55IZNANEJO2WDTKYWVLY2W2VV6BR7WKIN7XLNISAMMFT6LG2WQC TLO257LZSB6ZO36STDUEWJBO2LETXFKTFGXELA6Y4BZBVAEIIINAC GQL5SIGBHLU3FMCE54XVGLR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x,y) is okay to travel over. If ignore_hostile* is true, returns true even for dungeon features the character can normally* not cross safely (deep water, lava, traps).*/
// Returns true if the square at (x,y) is okay to travel over. If ignore_hostile// is true, returns true even for dungeon features the character can normally// not cross safely (deep water, lava, traps).
// FIXME: Need a better way to do this. :-(traversable_terrain[DNGN_FLOOR] =traversable_terrain[DNGN_FLOOR_SPECIAL] =traversable_terrain[DNGN_ENTER_HELL] =traversable_terrain[DNGN_OPEN_DOOR] =traversable_terrain[DNGN_UNDISCOVERED_TRAP] =traversable_terrain[DNGN_ENTER_SHOP] =traversable_terrain[DNGN_ENTER_LABYRINTH] =traversable_terrain[DNGN_STONE_STAIRS_DOWN_I] =traversable_terrain[DNGN_STONE_STAIRS_DOWN_II] =traversable_terrain[DNGN_STONE_STAIRS_DOWN_III] =traversable_terrain[DNGN_ESCAPE_HATCH_DOWN] =traversable_terrain[DNGN_STONE_STAIRS_UP_I] =traversable_terrain[DNGN_STONE_STAIRS_UP_II] =traversable_terrain[DNGN_STONE_STAIRS_UP_III] =traversable_terrain[DNGN_ESCAPE_HATCH_UP] =traversable_terrain[DNGN_ENTER_DIS] =traversable_terrain[DNGN_ENTER_GEHENNA] =traversable_terrain[DNGN_ENTER_COCYTUS] =traversable_terrain[DNGN_ENTER_TARTARUS] =traversable_terrain[DNGN_ENTER_ABYSS] =traversable_terrain[DNGN_EXIT_ABYSS] =traversable_terrain[DNGN_STONE_ARCH] =traversable_terrain[DNGN_ENTER_PANDEMONIUM] =traversable_terrain[DNGN_EXIT_PANDEMONIUM] =traversable_terrain[DNGN_TRANSIT_PANDEMONIUM] =traversable_terrain[DNGN_ENTER_ORCISH_MINES] =traversable_terrain[DNGN_ENTER_HIVE] =traversable_terrain[DNGN_ENTER_LAIR] =traversable_terrain[DNGN_ENTER_SLIME_PITS] =traversable_terrain[DNGN_ENTER_VAULTS] =traversable_terrain[DNGN_ENTER_CRYPT] =traversable_terrain[DNGN_ENTER_HALL_OF_BLADES] =traversable_terrain[DNGN_ENTER_ZOT] =traversable_terrain[DNGN_ENTER_TEMPLE] =traversable_terrain[DNGN_ENTER_SNAKE_PIT] =traversable_terrain[DNGN_ENTER_ELVEN_HALLS] =traversable_terrain[DNGN_ENTER_TOMB] =traversable_terrain[DNGN_ENTER_SWAMP] =traversable_terrain[DNGN_ENTER_SHOALS] =traversable_terrain[DNGN_RETURN_FROM_ORCISH_MINES] =traversable_terrain[DNGN_RETURN_FROM_HIVE] =traversable_terrain[DNGN_RETURN_FROM_LAIR] =traversable_terrain[DNGN_RETURN_FROM_SLIME_PITS] =traversable_terrain[DNGN_RETURN_FROM_VAULTS] =traversable_terrain[DNGN_RETURN_FROM_CRYPT] =traversable_terrain[DNGN_RETURN_FROM_HALL_OF_BLADES] =traversable_terrain[DNGN_RETURN_FROM_ZOT] =traversable_terrain[DNGN_RETURN_FROM_TEMPLE] =traversable_terrain[DNGN_RETURN_FROM_SNAKE_PIT] =traversable_terrain[DNGN_RETURN_FROM_ELVEN_HALLS] =traversable_terrain[DNGN_RETURN_FROM_TOMB] =traversable_terrain[DNGN_RETURN_FROM_SWAMP] =traversable_terrain[DNGN_RETURN_FROM_SHOALS] =traversable_terrain[DNGN_ENTER_PORTAL_VAULT] =traversable_terrain[DNGN_EXIT_PORTAL_VAULT] =traversable_terrain[DNGN_ALTAR_ZIN] =traversable_terrain[DNGN_ALTAR_SHINING_ONE] =traversable_terrain[DNGN_ALTAR_KIKUBAAQUDGHA] =traversable_terrain[DNGN_ALTAR_YREDELEMNUL] =traversable_terrain[DNGN_ALTAR_XOM] =traversable_terrain[DNGN_ALTAR_VEHUMET] =traversable_terrain[DNGN_ALTAR_OKAWARU] =traversable_terrain[DNGN_ALTAR_MAKHLEB] =traversable_terrain[DNGN_ALTAR_SIF_MUNA] =traversable_terrain[DNGN_ALTAR_TROG] =traversable_terrain[DNGN_ALTAR_NEMELEX_XOBEH] =traversable_terrain[DNGN_ALTAR_ELYVILON] =traversable_terrain[DNGN_ALTAR_LUGONU] =traversable_terrain[DNGN_ALTAR_BEOGH] =traversable_terrain[DNGN_FOUNTAIN_BLUE] =traversable_terrain[DNGN_FOUNTAIN_SPARKLING] =traversable_terrain[DNGN_FOUNTAIN_BLOOD] =traversable_terrain[DNGN_DRY_FOUNTAIN_BLUE] =traversable_terrain[DNGN_DRY_FOUNTAIN_SPARKLING] =traversable_terrain[DNGN_DRY_FOUNTAIN_BLOOD] =traversable_terrain[DNGN_PERMADRY_FOUNTAIN] =
for (int feat = DNGN_FLOOR_MIN; feat < NUM_REAL_FEATURES; feat++){if (feat >= DNGN_TRAP_MECHANICAL && feat <= DNGN_TRAP_NATURAL)continue;traversable_terrain[feat] = TRAVERSABLE;}// A few special cases...
/** Given a dungeon feature description, returns the feature number. This is a* crude hack and currently recognises only (deep/shallow) water. (XXX)** Returns -1 if the feature named is not recognised, else returns the feature* number (guaranteed to be 0-255).*/
// Given a dungeon feature description, returns the feature number. This is a// crude hack and currently recognises only (deep/shallow) water. (XXX)//// Returns -1 if the feature named is not recognised, else returns the feature// number (guaranteed to be 0-255).
#define ES_item (Options.explore_stop & ES_ITEM)#define ES_shop (Options.explore_stop & ES_SHOP)#define ES_stair (Options.explore_stop & ES_STAIR)#define ES_altar (Options.explore_stop & ES_ALTAR)
#define ES_item (Options.explore_stop & ES_ITEM)#define ES_shop (Options.explore_stop & ES_SHOP)#define ES_stair (Options.explore_stop & ES_STAIR)#define ES_altar (Options.explore_stop & ES_ALTAR)
/** Adds interesting stuf on (x, y) to explore_discoveries.** NOTE: These are env.map coords, add +1 to get grid coords.*/
// Adds interesting stuff on (x, y) to explore_discoveries.//// NOTE: These are env.map coords, add +1 to get grid coords.
/** Top-level travel control (called from input() in acr.cc).** travel() is responsible for making the individual moves that constitute* (interlevel) travel and explore and deciding when travel and explore* end.** Don't call travel() if you.running >= 0.*/
// Top-level travel control (called from input() in acr.cc).//// travel() is responsible for making the individual moves that constitute// (interlevel) travel and explore and deciding when travel and explore// end.//// Don't call travel() if you.running >= 0.
/** The travel algorithm is based on the NetHack travel code written by Warwick* Allison - used with his permission.*/
// The travel algorithm is based on the NetHack travel code written by Warwick// Allison - used with his permission.
/** Returns the number of stairs the player would need to take to go from* the 'first' level to the 'second' level. If there's no obvious route between* 'first' and 'second', returns -1. If first == second, returns 0.*/
// Returns the number of stairs the player would need to take to go from// the 'first' level to the 'second' level. If there's no obvious route between// 'first' and 'second', returns -1. If first == second, returns 0.
/** Returns a list of the branches that the player knows the location of the* stairs to, in the same order as overmap.cc lists them.*/
// Returns a list of the branches that the player knows the location of the// stairs to, in the same order as overmap.cc lists them.
static int _find_transtravel_stair( const level_id &cur,const level_pos &target,int distance,// This is actually the current position// on cur, not necessarily a stair.const coord_def &stair,level_id &closest_level,int &best_level_distance,coord_def &best_stair,const bool target_has_excludes )
static int _find_transtravel_stair( const level_id &cur,const level_pos &target,int distance,// This is actually the current position// on cur, not necessarily a stair.const coord_def &stair,level_id &closest_level,int &best_level_distance,coord_def &best_stair,const bool target_has_excludes )
/** Given a feature vector, arranges the features in the order that the player* is most likely to be interested in. Currently, the only thing it does is to* put altars of the player's religion at the front of the list.*/
// Given a feature vector, arranges the features in the order that the player// is most likely to be interested in. Currently, the only thing it does is to// put altars of the player's religion at the front of the list.
"plain", "prompt", "god", "pray", "duration", "danger", "warning", "food","recovery", "sound", "talk", "talk_visual", "intrinsic_gain", "mutation","monster_spell", "monster_enchant", "friend_spell", "friend_enchant","monster_damage", "monster_target", "rotten_meat", "equipment", "floor","multiturn", "examine", "examine_filter", "diagnostic", "error","tutorial"
"plain", "friend_action", "prompt", "god", "pray", "duration", "danger","warning", "food", "recovery", "sound", "talk", "talk_visual","intrinsic_gain", "mutation", "monster_spell", "monster_enchant","friend_spell", "friend_enchant", "monster_damage", "monster_target","rotten_meat", "equipment", "floor", "multiturn", "examine","examine_filter", "diagnostic", "error", "tutorial"