Module:BTD6 stats: Difference between revisions

mNo edit summary
mNo edit summary
Line 75: Line 75:
if attack.initialDamage and attack.initialDamage > 0 then headingLower[#headingLower+1] = "Scratch damage" amount = amount + 1 end
if attack.initialDamage and attack.initialDamage > 0 then headingLower[#headingLower+1] = "Scratch damage" amount = amount + 1 end
if attack.grapplingDamage and attack.grapplingDamage > 0 then headingLower[#headingLower+1] = "Grappling damage" amount = amount + 1 end
if attack.grapplingDamage and attack.grapplingDamage > 0 then headingLower[#headingLower+1] = "Grappling damage" amount = amount + 1 end
if attack.thrashingProjectileRate then headingLower[#headingLower+1] = "Thrash cooldown" amount = amount + 1 end
if amount > 0 then
if amount > 0 then
Line 122: Line 123:
upperColspans[#upperColspans+1] = 1
upperColspans[#upperColspans+1] = 1
end
end
if data["attacks"] then headingAttacks(data["attacks"]) end
if data.attacks then headingAttacks(data.attacks) end
if data["abilities"] then
if data.abilities then
for i, v in ipairs(data["abilities"]["_order"]) do
for i, v in ipairs(data.abilities["_order"]) do
if data["abilities"][v]["projectiles"] then headingProjectiles(data["abilities"][v]["projectiles"]) end
if data.abilities[v]["projectiles"] then headingProjectiles(data.abilities[v]["projectiles"]) end
end
end
end
end
Line 160: Line 161:
-- dino stun damage
-- dino stun damage
local insertStunDamage = function(amt)
local insertStunDamage = function(amt)
ret[#ret+1] = sformat("|%g", amt + mfloor(data.damagePierceRange*scale/data.stunBonusDivideMicroraptor))
ret[#ret+1] = sformat("|%g", amt + mfloor(data.damageRange*scale/data.stunBonusDivideMicroraptor))
end
end
Line 205: Line 206:
if attack.initialDamage and attack.initialDamage > 0 then insertDamage(attack.initialDamage) end
if attack.initialDamage and attack.initialDamage > 0 then insertDamage(attack.initialDamage) end
if attack.grapplingDamage and attack.grapplingDamage > 0 then insertDamage(attack.initialDamage) end
if attack.grapplingDamage and attack.grapplingDamage > 0 then insertDamage(attack.initialDamage) end
if attack.thrashingProjectileRate then insertRate(attack.thrashingProjectileRate) end
-- projectiles
-- projectiles