24 lines
396 B
Lua
24 lines
396 B
Lua
PyuTest.deal_damage = function(target, damage, reason)
|
|
local hp = target:get_hp()
|
|
|
|
if hp > 0 then
|
|
target:set_hp(hp - damage, reason)
|
|
end
|
|
end
|
|
|
|
PyuTest.DAMAGE_TYPES = {
|
|
explosion = function (range)
|
|
return {
|
|
type = "set_hp",
|
|
_pyutest = {
|
|
type = "explosion",
|
|
range = range
|
|
}
|
|
}
|
|
end
|
|
}
|
|
|
|
PyuTest.mt_damage_to_pyutest_damage = function(reason)
|
|
|
|
end
|