| 268 | } |
| 269 | |
| 270 | void |
| 271 | wipe_engr_at(coordxy x, coordxy y, xint16 cnt, boolean magical) |
| 272 | { |
| 273 | struct engr *ep = engr_at(x, y); |
| 274 | |
| 275 | /* Headstones and some specially marked engravings are indelible */ |
| 276 | if (ep && ep->engr_type != HEADSTONE && !ep->nowipeout) { |
| 277 | debugpline1("asked to erode %d characters", cnt); |
| 278 | if (ep->engr_type != BURN || is_ice(x, y) || (magical && !rn2(2))) { |
| 279 | if (ep->engr_type != DUST && ep->engr_type != ENGR_BLOOD) { |
| 280 | cnt = rn2(1 + 50 / (cnt + 1)) ? 0 : 1; |
| 281 | debugpline1("actually eroding %d characters", cnt); |
| 282 | } |
| 283 | wipeout_text(ep->engr_txt[actual_text], (int) cnt, 0); |
| 284 | while (ep->engr_txt[actual_text][0] == ' ') |
| 285 | ep->engr_txt[actual_text]++; |
| 286 | if (!ep->engr_txt[actual_text][0]) |
| 287 | del_engr(ep); |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | /* |
| 293 | * Returns: |
no test coverage detected