Module:BTD6 stats: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 159: | Line 159: | ||
-- attack cooldown | -- attack cooldown | ||
local insertRate = function(amt) | local insertRate = function(amt) | ||
ret[#ret+1] = sformat("| % | ret[#ret+1] = sformat("| %.4gs", amt - (data.cooldownScaleRange*scale)) | ||
end | end | ||
-- ability cooldown | -- ability cooldown | ||
local insertAbilityCooldown = function(amt, mainAttackRate) | local insertAbilityCooldown = function(amt, mainAttackRate) | ||
ret[#ret+1] = sformat("|% | ret[#ret+1] = sformat("|%.4gs", amt - (data.cooldownScaleRange*scale/mainAttackRate)) | ||
end | end | ||
-- damage | -- damage | ||
local insertDamage = function(amt) | local insertDamage = function(amt) | ||
ret[#ret+1] = sformat("|% | ret[#ret+1] = sformat("|%i", amt + mfloor(data.damageRange*scale)) | ||
end | end | ||
-- dino stun damage | -- dino stun damage | ||
local insertStunDamage = function(amt) | local insertStunDamage = function(amt) | ||
ret[#ret+1] = sformat("|% | ret[#ret+1] = sformat("|%i", amt + mfloor(data.damageRange*scale/data.stunBonusDivideMicroraptor)) | ||
end | end | ||
-- pierce | -- pierce | ||
local insertPierce = function(amt) | local insertPierce = function(amt) | ||
ret[#ret+1] = sformat("|% | ret[#ret+1] = sformat("|%i", amt + mfloor(data.pierceRange*scale)) | ||
end | end | ||
-- thrash knockback duration | -- thrash knockback duration | ||
local insertKnockback = function(amt) | local insertKnockback = function(amt) | ||
ret[#ret+1] = sformat("|% | ret[#ret+1] = sformat("|%.4gs", amt + (data.thrashKnockbackLifetimeRange*scale)) | ||
end | end | ||
-- bird flight speed | -- bird flight speed | ||
local insertGyrfalconSpeed = function() | local insertGyrfalconSpeed = function() | ||
ret[#ret+1] = sformat("|% | ret[#ret+1] = sformat("|%.4g units/s", data.speedRangeGyrfalcon + (data.speedRangeGyrfalcon*scale)) | ||
end | end | ||
| Line 241: | Line 241: | ||
for i = minPower[tiers], maxPower[tiers] do | for i = minPower[tiers], maxPower[tiers] do | ||
scale = ((i - minPower[tiers]) / (maxPower[tiers] - minPower[tiers])) | scale = ((i - minPower[tiers]) / (maxPower[tiers] - minPower[tiers])) | ||
ret[#ret+1] = sformat("|-\n!%i\n|% | ret[#ret+1] = sformat("|-\n!%i\n|%.4g%%", i, scale*100) | ||
-- calculations | -- calculations | ||
| Line 377: | Line 377: | ||
-- attack cooldowns and ability cooldowns | -- attack cooldowns and ability cooldowns | ||
local insert_rate = function(amt) | local insert_rate = function(amt) | ||
tinsert(ret, sformat("|% | tinsert(ret, sformat("|%.4gs", amt / (1 + (0.01 * msqrt((d-1)*50))))) | ||
end | end | ||
-- damage | -- damage | ||
local insert_damage = function(amt) | local insert_damage = function(amt) | ||
if d == 100 then tinsert(ret, sformat("|% | if d == 100 then tinsert(ret, sformat("|%.4g", amt * 2 + 10)) | ||
else tinsert(ret, sformat("|% | else tinsert(ret, sformat("|%.4g", amt * (1 + (d-1) * 0.01) + mfloor((d-1)/10))) end | ||
end | end | ||
-- pierce | -- pierce | ||
local insert_pierce = function(amt) | local insert_pierce = function(amt) | ||
if d == 100 then tinsert(ret, sformat("|% | if d == 100 then tinsert(ret, sformat("|%.4g", amt * 2 + 10)) | ||
else tinsert(ret, sformat("|% | else tinsert(ret, sformat("|%.4g", mfloor(amt * (1 + (d-1) * 0.01)) + (d-1)/10)) end | ||
end | end | ||
-- damage modifiers | -- damage modifiers | ||
local insert_damage_mod = function(amt) | local insert_damage_mod = function(amt) | ||
if d == 100 then tinsert(ret, sformat("| +% | if d == 100 then tinsert(ret, sformat("| +%.4g", amt * 2 + 10)) | ||
else tinsert(ret, sformat("| +% | else tinsert(ret, sformat("| +%.4g", amt * (1 + (d-1) * 0.01))) end | ||
end | end | ||