Opened 10 years ago

Closed 10 years ago

#1016 closed bug (fixed (in master))

Some jewelry doesn't ID on the first wield

Reported by: MarbleDice Owned by: MarbleDice
Milestone: 3.1.2 beta Keywords: id
Cc:

Description

Generate an unaware +stat ring or +stat amulet, and equip it. The flavor will become aware, the pval will become visible, and the player will learn about the sustain. The jewelry will be marked as "worn" and will be selectable for identify, even though the player already knows everything about the item.

Remove the jewelry and equip it again, and it becomes fully identified.

Attachments (1)

md_1016.patch (2.2 KB) - added by MarbleDice 10 years ago.
This version of a fix is a little less hackish, still learning some of the identify machinery before committing.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 years ago by magnate

  • Status changed from new to confirmed

I think it's worth re-examining why jewelry is treated differently from other items with obvious flags. It's not clear from the code, and I can't see anything in the code that would prevent jewelry being fully IDd by the same processes that ID other items. Is it perhaps worth removing this hack completely and seeing how the game plays without special-casing jewelry with obvious flags? Or has somebody already done that and found a problem?

comment:2 Changed 10 years ago by magnate

  • Milestone changed from Triage to 3.1.2 beta

comment:3 Changed 10 years ago by MarbleDice

The reason jewelry gets a special case is because any jewelry with at least one obvious flag gives away the flavor, but may still have non-obvious flags. Rings of Strength for example increase strength (obvious) but also sustain it (not obvious). If you don't special case learning all flags on jewelry, you'd have to go get hit by stat draining attacks to reveal the flavor of your stat rings.

comment:4 Changed 10 years ago by MarbleDice

  • Owner set to MarbleDice
  • Status changed from confirmed to assigned

I think I can re-order some code to address this issue, there's also another bug with identifying jewelry with non-obvious bonuses. Equip a ring of searching, search, and you'll learn the flavor and pval. You won't fully ID the ring until you engage in combat while wearing it because currently you still need to learn the (non-existent) combat bonuses.

The rules regarding auto-ID of jewelry can be summarized as follows:

1) Become aware of the flavor on worn jewelry with obvious flags
2) Learn all flags on worn aware jewelry
3) Assume attack/defense bonuses are visible on aware jewelry that does not have them.

Changed 10 years ago by MarbleDice

This version of a fix is a little less hackish, still learning some of the identify machinery before committing.

comment:5 Changed 10 years ago by MarbleDice

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [fb1df32] (SVN r1845).

Some code was re-ordered in object_notice_on_wield() to fix the double-wear bug on stat rings, and bonuses are assumed visible in object_attack/defence_plusses_are_visible() for all aware jewelry with non-variable bonuses.

Note: See TracTickets for help on using tickets.