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:
parent
b302aabcca
commit
27842c9d96
1 changed files with 11 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue