if temporary acid or stoning resistance is timing out while eating something which that resistance is protecting against, caller will extend resistance's duration so that it times out after meal finishes */
| 472 | something which that resistance is protecting against, caller will |
| 473 | extend resistance's duration so that it times out after meal finishes */ |
| 474 | boolean |
| 475 | eating_dangerous_corpse(int res) |
| 476 | { |
| 477 | struct obj *food; |
| 478 | int mnum; |
| 479 | |
| 480 | if (go.occupation == eatfood |
| 481 | && (food = svc.context.victual.piece) != 0 |
| 482 | && food->otyp == CORPSE |
| 483 | && (mnum = food->corpsenm) >= LOW_PM |
| 484 | && (carried(food) || obj_here(food, u.ux, u.uy))) { |
| 485 | |
| 486 | if (res == ACID_RES && acidic(&mons[mnum])) |
| 487 | return TRUE; |
| 488 | /* flesh_petrifies() includes Medusa as well as touch_petrifies() */ |
| 489 | if (res == STONE_RES && flesh_petrifies(&mons[mnum])) |
| 490 | return TRUE; |
| 491 | } |
| 492 | return FALSE; |
| 493 | } |
| 494 | |
| 495 | #if 0 /* no longer used */ |
| 496 | staticfn void maybe_extend_timed_resist(int); |
no test coverage detected