| 3435 | } |
| 3436 | |
| 3437 | void |
| 3438 | unstuck(struct monst *mtmp) |
| 3439 | { |
| 3440 | if (u.ustuck == mtmp) { |
| 3441 | struct permonst *ptr = mtmp->data; |
| 3442 | unsigned swallowed = u.uswallow; |
| 3443 | |
| 3444 | /* do this first so that docrt()'s botl update is accurate; |
| 3445 | clears u.uswallow as well as setting u.ustuck to Null */ |
| 3446 | set_ustuck((struct monst *) 0); |
| 3447 | |
| 3448 | if (swallowed) { |
| 3449 | gm.mswallower = (struct monst *) 0; |
| 3450 | u.ux = mtmp->mx; |
| 3451 | u.uy = mtmp->my; |
| 3452 | if (Punished && uchain->where != OBJ_FLOOR) |
| 3453 | placebc(); |
| 3454 | gv.vision_full_recalc = 1; |
| 3455 | docrt(); |
| 3456 | } |
| 3457 | |
| 3458 | /* prevent holder/engulfer from immediately re-holding/re-engulfing |
| 3459 | [note: this call to unstuck() might be because u.ustuck has just |
| 3460 | changed shape and doesn't have a holding attack any more, hence |
| 3461 | don't set mspec_used unconditionally] */ |
| 3462 | if (!mtmp->mspec_used && (dmgtype(ptr, AD_STCK) |
| 3463 | || attacktype(ptr, AT_ENGL) |
| 3464 | || attacktype(ptr, AT_HUGS))) |
| 3465 | mtmp->mspec_used = rnd(2); |
| 3466 | } |
| 3467 | } |
| 3468 | |
| 3469 | void |
| 3470 | killed(struct monst *mtmp) |
no test coverage detected