Unblind telepathy range and carried artifacts
This commit is contained in:
@@ -3757,6 +3757,7 @@ extern void flip_worm_segs_horizontal(struct monst *, int, int) NONNULLARG1;
|
|||||||
|
|
||||||
/* ### worn.c ### */
|
/* ### worn.c ### */
|
||||||
|
|
||||||
|
extern void recalc_telepat_range(void);
|
||||||
extern void setworn(struct obj *, long) NO_NNARGS; /* has tests for obj */
|
extern void setworn(struct obj *, long) NO_NNARGS; /* has tests for obj */
|
||||||
extern void setnotworn(struct obj *) NO_NNARGS; /* has tests for obj */
|
extern void setnotworn(struct obj *) NO_NNARGS; /* has tests for obj */
|
||||||
extern void allunworn(void);
|
extern void allunworn(void);
|
||||||
|
|||||||
@@ -711,6 +711,7 @@ set_artifact_intrinsic(struct obj *otmp, boolean on, long wp_mask)
|
|||||||
ETelepat |= wp_mask;
|
ETelepat |= wp_mask;
|
||||||
else
|
else
|
||||||
ETelepat &= ~wp_mask;
|
ETelepat &= ~wp_mask;
|
||||||
|
recalc_telepat_range();
|
||||||
see_monsters();
|
see_monsters();
|
||||||
}
|
}
|
||||||
if (spfx & SPFX_STLTH) {
|
if (spfx & SPFX_STLTH) {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
|
|
||||||
staticfn void recalc_telepat_range(void);
|
|
||||||
staticfn void m_lose_armor(struct monst *, struct obj *, boolean) NONNULLPTRS;
|
staticfn void m_lose_armor(struct monst *, struct obj *, boolean) NONNULLPTRS;
|
||||||
staticfn void clear_bypass(struct obj *) NO_NNARGS;
|
staticfn void clear_bypass(struct obj *) NO_NNARGS;
|
||||||
staticfn void m_dowear_type(struct monst *, long, boolean, boolean) NONNULLARG1;
|
staticfn void m_dowear_type(struct monst *, long, boolean, boolean) NONNULLARG1;
|
||||||
@@ -46,7 +45,7 @@ static const struct worn {
|
|||||||
has no significant effect on their use of w_blocks() */
|
has no significant effect on their use of w_blocks() */
|
||||||
|
|
||||||
/* calc the range of hero's unblind telepathy */
|
/* calc the range of hero's unblind telepathy */
|
||||||
staticfn void
|
void
|
||||||
recalc_telepat_range(void)
|
recalc_telepat_range(void)
|
||||||
{
|
{
|
||||||
const struct worn *wp;
|
const struct worn *wp;
|
||||||
@@ -58,6 +57,10 @@ recalc_telepat_range(void)
|
|||||||
if (oobj && objects[oobj->otyp].oc_oprop == TELEPAT)
|
if (oobj && objects[oobj->otyp].oc_oprop == TELEPAT)
|
||||||
nobjs++;
|
nobjs++;
|
||||||
}
|
}
|
||||||
|
/* count all artifacts with SPFX_ESP as one */
|
||||||
|
if (ETelepat & W_ART)
|
||||||
|
nobjs++;
|
||||||
|
|
||||||
if (nobjs)
|
if (nobjs)
|
||||||
u.unblind_telepat_range = (BOLT_LIM * BOLT_LIM) * nobjs;
|
u.unblind_telepat_range = (BOLT_LIM * BOLT_LIM) * nobjs;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user