Permalink
Browse files

Thanks to ikinz for the better energy consumption formula

1 parent 4787667 commit 7143f21a70d8b544b6b6472f73551c7fc6e83044 @ForbodingAngel ForbodingAngel committed Feb 7, 2017
Showing with 2 additions and 1 deletion.
  1. +2 −1 Gamedata/alldefs_post.lua
@@ -207,7 +207,8 @@ function WeaponDef_Post(name, wDef)
end
wDef.energypershot = energycosttofire
else
- local energycosttofire = weaponDefaultDamage * 0.05 * weaponProjectiles * ((weaponAreaOfEffect * 0.001) + 1) * (weaponRange * 0.001)
+ --energycosttofire = weaponDefaultDamage * 0.05 * weaponProjectiles * ((weaponAreaOfEffect * 0.001) + 1) * weaponRange^0.5 * 0.1
+ local energycosttofire = weaponDefaultDamage * 0.05 * weaponProjectiles * ((weaponAreaOfEffect * 0.001) + 1) * weaponRange^0.25 * 0.5
local function roundToFirstDecimal(energycosttofire)
return math.floor(energycosttofire*10 + 0.5)*0.1
end

0 comments on commit 7143f21

Please sign in to comment.