# Spikey's Melee Damage Calculator



## SpikeyFreak (Feb 21, 2002)

Well, I finally updated my damage calculator.

I added:

Lightning Fists
Improved Power Attack
Supreme Power Attack
Geater TWF
Supreme TWF
Absolute Ambidexterity
Power Critical
An option to add more attacks at any BAB

I changed:

Got rid of Haste option - if you want to add an attack from haste, use the extra attacks section
Put Str Mod back on main page
Added a big bright "This is the final damage" section close to the top right so you won't have to scroll down to see final damage
Fixed average damage calculations so that it won't be wrong if you have penalties that would have taken min damage below 0.
If anyone sees any errors or has suggestions, please let me know.

--Excellent Spikey

Oh yeah, the link is in my sig - just go to downloads.


----------



## Someguy (Feb 21, 2002)

Sweet...again...thanls for the great update...!


----------



## SpikeyFreak (Feb 21, 2002)

Someguy said:
			
		

> *Sweet...again...thanls for the great update...! *



You're welcome. 

--Happy Spikey


----------



## CRGreathouse (Feb 21, 2002)

SpikeyFreak said:
			
		

> *Fixed average damage calculations so that it won't be wrong if you have penalties that would have taken min damage below 0.*




Out of curiosity, what formula do you use?


----------



## SpikeyFreak (Feb 21, 2002)

*Re: Re: Spikey's Melee Damage Calculator*



			
				CRGreathouse said:
			
		

> *
> 
> Out of curiosity, what formula do you use? *



It's so simple I can't believe I didn't do this to start with.

Min damage and max damage are is separate cells, so I set an if statement that sets min damage to one if it's less than one, then add min damage and max damage and divide by two.

Pretty elegant if I do-say-so-myself.

--Busy Spikey


----------



## CRGreathouse (Feb 21, 2002)

...so 1d6-4=1.5?


----------



## Davin (Feb 21, 2002)

CRGreathouse said:
			
		

> *...so 1d6-4=1.5? *



According to his formula it should, but in reality, it should be 1.1666 (average 1, 1, 1, 1, 1, 2 = 7 / 6 = 1.666), or .5 if you allow the minimum total roll to be zero.

His formula also doesn't work properly if (for some reason) you're rolling more than one size of die at a time.


----------



## SpikeyFreak (Feb 21, 2002)

Davin said:
			
		

> *
> According to his formula it should, but in reality, it should be 1.1666 (average 1, 1, 1, 1, 1, 2 = 7 / 6 = 1.666), or .5 if you allow the minimum total roll to be zero.
> 
> His formula also doesn't work properly if (for some reason) you're rolling more than one size of die at a time. *




Well S***.

You're right.

Well, its close enough.  And besides, who is going to use the sheet to test out a character with a strength penalty?

--Back-to-the-Drawingboard Spikey


----------



## CRGreathouse (Feb 21, 2002)

Here's a portion of my stat block generator:


```
function hpAve(die,mod) {
 if(mod>=0) return die/2+mod+.5;
 if(die+mod<1) return 1;
 return (die+mod-1)*(die+mod)/2/die+1;
}
```

In Excel, it would be:

```
IF(mod>0,INT(die / 2 + mod + .5), IF(die + mod < 1, 1, (die + mod -1)*(die + mod) / (2 *die) +1))
```

This calculates a single die; if you want to use it, change it to however you need it.  I suspect you won't need it, though.


----------



## SpikeyFreak (Feb 27, 2002)

CRGreathouse said:
			
		

> *Here's a portion of my stat block generator:
> 
> 
> 
> ...




I'm going to have to see if I can implement that.

In the mean time, I've added an option to disable more attacks from a high BAB to allow for cla/cla/bite attacks.  Now I just have to figure out how to do more complex natural attack rountines.

Oh, and I fixed a few bugs.

--Excited Spikey


----------



## MJEggertson (Feb 27, 2002)

They really do need to change the color of what appears in the *code* tags...


----------

