Ticket #884 (closed bug: fixed)

Opened 9 months ago

Last modified 4 months ago

Turn used when using wand/staff with no charges.

Reported by: ajps Owned by: MarbleDice
Milestone: 3.1.2 beta Keywords: commands
Cc:

Description

If you use a wand or staff with no charges left, it uses up a turn, whereas zapping a rod or activating an object that hasn't recharged takes no turn.

Should the behaviour be changed so that when the player already knows a wand/staff has no charges left no turn is used, for consistency's sake?

Attachments

Change History

Changed 9 months ago by magnate

Yes IMO.

Changed 9 months ago by morth

I seem to recall that there is a small chance to successfully use a staff/wand, even at 0 charges (though the item will be destroyed). That's probably why it uses up a turn.

Changed 8 months ago by rhinocesaurus

This slight chance of success doesn't seem to be the case, with the current code at least (see check_devices in cmd-obj.c).

Changed 8 months ago by magnate

  • keywords commands added
  • milestone changed from Triage to 3.1.2 beta

Changed 4 months ago by MarbleDice

  • owner set to MarbleDice
  • status changed from new to assigned

I see two solutions:

1) Remove known empty wands/staves from the item menu when aiming/using.

2) Allow the player to use empty items, but return a message before the turn is consumed.

The former is consistent with the current behavior of rods, the latter is probably friendlier to macros.

Changed 4 months ago by anonymous

2 looks good to me

Changed 4 months ago by magnate

Although I can see the macro point, introducing extra prompts is to be avoided IMO. Why not a third option: just let the action happen, but print the fail message and don't use a turn. This is consistent with the behaviour of attacking monsters while afraid.

Changed 4 months ago by anonymous

Maybe the subtleties of your wording escape me, but that's what I was trying to propose in option 2: You get a message before wasting your turn, like attacking while afraid, moving into a wall, or reciting ?Identify with no unknown items. If you've got a a1*t macro and you mash it too quickly you get a message "That wand has no charges." instead of being left at the item selection prompt, like currently happens with rods.

Changed 4 months ago by magnate

Then it is just an issue of wording. I took "return a message before the turn is consumed" to mean print a message, then consume the turn. But actually you meant that the turn is not used at all, so we are in agreement.

Changed 4 months ago by magnate

See also #980.

Changed 4 months ago by MarbleDice

  • status changed from assigned to closed
  • resolution set to fixed

r1764. Allows the selection of wands, staves, rods, and activatable items when they are charging or have no charges, but prints a message and does not use the turn. For wands, the player is still prompted for direction before getting the empty message.

Add/Change #884 (Turn used when using wand/staff with no charges.)

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.