QuantumDrive forum QuantumDrive forum
News: Meeting soon! March 15th. Go Here for details.
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 17, 2010, 11:02:03 PM


Login with username, password and session length


Poll
Question: Is this formula for damage ok?
Yes - 2 (66.7%)
No - 0 (0%)
Maybe - 1 (33.3%)
Total Voters: 3

Pages: [1]
  Print  
Author Topic: Damage  (Read 50 times)
victorsavu3
Full Member
***
*
*
Offline Offline

Posts: 91



View Profile
« on: November 20, 2009, 08:17:30 PM »

Let:

relativeEfficiency = distance between the weapon and armor reduction points
baseDmg = HP the weapon would take if it made a perfect strike
armorEfficiency = Number between 0.0 and 1.0 that reflects the efficiency of the armor
rnd = maximum ± randomness rate (so if this is 0.2, then the damage might change by something between 80% and 120%)
distance = the distance between the center of the blast and the affected ship
areaOfEffect = true or false depending on if the weapon has an area of effect (this is defined on the weapon)
random(x) = any random number in [-x; x]
Formula:
 if(areaOfEffect)
hp -= relativeEfficiency * baseDmg * armorEfficiency * random(rnd) / distance²
 else
hp -= relativeEfficiency * baseDmg * armorEfficiency * random(rnd)
« Last Edit: November 20, 2009, 08:37:10 PM by victorsavu3 » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM


Google visited last this page January 20, 2010, 10:45:45 PM