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:
nhmall
2023-03-19 12:19:34 -04:00
parent e29bfcab54
commit 5f69dc6228
10 changed files with 227 additions and 227 deletions

View File

@@ -582,13 +582,13 @@ eat_brains(
{
struct permonst *pd = mdef->data;
boolean give_nutrit = FALSE;
int result = MM_HIT, xtra_dmg = rnd(10);
int result = M_ATTK_HIT, xtra_dmg = rnd(10);
if (noncorporeal(pd)) {
if (visflag)
pline("%s brain is unharmed.",
(mdef == &gy.youmonst) ? "Your" : s_suffix(Monnam(mdef)));
return MM_MISS; /* side-effects can't occur */
return M_ATTK_MISS; /* side-effects can't occur */
} else if (magr == &gy.youmonst) {
You("eat %s brain!", s_suffix(mon_nam(mdef)));
} else if (mdef == &gy.youmonst) {
@@ -614,12 +614,12 @@ eat_brains(
monstone(magr);
if (!DEADMONSTER(magr)) {
/* life-saved; don't continue eating the brains */
return MM_MISS;
return M_ATTK_MISS;
} else {
if (magr->mtame && !visflag)
/* parallels mhitm.c's brief_feeling */
You("have a sad thought for a moment, then it passes.");
return MM_AGR_DIED;
return M_ATTK_AGR_DIED;
}
}
}
@@ -632,7 +632,7 @@ eat_brains(
if (mindless(pd)) { /* (cannibalism not possible here) */
pline("%s doesn't notice.", Monnam(mdef));
/* all done; no extra harm inflicted upon target */
return MM_MISS;
return M_ATTK_MISS;
} else if (is_rider(pd)) {
pline("Ingesting that is fatal.");
Sprintf(gk.killer.name, "unwisely ate the brain of %s",
@@ -697,11 +697,11 @@ eat_brains(
if (mindless(pd)) {
if (visflag && canspotmon(mdef))
pline("%s doesn't notice.", Monnam(mdef));
return MM_MISS;
return M_ATTK_MISS;
} else if (is_rider(pd)) {
mondied(magr);
if (DEADMONSTER(magr))
result = MM_AGR_DIED;
result = M_ATTK_AGR_DIED;
/* Rider takes extra damage regardless of whether attacker dies */
*dmg_p += xtra_dmg;
} else {