diff --git a/assets/images/nanobot_swarm.jpg b/assets/images/nanobot_swarm.jpg new file mode 100644 index 0000000..3740ab0 Binary files /dev/null and b/assets/images/nanobot_swarm.jpg differ diff --git a/assets/scripts/enemies/nanobot_swarm.lua b/assets/scripts/enemies/nanobot_swarm.lua new file mode 100644 index 0000000..5b5421d --- /dev/null +++ b/assets/scripts/enemies/nanobot_swarm.lua @@ -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 + } +}) diff --git a/assets/scripts/events/act_0/enemies.lua b/assets/scripts/events/act_0/enemies.lua index 649b0c8..9c98f90 100644 --- a/assets/scripts/events/act_0/enemies.lua +++ b/assets/scripts/events/act_0/enemies.lua @@ -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