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:
parent
a1e54fda00
commit
0df74b7866
1 changed files with 8 additions and 8 deletions
16
src/xhity.c
16
src/xhity.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue