If a targeted spell doesn't exactly hit anything (because the monster was confused or the target was invisible) then, if appropriate, use the prepositions "past" or "next to" instead of "at".
If a targeted spell with an invisible beam with a message saying "gestures at" or "points to" doesn't exactly hit anything, then assume anything near the path implied by the gesture/pointing is the desired target.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8100 c06c8d41-db1a-0410-9941-cceddc491573
M7ZFG56FN7JSTREHU75K333KVVR75JZDZMIQGN44BLNXEKQXCX4AC TEHVEMSILVFVNVW5NC4PPRUAOUP2K6BTUOHKHQMJZIPIG2RDB4WAC LCDK2CK4O2RBLF2MAX75S2Q6ZKAX46WD6GOQDVIXUGHHXXZXMHRQC 774O5HM4CU5QYP4MPKKLHIVZQ5JLLZETYIDZZYBAPOJSO6ILC5RAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC ZEFGFQHN6J2S6EIPX7EPDG22C5YXTI6DMKQHHRCLWN5MQC44KY3AC JWJGOMVBPZRSP2VSHLFFFDIF2CS6UPBA6AHL7DAJWGBCHAV3PJDQC AJHVP42Y67SB4NKFMZB24524PGX2XA5WLFNEFV52MIGTS47ALMVQC std::string target = "something";if (!(flags & SPFLAG_TARGETING_MASK) || !in_bounds(pbolt.target))
bolt tracer = pbolt;if (targeted){// For a targeted but rangeless spell make the range positive so that// fire_tracer() will fill out path_taken.if (pbolt.range == 0 && pbolt.target != monster->pos())tracer.range = ENV_SHOW_DIAMETER;fire_tracer(monster, tracer);}std::string targ_prep = "at";std::string target = "nothing";if (!targeted)
bool mons_targ_aligned = false;
const bool gestured = msg.find("Gesture") != std::string::npos|| msg.find(" gesture") != std::string::npos|| msg.find("Point") != std::string::npos|| msg.find(" point") != std::string::npos;const bool visible_path = visible_beam || gestured;bool mons_targ_aligned = false;
}}
else if (visible_path && target == "nothing"){int count = 0;for (adjacent_iterator ai(pbolt.target); ai; ++ai){if (*ai == monster->pos())continue;if (*ai == you.pos()){targ_prep = "past";target = "you";break;}const int midx2 = mgrd(*ai);if (midx2 != NON_MONSTER && you.can_see(&menv[midx2])){targ_prep = "past";if (one_chance_in(count++))target = menv[midx2].name(DESC_NOCAP_THE);}}}} // for (unsigned int i = 0; i < path.size(); i++)// If the monster gestures to create an invisible beam then// assume that anything close to the beam is the intended target.if ((!visible_beam && gestured) || target == "nothing")targ_prep = "at";} // if (target == "nothing" && targeted)