1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| cost = {0,0,0,1}
icon = "lbolt.png"
instant = 1
function getName(language)
if language == "french" then
return "Foudre"
elseif language == "english" then
return "Lightning bolt"
else
return "blabla"
end
end
function getDescription(language)
if language == "french" then
return "La foudre s'abat sur l'unité de votre choix (3 points de dégâts)."
elseif language == "english" then
return "A lightning bolt hits target unit (3 damage points)."
else
return "blabla"
end
end
function onCast()
selectTarget("unit", "anywhere") -- call C function. The C program will get user's selected target and store it in spell's memory.
-- The data will be retrieved here at resolve stage.
end
-- this function receives playedId and unitId as parameter, in a space-separated string
function onResolve(params)
p = {0,0}
i = 0
for val in params:gmatch("[0-9]+")
do
i = i + 1
p[i] = val
end
damageUnit(p[1], p[2], 3)
end |
Partager