Last active
August 29, 2015 14:02
-
-
Save wolfiestyle/8adcd720ad73d9d5be75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gsl-shell -i | |
function clamp(n, min, max) | |
if n < min then return min end | |
if n > max then return max end | |
return n | |
end | |
ap = 420 | |
function nida_old(range) | |
local base_dmg = 230 + ap*0.65 | |
local mult = 1 + (clamp(range, 525, 1500) - 525) * 1.5 / 975 | |
return base_dmg * mult | |
end | |
function nida_new(range) | |
local base_dmg = 150 + ap*0.4 | |
local mult = 1 + (clamp(range, 525, 1300) - 525) * 2 / 775 | |
return base_dmg * mult | |
end | |
nida_diff = |x| nida_old(x) - nida_new(x) | |
function do_plot() | |
local p = graph.plot("Nidalee spear damage") | |
p:limits(0, 0, 1500, 1300) | |
p:addline(graph.fxline(nida_old, 0, 1500), "red") | |
p:addline(graph.fxline(nida_new, 0, 1500), "blue") | |
p:addline(graph.fxline(nida_diff, 0, 1500), "green") | |
p:legend("pre-rework", "red", "line") | |
p:legend("current 4.10", "blue", "line") | |
p:legend("difference", "green", "line") | |
p.xtitle = "distance" | |
p.ytitle = "damage" | |
p:show() | |
return p | |
end | |
p = do_plot() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment