Skip to content
Snippets Groups Projects
Commit 5cd403c3 authored by dg's avatar dg
Browse files

Summoner's Detonate now works on all summons

git-svn-id: http://svn.net-core.org/repos/t-engine4@4603 51575b47-30f0-44d4-a5cc-537603b46e54
parent 0a62152d
No related branches found
No related tags found
No related merge requests found
......@@ -48,45 +48,42 @@ newTalent{
cooldown = 25,
range = 10,
radius = function(self, t)
return 1 + self:getTalentLevelRaw(t)
return 3 + self:getTalentLevelRaw(t)
end,
requires_target = true,
no_npc_use = true,
getRitchDamage = function(self, t)
return self:combatTalentStatDamage(t, "wil", 30, 400)
end,
getJellyDamage = function(self, t)
return self:combatTalentStatDamage(t, "wil", 30, 300)
end,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t), talent=t, first_target="friend"}
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 or not target.wild_gift_summon then return nil end
if not tx or not ty or not target or not target.summoner or not target.summoner == self or not target.wild_gift_summon or not target.wild_gift_detonate then return nil end
if target.name == "ritch flamespitter" then
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t}
target:project(tg, target.x, target.y, DamageType.FIRE, t.getRitchDamage(self, t), {type="flame"})
target:die()
elseif target.name == "black jelly" then
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t}
target:project(tg, target.x, target.y, DamageType.SLIME, t.getJellyDamage(self, t), {type="slime"})
target:die()
else
local dt = self:getTalentFromId(target.wild_gift_detonate)
if not dt.on_detonate then
game.logPlayer("You may not detonate this summon.")
return nil
end
dt.on_detonate(self, t, target)
target:die(self)
game:playSoundNear(self, "talents/fireflash")
return true
end,
info = function(self, t)
local radius = self:getTalentRadius(t)
local ritch_damage = t.getRitchDamage(self, t)
local jelly_damage = t.getJellyDamage(self, t)
return ([[Destroys one of your summons, make it detonate in radius of %d.
Only some summons can be detonated:
- Ritch Flamespitter: Explodes into a fireball doing %0.2f fire damage
- Jelly: Explodes into a ball of slowing slime doing %0.2f damage and slowing for 3 turns for 30%%
The effects improves with your Willpower.]]):format(radius, damDesc(self, DamageType.FIRE, ritch_damage), damDesc(self, DamageType.SLIME, jelly_damage))
- Ritch Flamespitter: Explodes into a fireball
- Hydra: Explodes into a ball of lightning, acid or poison
- Rimebark: Explodes into an iceball
- Fire Drake: Generates a cloud of fire
- War Hound: Explodes into a ball of physical damage
- Jelly: Explodes into a ball of slowing slime
- Minotaur: Explodes into a sharp ball, cutting all creatures
- Stone Golem: Knocks back all creatures
- Turtle: Grants a small shell shield to all friendly creatures
- Spider: Pins all foes around
The effects improves with your Willpower.]]):format(radius)
end,
}
......
......@@ -195,6 +195,10 @@ newTalent{
if not self:canBe("summon") and not silent then game.logPlayer(self, "You can not summon, you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
on_detonate = function(self, t, m)
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y}
self:project(tg, m.x, m.y, DamageType.FIREBURN, self:combatTalentMindDamage(t, 30, 300), {type="flame"})
end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -230,6 +234,8 @@ newTalent{
combat_armor = 0, combat_def = 0,
combat = { dam=1, atk=1, },
wild_gift_detonate = t.id,
resolvers.talents{
[self.T_RITCH_FLAMESPITTER_BOLT]=self:getTalentLevelRaw(t),
},
......@@ -265,7 +271,7 @@ newTalent{
random_ego = "attack",
message = "@Source@ summons a 3-headed hydra!",
equilibrium = 5,
cooldown = 10,
cooldown = 18,
range = 10,
requires_target = true,
is_summon = true,
......@@ -274,6 +280,10 @@ newTalent{
if not self:canBe("summon") and not silent then game.logPlayer(self, "You can not summon, you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
on_detonate = function(self, t, m)
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y}
self:project(tg, m.x, m.y, rng.table{DamageType.LIGHTNING,DamageType.ACID,DamageType.POISON}, self:combatTalentMindDamage(t, 30, 250), {type="flame"})
end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -315,6 +325,8 @@ newTalent{
[self.T_POISON_BREATH]=self:getTalentLevelRaw(t),
},
wild_gift_detonate = t.id,
summoner = self, summoner_gain_exp=true, wild_gift_summon=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
......@@ -353,6 +365,10 @@ newTalent{
if not self:canBe("summon") and not silent then game.logPlayer(self, "You can not summon, you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
on_detonate = function(self, t, m)
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y}
self:project(tg, m.x, m.y, DamageType.ICE, self:combatTalentMindDamage(t, 30, 300), {type="freeze"})
end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -391,6 +407,8 @@ newTalent{
combat_armor = 15, combat_def = 0,
combat = { dam=resolvers.levelup(resolvers.rngavg(15,25), 1, 1.3), atk=resolvers.levelup(resolvers.rngavg(15,25), 1, 1.3), dammod={cun=1.1} },
wild_gift_detonate = t.id,
resolvers.talents{
[self.T_WINTER_S_FURY]=self:getTalentLevelRaw(t),
},
......@@ -434,6 +452,16 @@ newTalent{
if not self:canBe("summon") and not silent then game.logPlayer(self, "You can not summon, you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
on_detonate = function(self, t, m)
game.level.map:addEffect(self,
m.x, m.y, 6,
DamageType.FIRE, self:combatTalentMindDamage(t, 10, 70),
self:getTalentRadius(t),
5, nil,
{type="inferno"},
nil, true
)
end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -470,6 +498,8 @@ newTalent{
resists = { [DamageType.FIRE] = 100, },
wild_gift_detonate = t.id,
resolvers.talents{
[self.T_FIRE_BREATH]=self:getTalentLevelRaw(t),
[self.T_BELLOWING_ROAR]=self:getTalentLevelRaw(t),
......
......@@ -34,6 +34,10 @@ newTalent{
if not self:canBe("summon") and not silent then game.logPlayer(self, "You can not summon, you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
on_detonate = function(self, t, m)
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y}
self:project(tg, m.x, m.y, DamageType.PHYSICAL, self:combatTalentMindDamage(t, 30, 250), {type="flame"})
end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -69,6 +73,8 @@ newTalent{
combat_armor = 2, combat_def = 4,
combat = { dam=self:getTalentLevel(t) * 10 + rng.avg(12,25), atk=10, apr=10, dammod={str=0.8} },
wild_gift_detonate = t.id,
summoner = self, summoner_gain_exp=true, wild_gift_summon=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target}
......@@ -108,6 +114,10 @@ newTalent{
if not self:canBe("summon") and not silent then game.logPlayer(self, "You can not summon, you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
on_detonate = function(self, t, m)
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y}
self:project(tg, m.x, m.y, DamageType.SLIME, self:combatTalentMindDamage(t, 30, 200), {type="flame"})
end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -145,6 +155,8 @@ newTalent{
combat = { dam=8, atk=15, apr=5, damtype=DamageType.ACID, dammod={str=0.7} },
wild_gift_detonate = t.id,
summoner = self, summoner_gain_exp=true, wild_gift_summon=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
ai_target = {actor=target},
......@@ -193,6 +205,10 @@ newTalent{
if not self:canBe("summon") and not silent then game.logPlayer(self, "You can not summon, you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
on_detonate = function(self, t, m)
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y}
self:project(tg, m.x, m.y, DamageType.BLEED, self:combatTalentMindDamage(t, 30, 350), {type="flame"})
end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -234,6 +250,8 @@ newTalent{
combat_armor = 13, combat_def = 8,
resolvers.talents{ [Talents.T_WARSHOUT]=3, [Talents.T_STUNNING_BLOW]=3, [Talents.T_SUNDER_ARMOUR]=2, [Talents.T_SUNDER_ARMS]=2, },
wild_gift_detonate = t.id,
faction = self.faction,
summoner = self, summoner_gain_exp=true, wild_gift_summon=true,
summon_time = self:getTalentLevel(t) + 2 + self:getTalentLevelRaw(self.T_RESILIENCE),
......@@ -272,6 +290,10 @@ newTalent{
if not self:canBe("summon") and not silent then game.logPlayer(self, "You can not summon, you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
on_detonate = function(self, t, m)
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y}
self:project(tg, m.x, m.y, DamageType.PHYSKNOCKBACK, {dam=self:combatTalentMindDamage(t, 30, 150), dist=4}, {type="flame"})
end,
requires_target = true,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
......@@ -315,6 +337,8 @@ newTalent{
poison_immune=1, cut_immune=1, fear_immune=1, blind_immune=1,
wild_gift_detonate = t.id,
faction = self.faction,
summoner = self, summoner_gain_exp=true, wild_gift_summon=true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5 + self:getTalentLevelRaw(self.T_RESILIENCE),
......
......@@ -102,6 +102,14 @@ newTalent{
if not self:canBe("summon") and not silent then game.logPlayer(self, "You can not summon, you are suppressed!") return end
return not checkMaxSummon(self, silent)
end,
on_detonate = function(self, t, m)
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y}
self:project(tg, m.x, m.y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target or self:reactionToward(target) < 0 then return end
target:setEffect(target.EFF_SHELL_SHIELD, 4, {power=self:combatTalentMindDamage(t, 10, 35)})
end, nil, {type="flame"})
end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -137,6 +145,8 @@ newTalent{
combat_armor = 10, combat_def = 0,
combat = { dam=1, atk=1, },
wild_gift_detonate = t.id,
resolvers.talents{
[self.T_TAUNT]=self:getTalentLevelRaw(t),
[self.T_SHELL_SHIELD]=self:getTalentLevelRaw(t),
......@@ -180,6 +190,16 @@ newTalent{
return not checkMaxSummon(self, silent)
end,
requires_target = true,
on_detonate = function(self, t, m)
local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y}
self:project(tg, m.x, m.y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target or self:reactionToward(target) >= 0 then return end
if target:canBe("pin") then
target:setEffect(target.EFF_PINNED, 3, {apply_power=self:combatMindpower()})
end
end, nil, {type="flame"})
end,
action = function(self, t)
local tg = {type="bolt", nowarning=true, range=self:getTalentRange(t), nolock=true, talent=t}
local tx, ty, target = self:getTarget(tg)
......@@ -215,6 +235,8 @@ newTalent{
combat_armor = 0, combat_def = 0,
combat = { dam=resolvers.rngavg(20,25), atk=16, apr=9, damtype=DamageType.NATURE, dammod={dex=1.2} },
wild_gift_detonate = t.id,
resolvers.talents{
[self.T_SPIDER_WEB]=self:getTalentLevelRaw(t),
[self.T_SPIT_POISON]=self:getTalentLevelRaw(t),
......
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