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:
@@ -785,13 +785,13 @@ thrwmm(struct monst* mtmp, struct monst* mtarg)
|
||||
mtmp->weapon_check = NEED_RANGED_WEAPON;
|
||||
/* mon_wield_item resets weapon_check as appropriate */
|
||||
if (mon_wield_item(mtmp) != 0)
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
|
||||
/* Pick a weapon */
|
||||
otmp = select_rwep(mtmp);
|
||||
if (!otmp)
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
ispole = is_pole(otmp);
|
||||
|
||||
x = mtmp->mx;
|
||||
@@ -806,17 +806,17 @@ thrwmm(struct monst* mtmp, struct monst* mtarg)
|
||||
if (ammo_and_launcher(otmp, mwep)
|
||||
&& dist2(mtmp->mx, mtmp->my, mtarg->mx, mtarg->my)
|
||||
> PET_MISSILE_RANGE2)
|
||||
return MM_MISS; /* Out of range */
|
||||
return M_ATTK_MISS; /* Out of range */
|
||||
/* Set target monster */
|
||||
gm.mtarget = mtarg;
|
||||
gm.marcher = mtmp;
|
||||
monshoot(mtmp, otmp, mwep); /* multishot shooting or throwing */
|
||||
gm.marcher = gm.mtarget = (struct monst *) 0;
|
||||
nomul(0);
|
||||
return MM_HIT;
|
||||
return M_ATTK_HIT;
|
||||
}
|
||||
}
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
|
||||
/* monster spits substance at monster */
|
||||
@@ -835,7 +835,7 @@ spitmm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
|
||||
You_hear("a dry rattle nearby.");
|
||||
}
|
||||
}
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
if (m_lined_up(mtarg, mtmp)) {
|
||||
boolean utarg = (mtarg == &gy.youmonst);
|
||||
@@ -874,13 +874,13 @@ spitmm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
|
||||
dog->hungrytime -= 5;
|
||||
}
|
||||
|
||||
return MM_HIT;
|
||||
return M_ATTK_HIT;
|
||||
} else {
|
||||
obj_extract_self(otmp);
|
||||
obfree(otmp, (struct obj *) 0);
|
||||
}
|
||||
}
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
|
||||
/* Return the name of a breath weapon. If the player is hallucinating, return
|
||||
@@ -911,7 +911,7 @@ breamm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
|
||||
You_hear("a cough.");
|
||||
}
|
||||
}
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
|
||||
/* if we've seen the actual resistance, don't bother, or
|
||||
@@ -919,7 +919,7 @@ breamm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
|
||||
if (m_seenres(mtmp, cvt_adtyp_to_mseenres(typ))
|
||||
|| (m_seenres(mtmp, M_SEEN_REFL)
|
||||
&& monnear(mtmp, mtmp->mux, mtmp->muy)))
|
||||
return MM_HIT;
|
||||
return M_ATTK_HIT;
|
||||
|
||||
if (!mtmp->mspec_used && rn2(3)) {
|
||||
if (BZ_VALID_ADTYP(typ)) {
|
||||
@@ -951,9 +951,9 @@ breamm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
|
||||
}
|
||||
} else impossible("Breath weapon %d used", typ-1);
|
||||
} else
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
return MM_HIT;
|
||||
return M_ATTK_HIT;
|
||||
}
|
||||
|
||||
/* remove an entire item from a monster's inventory; destroy that item */
|
||||
|
||||
Reference in New Issue
Block a user