1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-08-05 12:15:26 +01:00

Bugfix: AT_BEAM attacks require the target's true possition.

This was causing Binahs to blast through walls :(
This commit is contained in:
ChrisANG 2021-01-12 10:51:24 -05:00
parent bdfbc8df10
commit c72c9003ab

View file

@ -1031,6 +1031,10 @@ int tary;
(aatyp == AT_BREA ? FALSE : TRUE))) /* breath attacks overpenetrate targets */
continue;
if (aatyp == AT_BEAM && !(mdef && tarx == x(mdef) && tary == y(mdef)))
continue; /* Blast attacks require the target's true location */
/* Other attacks launch an actual ray or projectile that may go sailing past */
switch (aatyp) {
case AT_BREA:
if (ranged && !magr->mspec_used && (distmin(x(magr), y(magr), tarx, tary) <= BOLT_LIM) && rn2(3)) { // not in melee, 2/3 chance when ready