ended up with those:
1. permanent, can`t find a way to make it temporary.
Code: Select all
newTalent{
name = "Empower ally",
type = {"technique/shield-defense", 1},
require = techs_req1,
points = 1,
cooldown = 0,
requires_target = true,
no_npc_use = true,
tactical = { HEAL = 3 },
range = 10,
is_heal = true,
direct_hit = true,
requires_target = true,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, function(tx, ty)
local target = game.level.map(tx, ty, Map.ACTOR)
if not target then return end
target:attr("max_life", 75000, 750)
target:attr("life", 750, 750)
target:attr("life_regen", 750, 750)
target:removeEffectsFilter{type="magical", status="detrimental"}
target:removeEffectsFilter{type="physical", status="detrimental"}
end)
game:playSoundNear(self, "talents/heal")
return true
end,
info = function(self, t)
return ([[super health for target]])
end,
}
2 too short for some reason
Code: Select all
newTalent{
name = "shield ally",
type = {"technique/shield-defense", 1},
require = techs_req1,
points = 1,
cooldown = 0,
requires_target = true,
no_npc_use = true,
tactical = { HEAL = 3 },
range = 10,
is_heal = true,
direct_hit = true,
reflectable = false,
requires_target = true,
getDamage = 50,
getDuration = 50,
target = function(self, t)
return {type="hit", range=self:getTalentRange(t), talent=t}
end,
action = function(self, t)
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
if not x or not y then return nil end
local dam = 750
self:project(tg, x, y, DamageType.HEALING_POWER, 750, {type="HEAL"})
self:project(tg, x, y, DamageType.HEAL, 500, 500)
game:playSoundNear(self, "talents/heal")
return true
end,
info = function(self, t)
return ([[shield health for target]])
end,
}
Code: Select all
target:setEffect(target.EFF_DEMI_GODMODE, 1)
need help.