Skip to content
Snippets Groups Projects
Commit 2b8070db authored by dg's avatar dg
Browse files

all summoner talents done

git-svn-id: http://svn.net-core.org/repos/t-engine4@466 51575b47-30f0-44d4-a5cc-537603b46e54
parent fe1d30b4
No related branches found
No related tags found
No related merge requests found
......@@ -129,6 +129,9 @@ function _M:project(t, x, y, damtype, dam, particles)
for px, ys in pairs(grids) do
for py, _ in pairs(ys) do
damtype(px, py)
if particles then
game.level.map:particleEmitter(px, py, 1, particles.type)
end
end
end
else
......
-- Defines AIs that can heal
-- Find an friendly target
-- this requires the ActorFOV interface, or an interface that provides self.fov.actors*
newAI("target_heal", function(self)
if self.ai_target.actor and not self.ai_target.actor.dead and rng.percent(90) then return true end
-- Find closer ennemy and target it
-- Get list of actors ordered by distance
local arr = self.fov.actors_dist
local act
for i = 1, #arr do
act = self.fov.actors_dist[i]
-- print("AI looking for target", self.uid, self.name, "::", act.uid, act.name, self.fov.actors[act].sqdist)
-- find the closest ennemy
if act and self:reactionToward(act) >= 0 and not act.dead then
self.ai_target.actor = act
return true
end
end
end)
-- Randomly use talents
newAI("dumb_heal", function(self)
-- Find available talents
local avail = {}
local target_dist = math.floor(core.fov.distance(self.x, self.y, self.ai_target.actor.x, self.ai_target.actor.y))
for tid, _ in pairs(self.talents) do
local t = self:getTalentFromId(tid)
-- print(self.name, self.uid, "dumb ai talents can try use", t.name, tid, "::", t.mode, not self:isTalentCoolingDown(t), target_dist <= self:getTalentRange(t), self:preUseTalent(t, true), self:canProject({type="bolt"}, self.ai_target.actor.x, self.ai_target.actor.y))
if t.mode == "activated" and not self:isTalentCoolingDown(t) and target_dist <= self:getTalentRange(t) and self:preUseTalent(t, true) and self:canProject({type="bolt"}, self.ai_target.actor.x, self.ai_target.actor.y) then
avail[#avail+1] = tid
print(self.name, self.uid, "dumb ai talents can use", t.name, tid)
elseif t.mode == "sustained" and not self:isTalentCoolingDown(t) and not self:isTalentActive(t) and self:preUseTalent(t, true) then
avail[#avail+1] = tid
print(self.name, self.uid, "dumb ai talents can activate", t.name, tid)
end
end
if #avail > 0 then
local tid = avail[rng.range(1, #avail)]
print("dumb ai uses", tid)
self:useTalent(tid)
return true
end
end)
newAI("dumb_heal_simple", function(self)
if self:runAI("target_heal") then
-- One in "talent_in" chance of using a talent
if rng.chance(self.ai_state.talent_in or 6) and self:reactionToward(self.ai_target.actor) >= 0 then
self:runAI("dumb_heal")
end
if not self.energy.used then
self:runAI(self.ai_state.ai_move or "move_simple")
end
return true
end
end)
......@@ -24,9 +24,9 @@ newBirthDescriptor{
desc = {
"Summoners never fight alone, they are always ready to invoke one of their many summons to fight at their side.",
"Summons can range from a combat hound to a fire drake.",
"Their most important stats are: Willpower and Constitution",
"Their most important stats are: Willpower and Cunning",
},
stats = { wil=3, con=2, cun=1, },
stats = { wil=3, cun=2, con=1, },
talents_types = {
["wild-gift/call"]={true, 0.2},
["wild-gift/summon-melee"]={true, 0.3},
......
......@@ -17,7 +17,7 @@ newEntity{ base = "BASE_SCROLL",
cost = 1,
use_simple = { name="light up the surrounding area", use = function(self, who)
who:project({type="ball", range=0, friendlyfire=false, radius=15}, who.x, who.y, DamageType.LIGHT, 1)
who:project({type="ball", range=0, friendlyfire=false, radius=15}, who.x, who.y, engine.DamageType.LIGHT, 1)
game.logSeen(who, "%s reads a %s!", who.name:capitalize(), self:getName())
return "destroy", true
end}
......
......@@ -33,10 +33,28 @@ gifts_req5 = {
}
load("/data/talents/gifts/call.lua")
load("/data/talents/gifts/slime.lua")
load("/data/talents/gifts/sand-drake.lua")
load("/data/talents/gifts/fire-drake.lua")
load("/data/talents/gifts/cold-drake.lua")
function checkMaxSummon(self)
local nb = 0
for _, e in pairs(game.level.entities) do
if e.summoner and e.summoner == self then nb = nb + 1 end
end
local max = math.max(1, math.floor(self:getCun() / 10))
if nb >= max then
game.logPlayer(self, "#PINK#You can not summon any more, you have too many summons already (%d). You can increase the limit with higher Cunning.", nb)
return true
else
return false
end
end
load("/data/talents/gifts/summon-melee.lua")
load("/data/talents/gifts/summon-distance.lua")
load("/data/talents/gifts/summon-utility.lua")
......
......@@ -4,17 +4,104 @@ newTalent{
require = gifts_req1,
points = 5,
equilibrium = 5,
cooldown = 15,
range = 20,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty or not target or not target.summoner or not target.summoner == self then return nil end
target:setEffect(target.EFF_ALL_STAT, 5, {power=2+math.floor(self:getTalentLevel(t) * 2)})
return true
end,
info = function(self, t)
return ([[Induces a killing rage in one of your summons, increasing its stats by %d.]]):format(2+math.floor(self:getTalentLevel(t) * 2))
end,
}
newTalent{
name = "Detonate",
type = {"wild-gift/summon-augmentation", 2},
require = gifts_req2,
points = 5,
equilibrium = 5,
cooldown = 25,
range = 20,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty or not target or not target.summoner or not target.summoner == self then return nil end
if target.name == "fire imp" then
local tg = {type="ball", range=self:getTalentRange(t), radius=1 + self:getTalentLevelRaw(t), talent=t}
target:project(tg, target.x, target.y, DamageType.FIRE, 28 + self:getWil(32) * self:getTalentLevel(t), {type="flame"})
target:die()
elseif target.name == "black jelly" then
local tg = {type="ball", range=self:getTalentRange(t), radius=1 + self:getTalentLevelRaw(t), talent=t}
target:project(tg, target.x, target.y, DamageType.SLIME, 18 + self:getWil(22) * self:getTalentLevel(t), {type="slime"})
target:die()
elseif target.name == "benevolent spirit" then
local tg = {type="ball", range=self:getTalentRange(t), radius=1 + self:getTalentLevelRaw(t), talent=t}
target:project(tg, target.x, target.y, function(tx, ty)
local a = game.level.map(tx, ty, Map.ACTOR)
if a and self:reactionToward(a) >= 0 then
a:heal(10 + self:getWil(30) * self:getTalentLevel(t))
end
end, nil, {type="acid"})
target:die()
else
game.logPlayer("You may not detonate this summon.")
return nil
end
return true
end,
info = function(self, t)
return ([[Destroys one of your summons, make it detonate.
Only some summons can be detonated:
- Fire Imp: Explodes into a fireball
- Jelly: Explodes into a ball of slowing slime
- Benevolent Spirit: Explodes into a ball of healing
The effect improves with your Willpower.]]):format()
end,
}
newTalent{
name = "Resilience",
type = {"wild-gift/summon-augmentation", 3},
require = gifts_req3,
mode = "passive",
points = 5,
info = function(self, t)
return ([[Improves all your summons life time and Constitution.]])
end,
}
newTalent{
name = "Phase Summon",
type = {"wild-gift/summon-augmentation", 4},
require = gifts_req4,
points = 5,
equilibrium = 5,
cooldown = 25,
range = 20,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t), nolock=true, talent=t}
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty or not target then return nil end
game.logPlayer("IMPLEMENT ME")
if not tx or not ty or not target or not target.summoner or not target.summoner == self then return nil end
local dur = 1 + self:getTalentLevel(t)
self:setEffect(self.EFF_EVASION, dur, {chance=50})
target:setEffect(target.EFF_EVASION, dur, {chance=50})
-- Displace
game.level.map:remove(self.x, self.y, Map.ACTOR)
game.level.map:remove(target.x, target.y, Map.ACTOR)
game.level.map(self.x, self.y, Map.ACTOR, target)
game.level.map(target.x, target.y, Map.ACTOR, self)
self.x, self.y, target.x, target.y = target.x, target.y, self.x, self.y
return true
end,
info = function(self, t)
return ([[Induces a killing rage in one of you melee summons, increase your target's damage by %d.
Damage increase improves with your Magic stat.]]):format(10 + self:getWil() * self:getTalentLevel(t) / 5, 10 + self:getTalentLevel(t) * 2)
return ([[Switches places with one of your summons. This disorients your foes, granting both you and your summon 50%% evasion for %d turns.]]):format(1 + self:getTalentLevel(t))
end,
}
......@@ -103,6 +103,7 @@ newTalent{
cooldown = 10,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -124,7 +125,7 @@ newTalent{
desc = [[]],
autolevel = "none",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { mag=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=18, con=10 + self:getTalentLevel(t) * 2, },
stats = { mag=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=10 + self:getTalentLevel(t) * 2, con=10+ self:getTalentLevelRaw(self.T_RESILIENCE)*2, },
level_range = {self.level, self.level}, exp_worth = 0,
max_life = resolvers.rngavg(5,10),
......@@ -139,7 +140,7 @@ newTalent{
},
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -166,6 +167,7 @@ newTalent{
cooldown = 10,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -187,7 +189,7 @@ newTalent{
desc = [[A strange reptilian creature with three smouldering heads.]],
autolevel = "none",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { wil=15 + self:getWil() * self:getTalentLevel(t) / 5, str=18, },
stats = { wil=15 + self:getWil() * self:getTalentLevel(t) / 5, str=18, con=10 + self:getTalentLevel(t) * 2 + self:getTalentLevelRaw(self.T_RESILIENCE)*2},
level_range = {self.level, self.level}, exp_worth = 0,
max_life = resolvers.rngavg(5,10),
......@@ -204,7 +206,7 @@ newTalent{
},
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -217,7 +219,7 @@ newTalent{
end,
info = function(self, t)
return ([[Summon a 3-headed Hydra to destroy your foes. 3-headed hydras are able to breath poison, acid and lightning.
It will get %d magic and %d willpower.]]):format(15 + self:getWil() * self:getTalentLevel(t) / 5, 10 + self:getTalentLevel(t) * 2)
It will get %d willpower and %d constitution.]]):format(15 + self:getWil() * self:getTalentLevel(t) / 5, 10 + self:getTalentLevel(t) * 2)
end,
}
......@@ -231,6 +233,7 @@ newTalent{
cooldown = 10,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -253,7 +256,7 @@ newTalent{
desc = [[It looks like a hole in reality, the Warper disrupts the normal flow of space and time.]],
autolevel = "none",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { mag=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=18, con=10 + self:getTalentLevel(t) * 2, },
stats = { mag=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=10 + self:getTalentLevel(t) * 2, con=10+self:getTalentLevelRaw(self.T_RESILIENCE) * 2, },
level_range = {self.level, self.level}, exp_worth = 0,
max_life = resolvers.rngavg(5,10),
......@@ -270,7 +273,7 @@ newTalent{
},
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -282,7 +285,7 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Summon a Fire Imp to burn your foes to death. Fire Imps are really weak in melee and die easily, but they can burn your foes from afar.
return ([[Summon a Warper to arras your foes. Warpers are really weak in melee and die easily, but they can blink around, throwing manathursts and time prisons at your foes.
It will get %d magic and %d willpower.]]):format(15 + self:getWil() * self:getTalentLevel(t) / 5, 10 + self:getTalentLevel(t) * 2)
end,
}
......@@ -297,6 +300,7 @@ newTalent{
cooldown = 10,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -318,7 +322,7 @@ newTalent{
desc = [[A mighty fire drake, an Uruloki.]],
autolevel = "none",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { str=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=38, con=20 + self:getTalentLevel(t) * 3, },
stats = { str=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=38, con=20 + self:getTalentLevel(t) * 3 + self:getTalentLevelRaw(self.T_RESILIENCE) * 2, },
level_range = {self.level, self.level}, exp_worth = 0,
max_life = resolvers.rngavg(100, 150),
......@@ -335,7 +339,7 @@ newTalent{
},
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 2,
summon_time = math.ceil(self:getTalentLevel(t)) + 2 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -348,6 +352,6 @@ newTalent{
end,
info = function(self, t)
return ([[Summon a Fire Drake to burn and crush your foes to death. Fire Drakes a behemoths that can burn your foes from afar with their fiery breath.
It will get %d strenght and %d willpower.]]):format(15 + self:getWil() * self:getTalentLevel(t) / 5, 10 + self:getTalentLevel(t) * 2)
It will get %d strengh and %d constitution.]]):format(15 + self:getWil() * self:getTalentLevel(t) / 5, 10 + self:getTalentLevel(t) * 2)
end,
}
......@@ -8,6 +8,7 @@ newTalent{
cooldown = 15,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -29,7 +30,7 @@ newTalent{
desc = [[]],
autolevel = "warrior",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=5, },
stats = { str=10 + self:getWil() * self:getTalentLevel(t) / 5, dex=10 + self:getTalentLevel(t) * 2, mag=5, con=15 },
stats = { str=10 + self:getWil() * self:getTalentLevel(t) / 5, dex=10 + self:getTalentLevel(t) * 2, mag=5, con=15 + self:getTalentLevelRaw(self.T_RESILIENCE)*2 },
level_range = {self.level, self.level}, exp_worth = 0,
max_life = resolvers.rngavg(25,50),
......@@ -39,7 +40,7 @@ newTalent{
combat = { dam=resolvers.rngavg(12,25), atk=10, apr=10, dammod={str=0.8} },
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -66,6 +67,7 @@ newTalent{
cooldown = 10,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -86,7 +88,7 @@ newTalent{
desc = "A strange blob on the dungeon floor.",
name = "black jelly",
autolevel = "none", faction=self.faction,
stats = { con=10 + self:getWil() * self:getTalentLevel(t) / 5, str=10 + self:getTalentLevel(t) * 2 },
stats = { con=10 + self:getWil() * self:getTalentLevel(t) / 5 + self:getTalentLevelRaw(self.T_RESILIENCE) * 3, str=10 + self:getTalentLevel(t) * 2 },
resists = { [DamageType.LIGHT] = -50 },
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=5, },
level_range = {self.level, self.level}, exp_worth = 0,
......@@ -100,7 +102,7 @@ newTalent{
combat = { dam=8, atk=15, apr=5, damtype=DamageType.ACID, dammod={str=0.7} },
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -127,6 +129,7 @@ newTalent{
cooldown = 15,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -155,7 +158,7 @@ newTalent{
autolevel = "none",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=5, },
energy = { mod=1.2 },
stats = { str=25 + self:getWil() * self:getTalentLevel(t) / 5, dex=18, con=10 + self:getTalentLevel(t) * 2, },
stats = { str=25 + self:getWil() * self:getTalentLevel(t) / 5, dex=18, con=10 + self:getTalentLevel(t) * 2 + self:getTalentLevelRaw(self.T_RESILIENCE)*2, },
resolvers.tmasteries{ ["technique/2hweapon-offense"]=0.3, ["technique/2hweapon-cripple"]=0.3, ["technique/combat-training"]=0.3, },
desc = [[It is a cross between a human and a bull.]],
......@@ -167,7 +170,7 @@ newTalent{
faction = self.faction,
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t) / 2) + 2,
summon_time = math.ceil(self:getTalentLevel(t) / 2) + 2 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -194,6 +197,7 @@ newTalent{
cooldown = 20,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -221,7 +225,7 @@ newTalent{
autolevel = "none",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=2, },
stats = { str=25 + self:getWil() * self:getTalentLevel(t) / 5, dex=18, con=10 + self:getTalentLevel(t) * 2, },
stats = { str=25 + self:getWil() * self:getTalentLevel(t) / 5, dex=18, con=10 + self:getTalentLevel(t) * 2 + self:getTalentLevelRaw(self.T_RESILIENCE)*2, },
desc = [[It is a massive animated statue.]],
level_range = {self.level, self.level}, exp_worth = 0,
......@@ -234,7 +238,7 @@ newTalent{
faction = self.faction,
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......
newTalent{
name = "Summon End",
type = {"wild-gift/other",1},
require = gifts_req1,
points = 1,
action = function(self, t)
self:die()
......@@ -12,6 +11,98 @@ newTalent{
end,
}
newTalent{
name = "Taunt",
type = {"technique/other",1},
points = 1,
cooldown = 5,
action = function(self, t)
local tg = {type="ball", range=0, radius=3 + self:getTalentLevelRaw(t), friendlyfire=false, talent=t}
self:project(tg, self.x, self.y, function(tx, ty)
local a = game.level.map(tx, ty, Map.ACTOR)
if a and self:reactionToward(a) < 0 then
a:setTarget(self)
end
end)
return true
end,
info = function(self, t)
return ([[Forces hostile foes to attack you.]])
end,
}
newTalent{ short_name="SPIDER_WEB",
name = "Web",
type = {"wild-gift/other",1},
points = 5,
equilibrium = 5,
cooldown = 3,
range=10,
action = function(self, t)
local tg = {type="bolt", 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 target and target:checkHit(self:combatAttackStr(), target:combatPhysicalResist(), 0, 95, 7) then
target:setEffect(target.EFF_PINNED, 3 + self:getTalentLevel(t), {})
end
end)
return true
end,
info = function(self, t)
return ([[Spread a web and throw it toward your target. If caught it wont be able to move for %d turns.]]):format(3 + self:getTalentLevel(t))
end,
}
newTalent{ short_name="HEAL_OTHER",
name = "Heal Other",
type = {"wild-gift/other",1},
points = 5,
equilibrium = 5,
cooldown = 4,
range=14,
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 target then
target:heal(15 + self:getMag(40) * self:getTalentLevel(t))
end
end)
return true
end,
info = function(self, t)
return ([[Heal your target for %d life.]]):format(15 + self:getMag(40) * self:getTalentLevel(t))
end,
}
newTalent{ short_name="REGENERATE_OTHER",
name = "Regenerate Other",
type = {"wild-gift/other",1},
points = 5,
equilibrium = 5,
cooldown = 10,
range=14,
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 target then
target:setEffect(target.EFF_REGENERATION, 10, {power=(15 + self:getMag(40) * self:getTalentLevel(t)) / 10})
end
end)
return true
end,
info = function(self, t)
return ([[Regenerate your target for %d life over 10 turns.]]):format(15 + self:getMag(40) * self:getTalentLevel(t))
end,
}
newTalent{
name = "Turtle",
type = {"wild-gift/summon-utility", 1},
......@@ -22,6 +113,7 @@ newTalent{
cooldown = 10,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -37,28 +129,27 @@ newTalent{
local NPC = require "mod.class.NPC"
local m = NPC.new{
type = "demon", subtype = "lesser",
display = "u", color=colors.RED,
name = "fire imp", faction = self.faction,
type = "animal", subtype = "turle",
display = "R", color=colors.GREEN,
name = "turtle", faction = self.faction,
desc = [[]],
autolevel = "none",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { mag=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=18, con=10 + self:getTalentLevel(t) * 2, },
stats = { con=15 + self:getWil() * self:getTalentLevel(t) / 5 + self:getTalentLevelRaw(self.T_RESILIENCE)*2, wil=18, dex=10 + self:getTalentLevel(t) * 2, },
level_range = {self.level, self.level}, exp_worth = 0,
max_life = resolvers.rngavg(5,10),
life_rating = 8,
max_life = 100,
life_rating = 14,
combat_armor = 0, combat_def = 0,
combat_armor = 10, combat_def = 0,
combat = { dam=1, atk=1, },
max_mana = 150,
resolvers.talents{
[self.T_FIRE_IMP_BOLT]=self:getTalentLevelRaw(t),
[self.T_TAUNT]=self:getTalentLevelRaw(t),
},
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -80,11 +171,12 @@ newTalent{
type = {"wild-gift/summon-utility", 2},
require = gifts_req2,
points = 5,
message = "@Source@ summons a Qpider!",
message = "@Source@ summons a Spider!",
equilibrium = 5,
cooldown = 10,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -100,28 +192,28 @@ newTalent{
local NPC = require "mod.class.NPC"
local m = NPC.new{
type = "demon", subtype = "lesser",
display = "u", color=colors.RED,
name = "fire imp", faction = self.faction,
type = "animal", subtype = "spider",
display = "S", color=colors.LIGHT_DARK,
name = "giant spider", faction = self.faction,
desc = [[]],
autolevel = "none",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { mag=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=18, con=10 + self:getTalentLevel(t) * 2, },
stats = { str=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=18, dex=10 + self:getTalentLevel(t) * 2, con=10 + self:getTalentLevelRaw(self.T_RESILIENCE)*2 },
level_range = {self.level, self.level}, exp_worth = 0,
max_life = resolvers.rngavg(5,10),
life_rating = 8,
max_life = 50,
life_rating = 10,
combat_armor = 0, combat_def = 0,
combat = { dam=1, atk=1, },
combat = { dam=10, atk=16, },
max_mana = 150,
resolvers.talents{
[self.T_FIRE_IMP_BOLT]=self:getTalentLevelRaw(t),
[self.T_SPIDER_WEB]=self:getTalentLevelRaw(t),
[self.T_BITE_POISON]=self:getTalentLevelRaw(t),
},
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -133,8 +225,8 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Summon a Fire Imp to burn your foes to death. Fire Imps are really weak in melee and die easily, but they can burn your foes from afar.
It will get %d magic and %d willpower.]]):format(15 + self:getWil() * self:getTalentLevel(t) / 5, 10 + self:getTalentLevel(t) * 2)
return ([[Summon a Spider to arras your foes. Spiders can poison your foes and throw webs to pin them to the ground.
It will get %d strength and %d dexterity.]]):format(15 + self:getWil() * self:getTalentLevel(t) / 5, 10 + self:getTalentLevel(t) * 2)
end,
}
......@@ -145,9 +237,10 @@ newTalent{
points = 5,
message = "@Source@ summons a Benevolent Spirit!",
equilibrium = 8,
cooldown = 10,
cooldown = 18,
range = 20,
action = function(self, t)
if checkMaxSummon(self) then return end
local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
if not tx or not ty then return nil end
......@@ -163,13 +256,13 @@ newTalent{
local NPC = require "mod.class.NPC"
local m = NPC.new{
type = "demon", subtype = "lesser",
display = "u", color=colors.RED,
name = "fire imp", faction = self.faction,
type = "spirit", subtype = "lesser",
display = "G", color=colors.LIGHT_GREEN,
name = "benevolent spirit", faction = self.faction,
desc = [[]],
autolevel = "none",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { mag=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=18, con=10 + self:getTalentLevel(t) * 2, },
ai = "summoned", ai_real = "dumb_heal_simple", ai_state = { talent_in=1, },
stats = { mag=15 + self:getWil() * self:getTalentLevel(t) / 5, wil=10 + self:getTalentLevel(t) * 2, con=10 + self:getTalentLevelRaw(self.T_RESILIENCE)*2 },
level_range = {self.level, self.level}, exp_worth = 0,
max_life = resolvers.rngavg(5,10),
......@@ -178,13 +271,13 @@ newTalent{
combat_armor = 0, combat_def = 0,
combat = { dam=1, atk=1, },
max_mana = 150,
resolvers.talents{
[self.T_FIRE_IMP_BOLT]=self:getTalentLevelRaw(t),
[self.T_HEAL_OTHER]=self:getTalentLevelRaw(t),
[self.T_REGENERATE_OTHER]=self:getTalentLevelRaw(t),
},
summoner = self, summoner_gain_exp=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
}
......@@ -196,7 +289,7 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Summon a Fire Imp to burn your foes to death. Fire Imps are really weak in melee and die easily, but they can burn your foes from afar.
return ([[Summon a Benevolent Spirit to heal your allies and yourself.
It will get %d magic and %d willpower.]]):format(15 + self:getWil() * self:getTalentLevel(t) / 5, 10 + self:getTalentLevel(t) * 2)
end,
}
......
No preview for this file type
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