Newer
Older
-- Copyright (C) 2009, 2010, 2011, 2012, 2013 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
points = 5,
mode = "sustained",
cooldown = 0,
sustain_psi = 10,
no_energy = true,
tactical = { BUFF = 2 },
getSpeed = function(self, t) return self:combatTalentScale(t, 0.2, 0.5, 0.75) end,
getKBVulnerable = function(self, t) return 1 - self:combatTalentLimit(t, 1, 0.3, 0.7) end,
activate = function(self, t)
return {
speed = self:addTemporaryValue("movement_speed", t.getSpeed(self, t)),
knockback = self:addTemporaryValue("knockback_immune", -t.getKBVulnerable(self, t))
}
end,
deactivate = function(self, t, p)
self:removeTemporaryValue("movement_speed", p.speed)
self:removeTemporaryValue("knockback_immune", p.knockback)
return true
end,
info = function(self, t)
return ([[You telekinetically float just off the ground.
This allows you to slide around the battle quickly, increasing your movement speed by %d%%.
It also makes you more vulnerable to being pushed around (-%d%% knockback resistance).]]):
format(t.getSpeed(self, t)*100, t.getKBVulnerable(self, t)*100)
type = {"psionic/augmented-mobility", 2},
require = psi_wil_req2,
getDuration = function(self, t) return math.floor(self:combatLimit(self:combatMindpower(0.1), 10, 4, 0, 6, 6)) end, -- Limit < 10
speed = function(self, t) return self:combatTalentScale(t, 0.1, 0.4, 0.75) end,
return self:combatScale(self:combatTalentMindDamage(t, 20, 60), 0, 0, 50, 100, 0.75)
self:setEffect(self.EFF_QUICKNESS, t.getDuration(self, t), {power=t.speed(self, t)})
self:setEffect(self.EFF_CONTROL, t.getDuration(self, t), {power=t.getBoost(self, t)})
local inc = t.speed(self, t)
local boost = t.getBoost(self, t)
return ([[Encase your body in a sheath of thought-quick forces, allowing you to control your body's movements directly without the inefficiency of dealing with crude mechanisms like nerves and muscles.
Increases Accuracy by %d, your critical strike chance by %0.1f%% and your global speed by %d%% for %d turns.
format(boost, 0.5*boost, percentinc, t.getDuration(self, t))
type = {"psionic/augmented-mobility", 3},
require = psi_wil_req3,
cooldown = function(self, t) return math.ceil(self:combatTalentLimit(t, 5, 18, 10)) end, -- Limit to >5
range = function(self, t) return math.floor(self:combatTalentLimit(t, 10, 3, 7)) end, -- Limit base range to 10
local tg = {type="bolt", range=self:getTalentRange(t)}
local x, y = self:getTarget(tg)
local _ _, x, y = self:canProject(tg, x, y)
local target = game.level.map(x, y, engine.Map.ACTOR)
if not target then
game.logPlayer(self, "The target is out of range")
return
end
target:pull(self.x, self.y, tg.range)
target:setEffect(target.EFF_DAZED, 1, {apply_power=self:combatMindpower()})
game:playSoundNear(self, "talents/arcane")
return true
end,
info = function(self, t)
local range = self:getTalentRange(t)
return ([[Briefly extend your telekinetic reach to grab an enemy and haul them towards you.
Works on enemies up to %d squares away.
The cooldown decreases, and the range increases, with additional talent points spent.]]):
type = {"psionic/augmented-mobility", 4},
require = psi_wil_req4,
tactical = { CLOSEIN = 2 },
range = function(self, t)
return math.floor(self:combatTalentLimit(t, 10, 2, 7.5)) -- Limit < 10
end,
local tg = {default_target=self, type="ball", nolock=true, pass_terrain=false, nowarning=true, range=self:getTalentRange(t), radius=0, requires_knowledge=false}
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 not x or not y then return nil end
local fx, fy = util.findFreeGrid(x, y, 5, true, {[Map.ACTOR]=true})
if not fx then
return
self:move(fx, fy, true)
return true
end,
info = function(self, t)
local range = self:getTalentRange(t)
return ([[You perform a precise, telekinetically-enhanced leap, landing up to %d squares away.]]):
format(range)