Page 1 of 1

talent mod help request

Posted: Sun Mar 14, 2021 10:37 am
by Lord Leks Darkmind
fond myself killing escorts. tried to make custom talent to keep them alive.
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, 
}
[/spoiler]


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, 
}
3 permanent, can`t find a way to make it temporary.

Code: Select all

target:setEffect(target.EFF_DEMI_GODMODE, 1)

need help.

Re: talent mod help request

Posted: Sun Mar 14, 2021 9:32 pm
by HousePet
How about doing something like:

Code: Select all

target:setEffect(target.EFF_HIGHBORN_WRATH, 10, {power=50})
target:setEffect(target.EFF_REGENERATION, 10, {power=50})

Re: talent mod help request

Posted: Fri Mar 19, 2021 11:42 am
by Lord Leks Darkmind
HousePet wrote:How about doing something like:

Code: Select all

target:setEffect(target.EFF_HIGHBORN_WRATH, 10, {power=50})
target:setEffect(target.EFF_REGENERATION, 10, {power=50})
Yes, thank you.
now just to find a way to remove bad effects.. or just make invulnerable? choices!