Fix =sustenance not being treated as useless for Mummies.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7982 c06c8d41-db1a-0410-9941-cceddc491573
6ZBNP5FQRPWMZYXUO6N7RW5ZN7TJCYYLBNMHYYVSPXCYRQFCQ6YAC BR42OZ3CHR5F5MKPBUOPRG3EXIEQRRRWD5L54BTZQRDXV6VBLATQC 55PFDYPVE6JVGDYPCFUE4XS2523PVSV4CSIFRW6A2GGX4I6VWRWQC UEZHRKVE25KVD6RRO7IFTTDSPKPM74LSC5I7J6O7ASSKDBQZXEGAC RW3H34H6MQOI3CW4ILNH3VXRKQY73KIUGZKGDQDXPGGB5D6N4RFAC 5NEEYVF4MHEA536IUWEOSE2YQYKPK7CVH2Q7TYPS674V5KQZILNQC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC P5TRGRH7XMQSPCZKM5IEEO34TY6WMLGHHX7BU6Y453JFRXLUR2VQC SIDH2P7NBIG5KEOE27XHD3ZT2NQ2OJZFN6VZXWNWYFFY5YVXSSVQC HFZQADL3R7ITWM3VPW5G3NCB2AHRMAMKYZOI3STW5LWUCTV4FFFQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC Y4NA3JSN63RLATF4NNBPSR5CWF5Z7UEMWCGVX4B6NOAR47CGM4GQC WP5VP57D5BWKDAS7AA224OV2RX4O4BPTI2BLY7TS3T2O2PLUGXCQC LH4OYDEWEON5QNUCM74R7MNBJDP7O4XRETY74ZMYSXUXYQV427PAC 5FMXUX2ZFIF6NQZCS54W7ZOCVSH7XR6UIMQ5FW2UZLEN4EWP5PSAC SVY2PTCLXR3KNPQAWXVXTTGCC5DR334HOAKHYO3VDDRWM2BWMALAC AVCMVFA3MKCXHO6H44UK5KJNIHTGQV7UA7GYXM26VI6TXXU5ZN6QC CHO4U5JC3RNTLXVIDXXJYZMOBZJ4VXW2GVJWDOTBRKK3AJ36LDLQC 2G7MZ653N3JUHJ4DA5Q7VRO3S5T27DLPKDCJEKB6DGYSTXULUVWAC AXRXY7RSEN3QHQRK6SFEH2OZAAYJRR5RBBBFF4YJF756V2FPFJ3AC D54BYIF6H4WYWDUFPAEPH3HFZLRFCWSATJ2JBS3I4S2JYKZFB34QC WZTIVJJVK7CAHU5D2IYPH7TWGTLBBYPJZJYPGWKCDGM3JQ6Z6VKAC JN4GPMQCXOY5ICTLPLWP6DXBFULN4GMAEK7T4GXTZVIJAUUKBBYAC R325RPUV26YH65VIJKYEFZ2XCVXQHO5N3ELPX6RNQ5TSI3JJNQGQC GSJA56E3ORVIBCBA6T6WU2HE4DCLJ6NZPW76O7L54N4CYPKLJOWQC SPWOUV6ZNHLBSAX455ACJDBEJYVFHGO4H76L4NPAE5DF6BEAK34QC LHYTGOCNDWX3CVD2HSQ6LAYC6NLKKI6ZKKNWZ5IQWP6YP5PQEVWQC FWLLPRIZDBJVQ336TPOLYAFT6WYGAFC52OFIOTRN2YQPFZ3PQVRQC SKWBAGSAB625IIN4UP3NCPRX2H3KCPC2LULHS2A7JVRLO3EUBJDAC Y56C5OMUQ5XF2G6DKDV4R5MED44UOIUPTBBQVWQBUHYIXYA5MOZAC YWT3IVJQ2NI6S47ZLGEHIW7C6YUFHUNQ5XMU6MVYRBWE4T3ALQWQC H3552BCIAVBLKAYKE4DHFLBLFW5RGRMYBMRRYHYEB5IPIJRUVU5QC const bool native = mons_is_native_in_branch(mon);int range = 0;switch (mons_intel(mon)){case I_PLANT:range = 2;break;case I_INSECT:range = 4;break;case I_ANIMAL:range = 5;break;case I_NORMAL:range = LOS_RADIUS;break;default:// Highly intelligent monsters can find their way// anywhere. (range == 0 means no restriction.)break;}if (range){if (native)range += 3;else if (mons_class_flag(mon->type, M_BLOOD_SCENT))range++;}
const int range = mons_tracking_range(mon);
int range = 0;switch (mons_intel(mon)){case I_PLANT:range = 2;break;case I_INSECT:range = 4;break;case I_ANIMAL:range = 5;break;case I_NORMAL:range = LOS_RADIUS;break;default:// Highly intelligent monsters can find their way// anywhere. (range == 0 means no restriction.)break;}if (range){if (mons_is_native_in_branch(mon))range += 3;else if (mons_class_flag(mon->type, M_BLOOD_SCENT))range++;}return (range);}
// Returns true if the monster has a path to the player, or it has to be// assumed that this is the case.static bool _mons_has_path_to_player(const monsters *mon){int m = monster_index(mon);// Don't consider sleeping monsters safe, in case the player would// rather retreat and try another path for maximum stabbing chances.if (mons_is_sleeping(mon))return (true);// If the monster is awake and knows a path towards the player// (even though the player cannot know this) treat it as unsafe.if (mon->travel_target == MTRAV_PLAYER)return (true);if (mon->travel_target == MTRAV_KNOWN_UNREACHABLE)return (false);// Try to find a path from monster to player, using the map as it's// known to the player and assuming unknown terrain to be traversable.monster_pathfind mp;const int range = mons_tracking_range(mon);if (range > 0)mp.set_range(range);if (mp.init_pathfind(&menv[m], you.pos(), true, false, true))return (true);// Now we know the monster cannot possibly reach the player.menv[m].travel_target = MTRAV_KNOWN_UNREACHABLE;return (false);}
MTRAV_UNREACHABLE // Not travelling because target is unreachable.
MTRAV_UNREACHABLE, // Not travelling because target is unreachable.MTRAV_KNOWN_UNREACHABLE // As above, and the player knows this.
Please submit a bug report on Sourceforge, and give as much information as you can. (What were you doing at the time? What did you expect to happen, what happened instead? etc.) Sometimes a screenshot can be helpful. For crashes, or monsters/items/levels behaving oddly, we probably need a save file. To be on the safe side, attach the entire zipped save of the character on question. If there are error messages, please write them down.
Please submit a bug report on Sourceforge, and give as much information as you can. (What were you doing at the time? What did you expect to happen, what happened instead? etc.) Sometimes a screenshot can be helpful. For crashes, or monsters/items/levels behaving oddly, we probably need a save file. To be on the safe side, attach the entire zipped save of the character in question. If there are error messages, please write them down.