ID:154143
 
Yes, again :P

Could you take a look at this and see if it looks pretty balanced?

mob/var
toughness = 1//Damage multiplier
protection = 1//Damage divider
precision = 1//how much of a chance you have for hitting
vitality = 20// how much life points you have
max_vitality = 20
swiftness = 1// how fast you can attack,ability to evade
recovery = 1// how fast you regen health
endurance = 1// how long you can last

proc/damage(mob/attacker,mob/victim)
var/damage=rand(attacker.toughness/4,attacker.toughness/1.5)/victim.protection/1.2
var/accuracy = attacker.precision/2
var/evasion = victim.swiftness/3


Does that look like it would work out? What would you do to improve it.
Don't mean to bump...but wait...yes I do.
What does a randomized toughness got to do with damage? Please explain in English.

If you didn't notice, I don't read codes made by other people well.
In response to sunzoner
sunzoner wrote:
What does a randomized toughness got to do with damage? Please explain in English.

If you didn't notice, I don't read codes made by other people well.

That makes the damage randomized, but not TOO randomized.
In response to Sariat
Sariat wrote:
sunzoner wrote:
What does a randomized toughness got to do with damage? Please explain in English.

If you didn't notice, I don't read codes made by other people well.

That makes the damage randomized, but not TOO randomized.

So you are randoimising it between attacker toughness of 4xs and 1.5xs and dividing it by the defender protection of 1.2xs?

I still don't understand why is it done that way...

Maybe I'm slower than the adverage coder...

In response to sunzoner
I still don't understand why is it done that way...

Well, why SHOULDN'T he do it that way? =)
In response to Spuzzum
Uhhh... I was just looking for input. To see what everybody would do if they were in my situtation.
In response to Spuzzum
Spuzzum wrote:
I still don't understand why is it done that way...

Well, why SHOULDN'T he do it that way? =)

His method seems to use "toughness/protection" and a randomise seed. Am I right?

I usually use "toughness - protection" type of damage calculation.

For example:
a = Attacker Toughness * dice - defender protection * dice
if a is positive, damage = a
if a is negative, damage = 0, defender get a free attack