Opened 11 years ago

Closed 11 years ago

#706 closed bug (fixed (in master))

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 (1)

63 (46.8 KB) - added by Big Al 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by Big Al

comment:1 Changed 11 years ago by magnate

  • Owner set to magnate
  • Status changed from new to assigned

comment:2 Changed 11 years 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);

comment:3 Changed 11 years ago by magnate

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

[16096eb] (SVN r1404) as per Pete's fix above.

Note: See TracTickets for help on using tickets.