called when restoring a monster from a saved level; protection against shape-changing might be different now than it was at the time the level was saved. */
| 4646 | against shape-changing might be different now than it was at the |
| 4647 | time the level was saved. */ |
| 4648 | void |
| 4649 | restore_cham(struct monst *mon) |
| 4650 | { |
| 4651 | if (Protection_from_shape_changers || mon->mcan) { |
| 4652 | /* force chameleon or mimic to revert to its natural shape */ |
| 4653 | normal_shape(mon); |
| 4654 | } else if (mon->cham == NON_PM) { |
| 4655 | /* chameleon doesn't change shape here, just gets allowed to do so */ |
| 4656 | mon->cham = pm_to_cham(monsndx(mon->data)); |
| 4657 | } |
| 4658 | } |
| 4659 | |
| 4660 | /* unwatched hiders may hide again; if so, returns True */ |
| 4661 | staticfn boolean |
no test coverage detected