Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove bogus damage from slays, but make them apply to post-crit damage.

  • Loading branch information...
commit 6991ee56c0096dbe65c5144d34f7b6ae40dfa2fd 1 parent cd0c8cf
Chris Carr authored March 18, 2012

Showing 1 changed file with 5 additions and 7 deletions. Show diff stats Hide diff stats

  1. 12  src/player/calcs.c
12  src/player/calcs.c
@@ -963,8 +963,8 @@ int critical_norm(player_state state, const object_type *o_ptr, int dam,
963 963
     	 * 1-100 range. Check to avoid div/0 */
964 964
 		    chance = mod_finesse * mod_finesse + mod_prowess * mod_prowess;
965 965
     		chance = chance / 5000 + 1;
966  
-			if (chance > 99)
967  
-				chance = 99;
  966
+			if (chance > 50)
  967
+				chance = 50;
968 968
 			if (dam_aspect == AVERAGE)
969 969
 				return dam + (o_ptr->ds + 1) * chance / (2 * (100 - chance));
970 970
 			break;
@@ -980,7 +980,6 @@ int critical_norm(player_state state, const object_type *o_ptr, int dam,
980 980
     while (randint0(100) <= chance) {
981 981
         power++;
982 982
 		dam += damcalc(1, o_ptr->ds, dam_aspect);
983  
-		chance = (19 * chance) / 20;
984 983
 	}
985 984
 
986 985
 	if (power > 5)
@@ -1508,7 +1507,6 @@ int calc_multiplier(const object_type *o_ptr, player_state *state)
1508 1507
  *    have consistent logic for all attacks)
1509 1508
  * \param msg_type is the message to use (CC: this should go in the master
1510 1509
  *    message refactor - see #1502)
1511  
- * \param info is whether this is an actual attack or an info call
1512 1510
  * \param aspect is whether we want average, random, maximum etc.
1513 1511
  */
1514 1512
 int calc_damage(const object_type *o_ptr, player_state state, int slay_index,
@@ -1520,15 +1518,15 @@ int calc_damage(const object_type *o_ptr, player_state state, int slay_index,
1520 1518
 	int base_dam = damcalc(o_ptr->dd, o_ptr->ds, dam_aspect);
1521 1519
 
1522 1520
 	/* Check for critical hits */
1523  
-	dam = critical_norm(state, o_ptr, base_dam, attack_type, msg_type,
  1521
+	base_dam = critical_norm(state, o_ptr, base_dam, attack_type, msg_type,
1524 1522
 		dam_aspect);
1525 1523
 
1526 1524
 	/* Adjust for prowess and heft, and multiply by 10 */
1527  
-	dam = (dam * state.dam_multiplier) / 10;
  1525
+	dam = (base_dam * state.dam_multiplier) / 10;
1528 1526
 
1529 1527
 	/* Adjust for the best applicable slay (also x10) */
1530 1528
 	if (slay_index)
1531  
-		dam += base_dam * (100 + state.slay_mult[slay_index]) / 10;
  1529
+		dam += base_dam * state.slay_mult[slay_index] / 10;
1532 1530
 
1533 1531
 	return dam;
1534 1532
 }

0 notes on commit 6991ee5

Please sign in to comment.
Something went wrong with that request. Please try again.