Hi, I'm creating a game (viewtopic.php?f=23&t=60887), and I would like damage to be calculated in a different way. I've copy-pasted the calculations from the thread, and would very much appreciate it if someone could write me a script to change the calculations to these, or even just tell me what I need to change it to. Also, I'd like some feedback on whether these method of damage calculation is a good idea or not.
Weapons have the following stats:
W. Attack (Avg @ 1st level: 1.5)
W. Power (Avg @ 1st level: 1.5 if physical weapon, 0 if magical)
W. Magic (Avg @ 1st level: 1.5 if magical weapon, 0 if physical)
Variance (Avg @ 1st level: 5)
Armor has the following stats:
Defense (Avg @ 1st level: 1.0)
Characters have the following stats:
HP (Avg @ 1st level: 100)
MP (Avg @ 1st level: 100)
Agility (Avg @ 1st level: 20)
Power (Avg @ 1st level: 20)
Magic (Avg @ 1st level: 20)
Enemies have the following stats:
HP (Avg @ 1st level: 50)
MP (Avg @ 1st level: 50)
Agility (Avg @ 1st level: 12)
Power (Avg @ 1st level: 12)
Magic (Avg @ 1st level: 12)
Defense (Avg @ 1st level: 1.0)
The enemies are basically the same as normal characters, but the bonuses for the armor and weapons are built right into the default stats.
Hits are calculated as such:
Attacker:
Agility * W. Attack = Attacker Value (AV)
Defender
Agility / 10 = Defender Value (DV)
Randomly generate a number from 1 to AV. If the random value is greater than the DV, It's a hit. If the total value is over 100, it's a critical hit. (I know that this will produce almost no crits at low levels, and great amounts of crits at high ones, but I intend for this. It shows the difference between randomly lashing out (low level), and striking specifically at weak points (high level))
Damage is calculated like this:
Physical attacks:
Attacker:
Power * Weapon Power= Attacker Value (AV)
Defender:
Defense Defender Value(DV)
AV/DV = Damage
Magical Attacks:
Attacker:
Magic * Weapon Magic = AV
Defender:
(Magic * Weapon Magic) /2= DV
AV/DV=Damage.
Thank you in advance!
Weapons have the following stats:
W. Attack (Avg @ 1st level: 1.5)
W. Power (Avg @ 1st level: 1.5 if physical weapon, 0 if magical)
W. Magic (Avg @ 1st level: 1.5 if magical weapon, 0 if physical)
Variance (Avg @ 1st level: 5)
Armor has the following stats:
Defense (Avg @ 1st level: 1.0)
Characters have the following stats:
HP (Avg @ 1st level: 100)
MP (Avg @ 1st level: 100)
Agility (Avg @ 1st level: 20)
Power (Avg @ 1st level: 20)
Magic (Avg @ 1st level: 20)
Enemies have the following stats:
HP (Avg @ 1st level: 50)
MP (Avg @ 1st level: 50)
Agility (Avg @ 1st level: 12)
Power (Avg @ 1st level: 12)
Magic (Avg @ 1st level: 12)
Defense (Avg @ 1st level: 1.0)
The enemies are basically the same as normal characters, but the bonuses for the armor and weapons are built right into the default stats.
Hits are calculated as such:
Attacker:
Agility * W. Attack = Attacker Value (AV)
Defender
Agility / 10 = Defender Value (DV)
Randomly generate a number from 1 to AV. If the random value is greater than the DV, It's a hit. If the total value is over 100, it's a critical hit. (I know that this will produce almost no crits at low levels, and great amounts of crits at high ones, but I intend for this. It shows the difference between randomly lashing out (low level), and striking specifically at weak points (high level))
Damage is calculated like this:
Physical attacks:
Attacker:
Power * Weapon Power= Attacker Value (AV)
Defender:
Defense Defender Value(DV)
AV/DV = Damage
Magical Attacks:
Attacker:
Magic * Weapon Magic = AV
Defender:
(Magic * Weapon Magic) /2= DV
AV/DV=Damage.
Thank you in advance!