Added RAISING_THE_BAR event.

This commit is contained in:
Daniel Schmidt 2023-05-16 10:39:15 +02:00
parent 0f47ece9af
commit cadfb5c135
2 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,45 @@
register_event("RAISING_THE_BAR", {
name = "Raising The Bar",
description = [[!!red_room.png
...]],
choices = {
{
description_fn = function()
return "Take Crowbar... (" .. registered.card["CROWBAR"].description .. ")"
end,
callback = function(ctx)
give_card("CROWBAR", PLAYER_ID)
return nil
end
}, {
description = "Leave...",
callback = function()
return nil
end
}
},
on_end = function()
return GAME_STATE_RANDOM
end
})
register_card("CROWBAR", {
name = "Crowbar",
description = "Deal " .. highlight(22) .. " damage.",
state = function(ctx)
return nil
end,
max_level = 0,
color = "#f37b21",
need_target = true,
exhaust = true,
point_cost = 3,
price = -1,
callbacks = {
on_cast = function(ctx)
deal_damage(ctx.caster, ctx.target, 22)
return nil
end
}
})

View File

@ -36,7 +36,7 @@ register_card("RECYCLE", {
need_target = true,
exhaust = true,
point_cost = 2,
price = 200,
price = -1,
callbacks = {
on_cast = function(ctx)
local op_before = #get_opponent_guids(ctx.caster)