feat: add REST and LONG_REST card

This commit is contained in:
Daniel Schmidt 2024-09-02 12:29:35 +02:00
parent a3ae4898d8
commit 7e7afb4dce
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,20 @@
register_card("LONG_REST", {
name = l("cards.LONG_REST.name", "Long Rest"),
description = l("cards.REST.description", "Heal for 4 (+1 per level)."),
state = function(ctx)
return string.format(l("cards.REST.state", "Take a short rest. Heal for %s."), highlight(4 + ctx.level))
end,
tags = { "HEAL" },
max_level = 2,
color = COLOR_GREEN,
need_target = false,
does_exhaust = true,
point_cost = 3,
price = 300,
callbacks = {
on_cast = function(ctx)
heal(ctx.caster, ctx.caster, 4 + ctx.level)
return nil
end
},
})

View File

@ -0,0 +1,19 @@
register_card("REST", {
name = l("cards.REST.name", "Short Rest"),
description = l("cards.REST.description", "Heal for 1 (+1 per level)."),
state = function(ctx)
return string.format(l("cards.REST.state", "Take a short rest. Heal for %s."), highlight(1 + ctx.level))
end,
tags = { "HEAL" },
max_level = 3,
color = COLOR_GREEN,
need_target = false,
point_cost = 1,
price = 120,
callbacks = {
on_cast = function(ctx)
heal(ctx.caster, ctx.caster, 1 + ctx.level)
return nil
end
},
})