do
local units = {"hpea", "opeo", "uaco", "ewsp", "nmpe", "nhew", "nbee", "ogru"}
local skills = {'ANbu','AHbu','AEbu','AObu','AUbu','AGbu'}
function checkBuilderAbility(unitRawcode, skillCodes)
local newUnit = CreateUnit(Player(0), FourCC(unitRawcode), 0, 0, 90)
local outText = {"Unit(".. unitRawcode ..")"}
for i, skill in ipairs(skillCodes) do
table.insert(outText,
string.format("%4s", GetUnitAbilityLevel(newUnit, FourCC(skill)))
)
end
print(table.concat(outText, ","))
end
local heading = string.format("%-12s %s", "Table:", table.concat(skills, ","))
print(heading)
for i = 1, #units do
checkBuilderAbility(units[i], skills)
end
print("----")
end
Test code 1:
Manual test code 2: