Fix boulder over a hole or a pit dug by a monster

When a monster digs down and creates a pit or a hole,
drop the boulder at the location into it.
This commit is contained in:
Pasi Kallinen
2024-05-28 18:31:12 +03:00
parent 800b3b4b4b
commit 2ebbd13f79
2 changed files with 4 additions and 1 deletions

View File

@@ -899,6 +899,7 @@ use_defensive(struct monst *mtmp)
pline("%s has made a pit in the %s.", Monnam(mtmp),
surface(mtmp->mx, mtmp->my));
}
fill_pit(mtmp->mx, mtmp->my);
return (mintrap(mtmp, FORCEBUNGLE) == Trap_Killed_Mon) ? 1 : 2;
}
t = maketrap(mtmp->mx, mtmp->my, HOLE);
@@ -915,6 +916,7 @@ use_defensive(struct monst *mtmp)
You_hear("%s crash through the %s.", something,
surface(mtmp->mx, mtmp->my));
}
fill_pit(mtmp->mx, mtmp->my);
/* we made sure that there is a level for mtmp to go to */
migrate_to_level(mtmp, ledger_no(&u.uz) + 1, MIGR_RANDOM,
(coord *) 0);