talent mod help request

Have a really dumb question? Ask it here to get help from the experts (or those with too much time on their hands)

Moderator: Moderator

Post Reply
Message
Author
Lord Leks Darkmind
Yeek
Posts: 13
Joined: Sat Mar 09, 2013 1:03 am

talent mod help request

#1 Post 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.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: talent mod help request

#2 Post 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})
My feedback meter decays into coding. Give me feedback and I make mods.

Lord Leks Darkmind
Yeek
Posts: 13
Joined: Sat Mar 09, 2013 1:03 am

Re: talent mod help request

#3 Post 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!

Post Reply