calc the range of hero's unblind telepathy */
| 47 | |
| 48 | /* calc the range of hero's unblind telepathy */ |
| 49 | void |
| 50 | recalc_telepat_range(void) |
| 51 | { |
| 52 | const struct worn *wp; |
| 53 | int nobjs = 0; |
| 54 | |
| 55 | for (wp = worn; wp->w_mask; wp++) { |
| 56 | struct obj *oobj = *(wp->w_obj); |
| 57 | |
| 58 | if (oobj && objects[oobj->otyp].oc_oprop == TELEPAT) |
| 59 | nobjs++; |
| 60 | } |
| 61 | /* count all artifacts with SPFX_ESP as one */ |
| 62 | if (ETelepat & W_ART) |
| 63 | nobjs++; |
| 64 | |
| 65 | if (nobjs) |
| 66 | u.unblind_telepat_range = (BOLT_LIM * BOLT_LIM) * nobjs; |
| 67 | else |
| 68 | u.unblind_telepat_range = -1; |
| 69 | } |
| 70 | |
| 71 | /* Updated to use the extrinsic and blocked fields. */ |
| 72 | void |
no outgoing calls
no test coverage detected