Skip to content

Commit

Permalink
feat: add NANOBOT_SWARM
Browse files Browse the repository at this point in the history
  • Loading branch information
BigJk committed Sep 2, 2024
1 parent 747101d commit a3ae489
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
Binary file added assets/images/nanobot_swarm.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions assets/scripts/enemies/nanobot_swarm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
register_enemy("NANOBOT_SWARM", {
name = l("enemies.NANOBOT_SWARM.name", "Nanobot Swarm"),
description = l("enemies.NANOBOT_SWARM.description", "A growing swarm of nanobots."),
look = ".*#.-",
color = "#9b5de5",
initial_hp = 15,
max_hp = 100,
gold = 50,
intend = function(ctx)
return "Deal " ..
highlight(simulate_deal_damage(ctx.guid, PLAYER_ID, ctx.round + 1)) .. " damage. Heal " .. highlight(1) .. " HP."
end,
callbacks = {
on_turn = function(ctx)
deal_damage(ctx.guid, PLAYER_ID, ctx.round + 1)
heal(ctx.guid, ctx.guid, 1)

return nil
end
}
})
26 changes: 26 additions & 0 deletions assets/scripts/events/act_0/enemies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,32 @@ It seems to be eating the metal from the walls. It looks at you and after a few
}
})

register_event("NANOBOT_SWARM", {
name = "Is this a swarm of...",
description = [[!!nanobot_swarm.jpg
You are walking through the facility hoping to find a way out. After a few turns you hear a strange noise. You look around and come across a swarm of nanobots.
**It continues to grow and it looks like it's going to attack you.**
]],
tags = { "_ACT_0_FIGHT" },
choices = {
{
description = "Fight!",
callback = function()
add_actor_by_enemy("NANOBOT_SWARM")
if random() < 0.25 then
add_actor_by_enemy("NANOBOT_SWARM")
end
if random() < 0.05 then
add_actor_by_enemy("REPAIR_DRONE")
end
return GAME_STATE_FIGHT
end
}
}
})

register_event("CLEAN_BOT", {
name = "Corpse. Clean. Engage.",
description = [[!!clean_bot.jpg
Expand Down

0 comments on commit a3ae489

Please sign in to comment.