1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-08-10 22:51:38 +01:00

The dragonhead shield should pay attention to ZAP_POS()

Once it finds a !ZAP_POS() square, it should break out of the inner loop after checking if the monster in that square (if any) is a good target.
This commit is contained in:
ChrisANG 2021-08-20 14:50:12 -04:00
parent b302aabcca
commit 27842c9d96

View file

@ -4008,14 +4008,18 @@ struct obj *wep;
if(!isok(curx, cury))
continue;
else mdef = m_u_at(curx, cury);
if(!mdef)
if(!mdef){
if(!ZAP_POS(levl[curx][cury].typ))
break; //Can no longer zap through here
//else
continue;
}
youdef = (mdef == &youmonst);
if(DEADMONSTER(mdef))
continue;
if(youagr && mdef->mpeaceful){
gooddir = FALSE;
break; //break out of inner loop now, we found a bad target.
@ -4038,6 +4042,9 @@ struct obj *wep;
//else found a good target over here, and haven't hit a bad one (yet)
gooddir = TRUE;
if(!ZAP_POS(levl[curx][cury].typ))
break; //Can no longer zap through here
}
//found good direction, break out of outer loop
if(gooddir)