1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-07-26 23:32:25 +01:00

Fix the don't-target-friendlies code for clawed hands.

This commit is contained in:
ChrisANG 2021-05-27 22:09:43 -04:00
parent a1e54fda00
commit 0df74b7866

View file

@ -806,8 +806,8 @@ int tary;
struct monst *mdef2 = m_u_at(tarx + dx, tary + dy);
if (mdef2
&& (!DEADMONSTER(mdef2) || mdef2 == &youmonst)
&& ((mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
(mdef2 == &youmonst && !magr->mpeaceful) ||
&& ((!youagr && mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
(!youagr && mdef2 == &youmonst && !magr->mpeaceful) ||
(youagr && !mdef2->mpeaceful))
){ //Can hit a worm multiple times
int vis2 = VIS_NONE;
@ -829,8 +829,8 @@ int tary;
struct monst *mdef2 = m_u_at(x(magr) + nx, y(magr) + ny);
if (mdef2
&& (!DEADMONSTER(mdef2) || mdef2 == &youmonst)
&& ((mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
(mdef2 == &youmonst && !magr->mpeaceful) ||
&& ((!youagr && mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
(!youagr && mdef2 == &youmonst && !magr->mpeaceful) ||
(youagr && !mdef2->mpeaceful))
) { //Can hit a worm multiple times
int vis2 = VIS_NONE;
@ -851,8 +851,8 @@ int tary;
struct monst *mdef2 = m_u_at(x(magr) + nx, y(magr) + ny);
if (mdef2
&& (!DEADMONSTER(mdef2) || mdef2 == &youmonst)
&& ((mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
(mdef2 == &youmonst && !magr->mpeaceful) ||
&& ((!youagr && mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
(!youagr && mdef2 == &youmonst && !magr->mpeaceful) ||
(youagr && !mdef2->mpeaceful))
) { //Can hit a worm multiple times
int vis2 = VIS_NONE;
@ -888,8 +888,8 @@ int tary;
struct monst *mdef2 = m_u_at(tarx + dx, tary + dy);
if (mdef2
&& (!DEADMONSTER(mdef2) || mdef2 == &youmonst)
&& ((mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
(mdef2 == &youmonst && !magr->mpeaceful) ||
&& ((!youagr && mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
(!youagr && mdef2 == &youmonst && !magr->mpeaceful) ||
(youagr && !mdef2->mpeaceful))
) { //Can hit a worm multiple times
int vis2 = VIS_NONE;