| 877 | } |
| 878 | |
| 879 | int |
| 880 | is_innate(int propidx) |
| 881 | { |
| 882 | int innateness; |
| 883 | |
| 884 | /* innately() would report FROM_FORM for this; caller wants specificity */ |
| 885 | if (propidx == DRAIN_RES && ismnum(u.ulycn)) |
| 886 | return FROM_LYCN; |
| 887 | if (propidx == FAST && Very_fast) |
| 888 | return FROM_NONE; /* can't become very fast innately */ |
| 889 | if ((innateness = innately(&u.uprops[propidx].intrinsic)) != FROM_NONE) |
| 890 | return innateness; |
| 891 | if (propidx == JUMPING && Role_if(PM_KNIGHT) |
| 892 | /* knight has intrinsic jumping, but extrinsic is more versatile so |
| 893 | ignore innateness if equipment is going to claim responsibility */ |
| 894 | && !u.uprops[propidx].extrinsic) |
| 895 | return FROM_ROLE; |
| 896 | if ((propidx == BLINDED && !haseyes(gy.youmonst.data)) |
| 897 | || (propidx == BLND_RES && (HBlnd_resist & FROMFORM) != 0)) |
| 898 | return FROM_FORM; |
| 899 | return FROM_NONE; |
| 900 | } |
| 901 | |
| 902 | DISABLE_WARNING_FORMAT_NONLITERAL |
| 903 | |