Skip to content

Commit

Permalink
feat: add REST and LONG_REST card
Browse files Browse the repository at this point in the history
  • Loading branch information
BigJk committed Sep 2, 2024
1 parent a3ae489 commit 7e7afb4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
20 changes: 20 additions & 0 deletions assets/scripts/equipment/permanents/long_rest.lua
Original file line number Diff line number Diff line change
@@ -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
},
})
19 changes: 19 additions & 0 deletions assets/scripts/equipment/permanents/rest.lua
Original file line number Diff line number Diff line change
@@ -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
},
})

0 comments on commit 7e7afb4

Please sign in to comment.