make attack result macros more distinguishable from makemon macros
Use the MM_ prefix only for the makemon macros, and change these five as follows: MM_MISS 0x0 -> M_ATTK_MISS /* aggressor missed */ MM_HIT 0x1 -> M_ATTK_HIT /* aggressor hit defender */ MM_DEF_DIED 0x2 -> M_ATTK_DEF_DIED /* defender died */ MM_AGR_DIED 0x4 -> M_ATTK_AGR_DIED /* aggressor died */ MM_AGR_DONE 0x8 -> M_ATTK_AGR_DONE /* aggressor is done with their turn */ include/hack.h:#define NO_MM_FLAGS 0x000000L /* use this rather than plain 0 */ include/hack.h:#define MM_NOWAIT 0x000002L /* don't set STRAT_WAITMASK flags */ include/hack.h:#define MM_NOCOUNTBIRTH 0x000004L /* don't increment born count (for revival) */ include/hack.h:#define MM_IGNOREWATER 0x000008L /* ignore water when positioning */ include/hack.h:#define MM_ADJACENTOK 0x000010L /* acceptable to use adjacent coordinates */ include/hack.h:#define MM_ANGRY 0x000020L /* monster is created angry */ include/hack.h:#define MM_NONAME 0x000040L /* monster is not christened */ include/hack.h:#define MM_EGD 0x000100L /* add egd structure */ include/hack.h:#define MM_EPRI 0x000200L /* add epri structure */ include/hack.h:#define MM_ESHK 0x000400L /* add eshk structure */ include/hack.h:#define MM_EMIN 0x000800L /* add emin structure */ include/hack.h:#define MM_EDOG 0x001000L /* add edog structure */ include/hack.h:#define MM_ASLEEP 0x002000L /* monsters should be generated asleep */ include/hack.h:#define MM_NOGRP 0x004000L /* suppress creation of monster groups */ include/hack.h:#define MM_NOTAIL 0x008000L /* if a long worm, don't give it a tail */ include/hack.h:#define MM_MALE 0x010000L /* male variation */ include/hack.h:#define MM_FEMALE 0x020000L /* female variation */ include/hack.h:#define MM_NOMSG 0x040000L /* no appear message */ include/hack.h:#define MM_NOEXCLAM 0x400000L /* more sedate "<mon> appears." mesg for ^G */ include/hack.h:#define MM_IGNORELAVA 0x800000L /* ignore lava when positioning */
This commit is contained in:
@@ -756,7 +756,7 @@ dochug(register struct monst* mtmp)
|
||||
for (a = &mdat->mattk[0]; a < &mdat->mattk[NATTK]; a++) {
|
||||
if (a->aatyp == AT_MAGC
|
||||
&& (a->adtyp == AD_SPEL || a->adtyp == AD_CLRC)) {
|
||||
if ((castmu(mtmp, a, FALSE, FALSE) & MM_HIT)) {
|
||||
if ((castmu(mtmp, a, FALSE, FALSE) & M_ATTK_HIT)) {
|
||||
status = MMOVE_DONE; /* bypass m_move() */
|
||||
break;
|
||||
}
|
||||
@@ -1506,9 +1506,9 @@ m_move(register struct monst* mtmp, register int after)
|
||||
|
||||
mtmp2 = m_at(nix, niy);
|
||||
mstatus = mdisplacem(mtmp, mtmp2, FALSE);
|
||||
if ((mstatus & MM_AGR_DIED) || (mstatus & MM_DEF_DIED))
|
||||
if ((mstatus & M_ATTK_AGR_DIED) || (mstatus & M_ATTK_DEF_DIED))
|
||||
return MMOVE_DIED;
|
||||
if (mstatus & MM_HIT)
|
||||
if (mstatus & M_ATTK_HIT)
|
||||
return MMOVE_MOVED;
|
||||
return MMOVE_DONE;
|
||||
}
|
||||
@@ -1796,15 +1796,15 @@ m_move_aggress(struct monst* mtmp, coordxy x, coordxy y)
|
||||
/* note: mstatus returns 0 if mtmp2 is nonexistent */
|
||||
mstatus = mattackm(mtmp, mtmp2);
|
||||
|
||||
if (mstatus & MM_AGR_DIED) /* aggressor died */
|
||||
if (mstatus & M_ATTK_AGR_DIED) /* aggressor died */
|
||||
return MMOVE_DIED;
|
||||
|
||||
if ((mstatus & MM_HIT) && !(mstatus & MM_DEF_DIED) && rn2(4)
|
||||
if ((mstatus & M_ATTK_HIT) && !(mstatus & M_ATTK_DEF_DIED) && rn2(4)
|
||||
&& mtmp2->movement >= NORMAL_SPEED) {
|
||||
mtmp2->movement -= NORMAL_SPEED;
|
||||
gn.notonhead = 0;
|
||||
mstatus = mattackm(mtmp2, mtmp); /* return attack */
|
||||
if (mstatus & MM_DEF_DIED)
|
||||
if (mstatus & M_ATTK_DEF_DIED)
|
||||
return MMOVE_DIED;
|
||||
}
|
||||
return MMOVE_DONE;
|
||||
|
||||
Reference in New Issue
Block a user