Opened 6 years ago

Closed 5 years ago

#1789 closed bug (fixed (in master))

OF_LIGHT on jewelry should not trigger visible pval

Reported by: PowerWyrm Owned by:
Milestone: 3.5.0 Keywords:
Cc:

Description

See: http://angband.oook.cz/forum/showthread.php?t=6356

Aware amulets of devotion and rings of light should never have <+1> appended while (I)nspecting says "Affects wisdom"/"Affects searching" but not "Radius 1 light".

Fix: discard OF_LIGHT when checking aware jewelry with non-variable pval in object_this_pval_is_visible().

Change History (3)

comment:1 Changed 6 years ago by PowerWyrm

Something like this should work:

/* Aware jewelry with non-variable pval */
if (object_is_jewelry(o_ptr) && object_flavor_is_aware(o_ptr)) {
	if (!randcalc_varies(o_ptr->kind->pval[pval])) {
		object_pval_flags_known(o_ptr, f);
		of_wipe(f2);
		of_on(f2, OF_LIGHT);
		if (!of_is_equal(f[pval], f2))
			return TRUE;
	}
}

comment:2 Changed 5 years ago by takkaria

  • Milestone changed from Triage to 3.5.0

Moving to 3.5 because open bugs.

comment:3 Changed 5 years ago by takkaria

  • Resolution set to fixed (in master)
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.