Skip to content
Snippets Groups Projects
Commit 6c7cca63 authored by dg's avatar dg
Browse files

Sandworm Tunnelers now have the stairs on their nodes list

git-svn-id: http://svn.net-core.org/repos/t-engine4@1595 51575b47-30f0-44d4-a5cc-537603b46e54
parent f32cafda
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,19 @@ local DamageType = require "engine.DamageType"
newAI("sandworm_tunneler", function(self)
-- Get a spot
if not self.ai_state.spot_x then
local s = rng.table(game.level.spots)
self.ai_state.spot_x = s.x
self.ai_state.spot_y = s.y
if game.level.default_up and rng.chance(#game.level.spots + 2) then
-- Go for the stairs
self.ai_state.spot_x = game.level.default_up.x
self.ai_state.spot_y = game.level.default_up.y
elseif game.level.default_down and rng.chance(#game.level.spots + 2) then
-- Go for the stairs
self.ai_state.spot_x = game.level.default_down.x
self.ai_state.spot_y = game.level.default_down.y
else
local s = rng.table(game.level.spots)
self.ai_state.spot_x = s.x
self.ai_state.spot_y = s.y
end
end
-- Move toward it, digging your way to it
......
......@@ -24,6 +24,7 @@ newTalent{
points = 5,
require = techs_req1,
sustain_stamina = 20,
no_energy = true,
cooldown = 5,
activate = function(self, t)
return {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment