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

Replace Mana Tap with Supercharge Golem for Alchemists - it will instantly...

Replace Mana Tap with Supercharge Golem for Alchemists - it will instantly bring back a dead golem to life and give it a big regen boost and damage boost


git-svn-id: http://svn.net-core.org/repos/t-engine4@2966 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9686ea74
No related branches found
No related tags found
No related merge requests found
......@@ -2320,4 +2320,6 @@ function _M:addedToLevel(level, x, y)
self.make_escort = nil
end
self:check("on_added_to_level", level, x, y)
self.last_act_turn = math.floor(game.turn / 10)
end
......@@ -19,39 +19,10 @@
local Chat = require "engine.Chat"
newTalent{
name = "Mana Tap",
name = "Life Tap", short_name = "GOLEMANCY_LIFE_TAP",
type = {"spell/advanced-golemancy", 1},
require = spells_req_high1,
points = 5,
mana = 0,
cooldown = 14,
tactical = { MANA = 2 },
getPower = function(self, t) return 40 + self:combatTalentSpellDamage(t, 15, 150) end,
action = function(self, t)
local mover, golem = getGolem(self)
if not golem then
game.logPlayer(self, "Your golem is currently inactive.")
return
end
local power = math.min(t.getPower(self, t), golem:getMana())
golem:incMana(-power)
self:incMana(power)
game:playSoundNear(self, "talents/arcane")
return true
end,
info = function(self, t)
local power=t.getPower(self, t)
return ([[You tap into your golem's mana pool to replenish your own. Drains %d mana.]]):
format(power)
end,
}
newTalent{
name = "Life Tap", short_name = "GOLEMANCY_LIFE_TAP",
type = {"spell/advanced-golemancy", 2},
require = spells_req_high2,
points = 5,
mana = 25,
cooldown = 12,
tactical = { HEAL = 2 },
......@@ -79,8 +50,8 @@ newTalent{
newTalent{
name = "Gem Golem",
type = {"spell/advanced-golemancy",3},
require = spells_req_high3,
type = {"spell/advanced-golemancy",2},
require = spells_req_high2,
mode = "passive",
points = 5,
info = function(self, t)
......@@ -90,6 +61,57 @@ newTalent{
end,
}
newTalent{
name = "Supercharge Golem",
type = {"spell/advanced-golemancy", 3},
require = spells_req_high3,
points = 5,
mana = 20,
cooldown = function(self, t) return math.floor(25 - self:getTalentLevel(t)) end,
tactical = { DEFEND = 1, ATTACK=1 },
getPower = function(self, t) return (60 + self:combatTalentSpellDamage(t, 15, 450)) / 7, 7, 20 + self:getTalentLevel(t) * 7 end,
action = function(self, t)
local regen, dur, hp = t.getPower(self, t)
-- ressurect the golem
if not game.level:hasEntity(self.alchemy_golem) or self.alchemy_golem.dead then
self.alchemy_golem.dead = nil
self.alchemy_golem.life = self.alchemy_golem.max_life / 100 * hp
-- Find space
local x, y = util.findFreeGrid(self.x, self.y, 5, true, {[Map.ACTOR]=true})
if not x then
game.logPlayer(self, "Not enough space to supercharge!")
return
end
game.zone:addEntity(game.level, self.alchemy_golem, "actor", x, y)
self.alchemy_golem:setTarget(nil)
self.alchemy_golem.ai_state.tactic_leash_anchor = self
self.alchemy_golem:removeAllEffects()
end
local mover, golem = getGolem(self)
if not golem then
game.logPlayer(self, "Your golem is currently inactive.")
return
end
golem:setEffect(golem.EFF_SUPERCHARGE_GOLEM, dur, {regen=regen})
game:playSoundNear(self, "talents/arcane")
return true
end,
info = function(self, t)
local regen, turns, life = t.getPower(self, t)
return ([[You activate a special mode of your golem, boosting its regeneration rate by %0.2f life per turn for %d turns.
If your golem was dead it is instantly brought back to life with %d%% life.
While supercharged your golem enrages and deals 25%% more damage.]]):
format(regen, turns, life)
end,
}
newTalent{
name = "Runic Golem",
type = {"spell/advanced-golemancy",4},
......
......@@ -804,6 +804,25 @@ newEffect{
end,
}
newEffect{
name = "SUPERCHARGE_GOLEM",
desc = "Supercharge Golem",
long_desc = function(self, eff) return ("The target is supercharged, increasing life regen by %0.2f and damage done by 20%%."):format(eff.regen) end,
type = "magical",
status = "beneficial",
parameters = { regen=10 },
on_gain = function(self, err) return "#Target# is overloaded with power.", "+Supercharge" end,
on_lose = function(self, err) return "#Target# seems less dangerous.", "-Supercharge" end,
activate = function(self, eff)
eff.pid = self:addTemporaryValue("inc_damage", {all=25})
eff.lid = self:addTemporaryValue("life_regen", eff.regen)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("inc_damage", eff.pid)
self:removeTemporaryValue("life_regen", eff.lid)
end,
}
newEffect{
name = "POWER_OVERLOAD",
desc = "Power Overload",
......
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