|
Thread: The damage/defence/creaturenumber formula? | |
|
sindert
Tavern Dweller
|
posted September 30, 2008 12:06 AM |
|
|
The damage/defence/creaturenumber formula?
Hello!
I'm a big homm fan, and I recently decided to make my own version of it (mostly for learning more about programming)
I've made the base combat system, and I'd like to use the same damage calculations as Heroes III.
Does anybody know the formula?
My first try was something like this:
other.losehp= floor(damage*armynumber)*(1-(other.defence/1000))/10
(floor removes all decimals of the variables inside "()")
...but that doesn't work very well.
|
|
metalpiss
Adventuring Hero
fail
|
posted September 30, 2008 12:35 AM |
|
|
of course it doesn't because it seems to me that you forgot about the attackers attack points
The formula for Heroes 2 was something like:
if a hits b:
Total_Dmg = Dmg_a + Dmg_b x (Att_a - Def_b) x 10%
All that multiplied with the number of creatures in a stack, of course.
But I don't know if this still stands for Heroes 3...
and I just copied that from an old games magazine I have, so don't curse me if it's bogus
____________
Lair of metalpiss
|
|
sindert
Tavern Dweller
|
posted September 30, 2008 11:14 AM |
|
|
What, the dmg of the defender (b) affects the damage it takes?
|
|
Warmonger
Promising
Legendary Hero
fallen artist
|
posted September 30, 2008 11:20 AM |
|
|
As far as I remember:
For every point of attack over defense, creature inflicts 5% more damage (capped at 300%)
For every defense point over attack, the creature takes 2% less damage (capped at 40%)
This system has its limits, that is why I prefer H5 one
|
|
Rainalcar
Promising
Famous Hero
Heroji su zakon
|
posted September 30, 2008 11:32 AM |
|
|
http://heroescommunity.com/viewthread.php3?TID=27539
You have everything explained in a PDF.
|
|
sindert
Tavern Dweller
|
posted September 30, 2008 12:37 PM |
|
|
Thanks for the link!
That will help me solve a lot of the problems.
But I didn't understand much of the damage calculations, so (at least for a temporary solution) I'll go for Warmonger's solution
|
|
angelito
Honorable
Undefeatable Hero
proud father of a princess
|
posted September 30, 2008 12:38 PM |
|
|
It is 2,5% each point less...not 2%...for Heroes 3 that is.
____________
Better judged by 12 than carried by 6.
|
|
Hell_Wizard
Famous Hero
|
posted October 02, 2008 08:58 PM |
|
|
Why didn't any of you said me this here?
____________
|
|
|