if 'prop' is only set because of a timed value (so not an intrinsic attribute or because of polymorph shape or worn or carried gear), return its timeout, otherwise return 0; used by enlightenment */
| 450 | attribute or because of polymorph shape or worn or carried gear), return |
| 451 | its timeout, otherwise return 0; used by enlightenment */ |
| 452 | long |
| 453 | temp_resist(int prop) |
| 454 | { |
| 455 | struct prop *p = &u.uprops[prop]; |
| 456 | long timeout = p->intrinsic & TIMEOUT; |
| 457 | |
| 458 | if (timeout |
| 459 | /* and if not also protected by polymorph form */ |
| 460 | && (p->intrinsic & ~TIMEOUT) == 0L |
| 461 | /* and not by worn gear (dragon armor) */ |
| 462 | && !p->extrinsic |
| 463 | /* and property is not blocked; we don't expect this, but if it |
| 464 | is then the timeout doesn't matter so we won't extend that */ |
| 465 | && !p->blocked) { |
| 466 | return timeout; |
| 467 | } |
| 468 | return 0L; |
| 469 | } |
| 470 | |
| 471 | /* if temporary acid or stoning resistance is timing out while eating |
| 472 | something which that resistance is protecting against, caller will |
no outgoing calls
no test coverage detected