-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
700 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
register_enemy("CYBER_SPIDER", { | ||
name = "CYBER Spider", | ||
description = "It waits for its prey to come closer", | ||
look = [[/\o^o/\]], | ||
color = "#ff4d6d", | ||
initial_hp = 8, | ||
max_hp = 8, | ||
gold = 15, | ||
intend = function(ctx) | ||
if ctx.round > 0 and ctx.round % 3 == 0 then | ||
return "Deal " .. highlight(5) .. " damage" | ||
end | ||
|
||
return "Wait..." | ||
end, | ||
callbacks = { | ||
on_turn = function(ctx) | ||
if ctx.round > 0 and ctx.round % 3 == 0 then | ||
deal_damage(ctx.guid, PLAYER_ID, 5) | ||
end | ||
|
||
return nil | ||
end | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
local drinks = { | ||
{ | ||
id = "ENERGY_DRINK", | ||
name = "ENRGY Drink X91", | ||
description = "Gain 1 action point.", | ||
price = 150, | ||
action_points = 1, | ||
}, | ||
{ | ||
id = "ENERGY_DRINK_2", | ||
name = "ENRGY Drink X92", | ||
description = "Gain 2 action points.", | ||
price = 250, | ||
action_points = 2, | ||
}, | ||
{ | ||
id = "ENERGY_DRINK_3", | ||
name = "ENRGY Drink X93", | ||
description = "Gain 3 action points.", | ||
price = 350, | ||
action_points = 3, | ||
}, | ||
} | ||
|
||
for _, drink in ipairs(drinks) do | ||
register_card(drink.id, { | ||
name = l("cards." .. drink.id .. ".name", drink.name), | ||
description = string.format( | ||
l("cards." .. drink.id .. ".description","%s\n\n%s"), | ||
highlight("One-Time"), | ||
drink.description | ||
), | ||
tags = { "UTIL", "_ACT_0" }, | ||
max_level = 0, | ||
color = COLOR_ORANGE, | ||
need_target = false, | ||
does_consume = true, | ||
point_cost = 0, | ||
price = drink.price, | ||
callbacks = { | ||
on_cast = function(ctx) | ||
player_give_action_points(drink.action_points) | ||
return nil | ||
end | ||
}, | ||
test = function () | ||
return assert_chain({ | ||
function() return assert_card_present(drink.id) end, | ||
function() return assert_cast_card(drink.id) end, | ||
function() | ||
if get_fight().current_points ~= 3 + drink.action_points then | ||
return "Expected " .. tostring(3 + drink.action_points) .. " points, got " .. get_fight().current_points | ||
end | ||
end, | ||
}) | ||
end | ||
}) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
assets/scripts/equipment/consumeable/ultra_flash_shield.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
register_card("ULTRA_FLASH_SHIELD", { | ||
name = l("cards.ULTRA_FLASH_SHIELD.name", "Ultra Flash Shield"), | ||
description = string.format( | ||
l("cards.ULTRA_FLASH_SHIELD.description","%s\n\nDeploy a temporary shield. %s all attack this turn."), | ||
highlight("One-Time"), highlight("Negates") | ||
), | ||
tags = { "DEF", "_ACT_0" }, | ||
max_level = 0, | ||
color = COLOR_BLUE, | ||
need_target = false, | ||
does_consume = true, | ||
point_cost = 3, | ||
price = 250, | ||
callbacks = { | ||
on_cast = function(ctx) | ||
give_status_effect("ULTRA_FLASH_SHIELD", ctx.caster, 1 + ctx.level) | ||
return nil | ||
end | ||
} | ||
}) | ||
|
||
register_status_effect("ULTRA_FLASH_SHIELD", { | ||
name = l("status_effects.ULTRA_FLASH_SHIELD.name", "Ultra Flash Shield"), | ||
description = l("status_effects.ULTRA_FLASH_SHIELD.description", "Negates all attacks."), | ||
look = "UFS", | ||
foreground = COLOR_BLUE, | ||
can_stack = false, | ||
decay = DECAY_ALL, | ||
rounds = 1, | ||
order = 100, | ||
callbacks = { | ||
on_damage_calc = function(ctx) | ||
if ctx.simulated then | ||
return ctx.damage | ||
end | ||
|
||
if ctx.target == ctx.owner then | ||
return 0 | ||
end | ||
return ctx.damage | ||
end, | ||
}, | ||
test = function() | ||
return assert_chain({ | ||
function() return assert_status_effect_count(1) end, | ||
function() return assert_status_effect("ULTRA_FLASH_SHIELD", 1) end, | ||
function () | ||
local dummy = add_actor_by_enemy("DUMMY") | ||
local damage = deal_damage(dummy, PLAYER_ID, 100) | ||
if damage ~= 0 then | ||
return "Expected 0 damage, got " .. damage | ||
end | ||
|
||
damage = deal_damage(dummy, PLAYER_ID, 2) | ||
if damage ~= 0 then | ||
return "Expected 0 damage, got " .. damage | ||
end | ||
end | ||
}) | ||
end | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
register_artifact("COMBAT_GLASSES", { | ||
name = "Combat Glasses", | ||
description = "Whenever you play a " .. highlight("Ranged (R)") .. " card, deal " .. highlight("1 additional damage"), | ||
tags = { "_ACT_0" }, | ||
price = 100, | ||
order = 0, | ||
callbacks = { | ||
on_damage_calc = function(ctx) | ||
local card = get_card(ctx.card) | ||
if card ~= nil then | ||
if table.contains(card.tags, "R") and ctx.source == ctx.owner and ctx.target ~= ctx.owner then | ||
return ctx.damage + 1 | ||
end | ||
end | ||
return ctx.damage | ||
end | ||
}, | ||
test = function() | ||
give_card(HAND_WEAPONS[2].id, PLAYER_ID) | ||
return assert_cast_damage(HAND_WEAPONS[2].id, HAND_WEAPONS[2].base_damage + 1) | ||
end | ||
}); |
Oops, something went wrong.