Ticket #706 (closed bug: fixed)

Opened 20 months ago

Last modified 16 months ago

Number of Blows not Correct (again!)

Reported by: Big Al Owned by: magnate
Milestone: 3.1.1 beta Keywords:
Cc:

Description

Comp 63 character: I have a long sword of extra attacks (+2) and a flail of Westeresse (+1). When the sword is wielded, and I look at my flail, it says that I get 1 attack, but when I wield it, it says I get two attacks. Savefile attached.

Playing 3.1.0beta.

Attachments

63 (46.8 KB) - added by Big Al 20 months ago.

Change History

Changed 20 months ago by Big Al

  • attachment 63 added

Changed 16 months ago by magnate

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

Changed 16 months ago by noz

calc_blows() was using the player's state, not the passed-in "hypothetical" state.

Index: src/player/calcs.c
===================================================================
--- src/player/calcs.c	(revision 1401)
+++ src/player/calcs.c	(working copy)
@@ -522,14 +522,14 @@
 	div = ((o_ptr->weight < cp_ptr->min_weight) ? cp_ptr->min_weight : o_ptr->weight);
 
 	/* Get the strength vs weight */
-	str_index = adj_str_blow[p_ptr->state.stat_ind[A_STR]] *
+	str_index = adj_str_blow[state->stat_ind[A_STR]] *
 			cp_ptr->att_multiply / div;
 
 	/* Maximal value */
 	if (str_index > 11) str_index = 11;
 
 	/* Index by dexterity */
-	dex_index = MIN(adj_dex_blow[p_ptr->state.stat_ind[A_DEX]], 11);
+	dex_index = MIN(adj_dex_blow[state->stat_ind[A_DEX]], 11);
 
 	/* Use the blows table */
 	blows = MIN(blows_table[str_index][dex_index], cp_ptr->max_attacks);

Changed 16 months ago by magnate

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

r1404 as per Pete's fix above.

Add/Change #706 (Number of Blows not Correct (again!))

Author



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