Skip to content

Commit

Permalink
feat: add 3 equipments
Browse files Browse the repository at this point in the history
  • Loading branch information
BigJk committed Aug 26, 2024
1 parent a61af0c commit 5bc167d
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
36 changes: 36 additions & 0 deletions assets/scripts/equipment/consumeable/adrenaline_shot.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
register_card("ADRENALINE_SHOT", {
name = "Adrenaline Shot",
description = "Gain 2 additional action points for the next 3 turns.",
tags = { "BUFF", "_ACT_0" },
max_level = 0,
color = COLOR_RED,
need_target = false,
does_consume = true,
point_cost = 0,
price = 400,
callbacks = {
on_cast = function(ctx)
give_status_effect("ADRENALINE_SHOT", ctx.caster, 3)
return nil
end
}
})

register_status_effect("ADRENALINE_SHOT", {
name = "Adrenaline Shot",
description = "Gain 2 additional action points.",
look = "AS",
foreground = COLOR_RED,
can_stack = false,
decay = DECAY_ONE,
rounds = 3,
order = 100,
callbacks = {
on_player_turn = function(ctx)
if ctx.owner == PLAYER_ID then
player_give_action_points(2)
end
return nil
end
}
})
39 changes: 39 additions & 0 deletions assets/scripts/equipment/consumeable/smoke_bomb.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
register_card("SMOKE_BOMB", {
name = "Smoke Bomb",
description = "Reduces the accuracy of all enemies for 1 turn.",
tags = { "CC", "_ACT_0" },
max_level = 0,
color = COLOR_GRAY,
need_target = false,
does_consume = true,
point_cost = 0,
price = 150,
callbacks = {
on_cast = function(ctx)
local enemies = get_opponent_guids(PLAYER_ID)
for _, enemy in ipairs(enemies) do
give_status_effect("SMOKE_BOMB", enemy, 1)
end
return nil
end
}
})

register_status_effect("SMOKE_BOMB", {
name = "Smoke Bomb",
description = "Reduces accuracy by 50%.",
look = "SB",
foreground = COLOR_GRAY,
can_stack = false,
decay = DECAY_ONE,
rounds = 1,
order = 100,
callbacks = {
on_damage_calc = function(ctx)
if ctx.source == ctx.owner then
return ctx.damage * 0.5
end
return ctx.damage
end
}
})
16 changes: 16 additions & 0 deletions assets/scripts/equipment/permanents/reflective_armor.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
register_artifact("REFLECTIVE_ARMOR", {
name = "Reflective Armor",
description = "Reflects 25% of the damage back to the attacker.",
tags = { "ARMOR", "_ACT_0" },
price = 300,
order = 0,
callbacks = {
on_damage_calc = function(ctx)
if ctx.target == ctx.owner then
local reflected_damage = ctx.damage * 0.25
deal_damage(ctx.target, ctx.source, reflected_damage, true)
end
return ctx.damage
end
}
})

0 comments on commit 5bc167d

Please sign in to comment.