which includes the defender being invisble, being behind opaque clouds, and being behind a wall when hit with an area attack. Before the code was only checking invisibility, which doesn't take into account LOS blocking things like opaque clouds and walls.
Don't give a duplicate message when hitting a giant spore or ball lightning.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6239 c06c8d41-db1a-0410-9941-cceddc491573
7Z4BW72WSXVYBFEPMJI5PCFAV7POF6JSCX4MAW47G3CGTQAAPQOAC
GAUT326KHT3MMZPC7TJUOKGPZ6X624E7Z3IOFZEXYWUCORBCZTOAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
C5WZ62XDFNON4HCJOXC6IL6SQYLE6TKX7DDSJX3MTWAZ4HHM27GQC
6YQRV6WDHJU3CQSXGZLXLNOKGLBCTMOIU4ZWZVFSQULY7OUFX7AQC
5HGMULU7IWTFJJH35S6XTCW3YZEMCORXHQL6NVY2TO4DUMVITNJAC
R22TTMI6WXWULC7ODKFF3QCB7MOTETQQ6IR4BUCUPOCQKQNCTT5AC
2WVP47RBNL5OVYMAZH7TKRYD7F2TGSZ5X74PWVGAYCQP26G3JUHQC
E5DMZFW6WCFAKTKKOQPYTQXZ2CGLWMVH64LRXDUI2UIG4VYUHIVQC
RSIUBEQUGNU4LO6KH4PKVROWQS33DAKSY4XFVGN7T3CEKSXABCSAC
// plants) or invisible monsters.
if (!defender->cannot_fight() && defender->visible_to(attacker))
// plants) or monsters the attacker can't see (either due to
// invisibility or being behind opaque clouds).
if (!defender->cannot_fight() && attacker->can_see(defender))
if (def->type == MONS_GIANT_SPORE || def->type == MONS_BALL_LIGHTNING)
{
msg::stream << "You " << attack_verb << ' '
<< def->name(DESC_NOCAP_THE) << '.' << std::endl;
}