Added test for ability getter.

This commit is contained in:
Guillaume Melquiond 2010-08-05 10:35:52 +00:00
parent 586cbddae1
commit 7c096e854a

View File

@ -405,8 +405,7 @@ wesnoth.message(string.format("Button %d pressed. Item %d selected.",
end
end
function has_teleport(u)
local abil = get_child(u.__cfg, "abilities")
return abil and get_child(abil, "teleport")
return wesnoth.unit_ability(u, "teleport")
end
>>
[/lua]