From: cohrs Date: Mon, 3 Mar 2003 05:56:58 +0000 (+0000) Subject: U58 - Targetting problem with infravision/ESP X-Git-Tag: MOVE2GIT~2114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b83d8d3b5d6045ad637d23b3f01727d5ad95d6c8;p=nethack U58 - Targetting problem with infravision/ESP A skilled/expert caster of fireball/cone of cold was not able to target a location with a monster seen only by infravision/ESP. Since you can focus on the monster there, targetting shouldn't fail in this case. Attempting to lock onto a monster inside stone still won't work. --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index d73c4ec5b..153362244 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -7,6 +7,8 @@ typos fixed in data.base bad capitalization of msg when charging for something that catches light missing opthelp for use_inverse Never say "It moves only reluctantly" +expert fireball/cone of cold could not target a monster seen only with + infravision or ESP Platform- and/or Interface-Specific Fixes diff --git a/src/spell.c b/src/spell.c index 4659cfa13..facd95a63 100644 --- a/src/spell.c +++ b/src/spell.c @@ -968,6 +968,7 @@ STATIC_OVL int throwspell() { coord cc; + struct monst *mtmp; if (u.uinwater) { pline("You're joking! In this weather?"); return 0; @@ -990,14 +991,16 @@ throwspell() u.dx = 0; u.dy = 0; return 1; - } else if (!cansee(cc.x, cc.y) || IS_STWALL(levl[cc.x][cc.y].typ)) { + } else if ((!cansee(cc.x, cc.y) && + (!(mtmp = m_at(cc.x, cc.y)) || !canspotmon(mtmp))) || + IS_STWALL(levl[cc.x][cc.y].typ)) { Your("mind fails to lock onto that location!"); return 0; - } else { - u.dx=cc.x; - u.dy=cc.y; - return 1; } + + u.dx = cc.x; + u.dy = cc.y; + return 1; } void