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:
22
src/mcastu.c
22
src/mcastu.c
@@ -210,20 +210,20 @@ castmu(
|
||||
if (foundyou)
|
||||
impossible(
|
||||
"spellcasting monster found you and doesn't know it?");
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} while (--cnt > 0
|
||||
&& spell_would_be_useless(mtmp, mattk->adtyp, spellnum));
|
||||
if (cnt == 0)
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
|
||||
/* monster unable to cast spells? */
|
||||
if (mtmp->mcan || mtmp->mspec_used || !ml) {
|
||||
cursetxt(mtmp, is_undirected_spell(mattk->adtyp, spellnum));
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
|
||||
if (mattk->adtyp == AD_SPEL || mattk->adtyp == AD_CLRC) {
|
||||
@@ -241,7 +241,7 @@ castmu(
|
||||
canseemon(mtmp) ? Monnam(mtmp) : "Something",
|
||||
is_waterwall(mtmp->mux,mtmp->muy) ? "empty water"
|
||||
: "thin air");
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
|
||||
nomul(0);
|
||||
@@ -249,7 +249,7 @@ castmu(
|
||||
Soundeffect(se_air_crackles, 60);
|
||||
if (canseemon(mtmp) && !Deaf)
|
||||
pline_The("air crackles around %s.", mon_nam(mtmp));
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
if (canspotmon(mtmp) || !is_undirected_spell(mattk->adtyp, spellnum)) {
|
||||
pline("%s casts a spell%s!",
|
||||
@@ -275,7 +275,7 @@ castmu(
|
||||
impossible(
|
||||
"%s casting non-hand-to-hand version of hand-to-hand spell %d?",
|
||||
Monnam(mtmp), mattk->adtyp);
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
} else if (mattk->damd)
|
||||
dmg = d((int) ((ml / 2) + mattk->damn), (int) mattk->damd);
|
||||
@@ -284,7 +284,7 @@ castmu(
|
||||
if (Half_spell_damage)
|
||||
dmg = (dmg + 1) / 2;
|
||||
|
||||
ret = MM_HIT;
|
||||
ret = M_ATTK_HIT;
|
||||
switch (mattk->adtyp) {
|
||||
case AD_FIRE:
|
||||
pline("You're enveloped in flames.");
|
||||
@@ -913,11 +913,11 @@ buzzmu(struct monst *mtmp, struct attack *mattk)
|
||||
/* don't print constant stream of curse messages for 'normal'
|
||||
spellcasting monsters at range */
|
||||
if (!BZ_VALID_ADTYP(mattk->adtyp))
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
|
||||
if (mtmp->mcan || m_seenres(mtmp, cvt_adtyp_to_mseenres(mattk->adtyp))) {
|
||||
cursetxt(mtmp, FALSE);
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
if (lined_up(mtmp) && rn2(3)) {
|
||||
nomul(0);
|
||||
@@ -928,9 +928,9 @@ buzzmu(struct monst *mtmp, struct attack *mattk)
|
||||
buzz(BZ_M_SPELL(BZ_OFS_AD(mattk->adtyp)), (int) mattk->damn,
|
||||
mtmp->mx, mtmp->my, sgn(gt.tbx), sgn(gt.tby));
|
||||
gb.buzzer = 0;
|
||||
return MM_HIT;
|
||||
return M_ATTK_HIT;
|
||||
}
|
||||
return MM_MISS;
|
||||
return M_ATTK_MISS;
|
||||
}
|
||||
|
||||
/*mcastu.c*/
|
||||
|
||||
Reference in New Issue
Block a user