Editing Module:UnitData
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 86: | Line 86: | ||
result = result .. frame:expandTemplate(unit.getAbilityInfoboxTemplate("construction", {buildpower = ud.buildSpeed})) | result = result .. frame:expandTemplate(unit.getAbilityInfoboxTemplate("construction", {buildpower = ud.buildSpeed})) | ||
end | end | ||
− | if ud. | + | if ud.transportCapacity then |
local light = ud.transportLightSpeed | local light = ud.transportLightSpeed | ||
− | local medium = | + | local medium = cp.transportMediumSpeed |
− | local heavy = | + | local heavy = cp.transportHeavySpeed |
local args = {} | local args = {} | ||
− | if light then args.light = light | + | if light then args.light = toPercent(light) end |
− | if medium then args.medium = medium | + | if medium then args.medium = toPercent(medium) end |
− | if heavy then args.heavy = heavy | + | if heavy then args.heavy = toPercent(heavy) end |
result = result .. frame:expandTemplate(unit.getAbilityInfoboxTemplate("transport", args)) | result = result .. frame:expandTemplate(unit.getAbilityInfoboxTemplate("transport", args)) | ||
end | end | ||
− | if ud. | + | if ud.cloakCost or ud.idleCloak then |
local args = {} | local args = {} | ||
if (ud.cloakCost or 0) > 0 then | if (ud.cloakCost or 0) > 0 then | ||
args.upkeepidle = ud.cloakCost | args.upkeepidle = ud.cloakCost | ||
− | args.upkeepmobile = | + | args.upkeepmobile = ud.cloakCostMoving |
− | elseif ud. | + | elseif ud.idle_cloak then |
args.customdata1 = "Only when idle" | args.customdata1 = "Only when idle" | ||
args.customdata2 = "Free and automated" | args.customdata2 = "Free and automated" | ||
Line 142: | Line 142: | ||
end | end | ||
if ud.jumpRange then | if ud.jumpRange then | ||
− | local args = {range = ud.jumpRange, reload = ud.jumpReload, speed = ud.jumpSpeed, midairjump = ud.midairJump | + | local args = {range = ud.jumpRange, reload = ud.jumpReload, speed = ud.jumpSpeed, midairjump = ud.midairJump} |
result = result .. frame:expandTemplate(unit.getAbilityInfoboxTemplate("jump", args)) | result = result .. frame:expandTemplate(unit.getAbilityInfoboxTemplate("jump", args)) | ||
end | end | ||
Line 148: | Line 148: | ||
local args = {} | local args = {} | ||
if ud.idleRegenTime then | if ud.idleRegenTime then | ||
− | args.idleregen = ud.idleRegen | + | if unitDef.idletime > 0 then |
− | + | args.idleregen = ud.idleRegen | |
− | + | args.timetoenable = ud.idleRegenTime | |
− | + | else | |
+ | args.combatregen = ud.combatRegen | ||
+ | end | ||
end | end | ||
if ud.waterRegen then | if ud.waterRegen then | ||
Line 169: | Line 171: | ||
if ud.armorDamageReduction then | if ud.armorDamageReduction then | ||
local args = {reduction = ud.armorDamageReduction .. '%'} | local args = {reduction = ud.armorDamageReduction .. '%'} | ||
+ | abilities = abilities .. "\n\t" .. writeHeaderLine("Infobox zkability armored") | ||
if ud.armorForceClose then | if ud.armorForceClose then | ||
args.special1 = "Forced for " .. ud.armorForceClose .. "s on damage" | args.special1 = "Forced for " .. ud.armorForceClose .. "s on damage" |