Fix monster trapped state being wrong
When cloning a monster, clear the clone trapped and hiding states. When splitting a monster (eg. a black pudding), the clone could be placed on a trap, so do mintrap. When removing a monster from the map, clear the trapped state.
This commit is contained in:
@@ -1227,7 +1227,8 @@ int dieroll;
|
||||
/* but not bashing with darts, arrows or ya */
|
||||
&& !(is_ammo(obj) || is_missile(obj)))
|
||||
&& hand_to_hand) {
|
||||
if (clone_mon(mon, 0, 0)) {
|
||||
struct monst *mclone;
|
||||
if ((mclone = clone_mon(mon, 0, 0)) != 0) {
|
||||
char withwhat[BUFSZ];
|
||||
|
||||
withwhat[0] = '\0';
|
||||
@@ -1235,6 +1236,7 @@ int dieroll;
|
||||
Sprintf(withwhat, " with %s", yname(obj));
|
||||
pline("%s divides as you hit it%s!", Monnam(mon), withwhat);
|
||||
hittxt = TRUE;
|
||||
mintrap(mclone);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user