Skip to content
Snippets Groups Projects
Commit 747adde3 authored by dg's avatar dg
Browse files

all cold drake talents work

Quake works


git-svn-id: http://svn.net-core.org/repos/t-engine4@456 51575b47-30f0-44d4-a5cc-537603b46e54
parent 50b9fcd7
No related branches found
No related tags found
No related merge requests found
......@@ -183,6 +183,29 @@ function _M:probabilityTravel(x, y, dist)
return true
end
--- Reveals location surrounding the actor
function _M:doQuake(tg, x, y)
local locs = {}
local ms = {}
self:project(tg, x, y, function(tx, ty)
locs[#locs+1] = {x=tx,y=ty}
ms[#ms+1] = game.level.map.map[tx + ty * game.level.map.w]
end)
while #locs > 0 do
local l = rng.tableRemove(locs)
local m = rng.tableRemove(ms)
game.level.map.map[l.x + l.y * game.level.map.w] = m
for k, e in pairs(m) do
if e.x and e.y and e.move then e:move(l.x, l.y, true)
elseif e.x and e.y then e.x, e.ly = l.x, l.y end
end
end
game.level.map:cleanFOV()
game.level.map.changed = true
game.level.map:redisplay()
end
--- Reveals location surrounding the actor
function _M:magicMap(radius)
radius = math.floor(radius)
......
local Object = require "engine.Object"
newTalent{
name = "Ice Claw",
type = {"wild-gift/cold-drake", 1},
......@@ -14,7 +16,7 @@ newTalent{
local x, y, target = self:getTarget(tg)
if not x or not y or not target then return nil end
if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end
self:attackTargetWith(target, DamageType.COLD, 1.4 + self:getTalentLevel(t) / 8, true)
self:attackTarget(target, DamageType.COLD, 1.4 + self:getTalentLevel(t) / 8, true)
return true
end,
info = function(self, t)
......@@ -59,11 +61,38 @@ newTalent{
cooldown = 30,
range = 20,
action = function(self, t)
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local _ _, x, y = self:canProject(tg, x, y)
if game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move") then return nil end
local e = Object.new{
old_feat = game.level.map(x, y, Map.TERRAIN),
name = "summoned ice wall",
display = '#', color=colors.LIGHT_BLUE,
always_remember = true,
block_move = true,
block_sight = false,
temporary = 4 + self:getTalentLevel(t),
x = x, y = y,
canAct = false,
act = function(self)
self:useEnergy()
self.temporary = self.temporary - 1
if self.temporary <= 0 then
game.level.map(self.x, self.y, Map.TERRAIN, self.old_feat)
game.level:removeEntity(self)
game.level.map:redisplay()
end
end
}
game.level:addEntity(e)
game.level.map(x, y, Map.TERRAIN, e)
return true
end,
info = function(self, t)
return ([[You slam your foot onto the ground, shaking the area around you in a radius of %d, damage and knocking back your foes.
The damage will increase with the Strength stat]]):format(2 + self:getTalentLevel(t) / 2)
return ([[Summons an icy wall for %d turns. Ice walls are transparent.]]):format(4 + self:getTalentLevel(t))
end,
}
......
......@@ -3,7 +3,7 @@ newTalent{
type = {"wild-gift/fire-drake", 1},
require = gifts_req1,
points = 5,
message = "@Source@ burrows into the ground!",
message = "@Source@ roars!",
equilibrium = 3,
cooldown = 20,
range = 5,
......
......@@ -52,8 +52,9 @@ newTalent{
},
range = 20,
action = function(self, t)
local tg = {type="ball", range=0, friendlyfire=false, radius=2 + self:getTalentLevel(t) / 2, talent=t}
local tg = {type="ball", range=0, friendlyfire=false, radius=2 + self:getTalentLevel(t) / 2, talent=t, no_restrict=true}
self:project(tg, self.x, self.y, DamageType.PHYSKNOCKBACK, {dam=self:combatDamage() * 0.8, dist=4})
self:doQuake(tg, self.x, self.y)
return true
end,
info = function(self, t)
......
......@@ -77,6 +77,7 @@ newTalent{
newTalent{
name = "Stone Wall",
type = {"spell/earth",4},
require = spells_req4,
points = 5,
cooldown = 12,
mana = 70,
......@@ -123,7 +124,6 @@ newTalent{
return true
end,
require = { stat = { mag=34 } },
info = function(self, t)
return ([[Entombs yourself in a wall of stone for %d turns.]]):format(2 + self:combatSpellpower(0.03) * self:getTalentLevel(t))
end,
......
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