Get rid of force_mintrap, allow passing flags to mintrap

It uses the same flags as dotrap, so simulate force_mintrap
by passing FORCETRAP flag.
This commit is contained in:
Pasi Kallinen
2022-02-24 17:13:20 +02:00
parent 9716f22851
commit 2777f45bd5
19 changed files with 52 additions and 53 deletions

View File

@@ -91,6 +91,7 @@ kickdmg(struct monst *mon, boolean clumsy)
/* see if the monster has a place to move into */
mdx = mon->mx + u.dx;
mdy = mon->my + u.dy;
/* TODO: replace with mhurtle? */
if (goodpos(mdx, mdy, mon, 0)) {
pline("%s reels from the blow.", Monnam(mon));
if (m_in_out_region(mon, mdx, mdy)) {
@@ -99,7 +100,7 @@ kickdmg(struct monst *mon, boolean clumsy)
place_monster(mon, mdx, mdy);
newsym(mon->mx, mon->my);
set_apparxy(mon);
if (mintrap(mon) == Trap_Killed_Mon)
if (mintrap(mon, NO_TRAP_FLAGS) == Trap_Killed_Mon)
trapkilled = TRUE;
}
}