Skip to content
Snippets Groups Projects
Commit 60105b04 authored by DarkGod's avatar DarkGod
Browse files

only 3 to go!

parent 14e730fc
No related branches found
No related tags found
No related merge requests found
Showing
with 561 additions and 2 deletions
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009 - 2019 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
base_size = 64
local life = 10
local nb = 0
return { generator = function()
return {
life = life,
size = 64, sizev = 0, sizea = 0,
x = 0, xv = 0, xa = 0,
y = 0, yv = 0, ya = 0,
dir = 0, dirv = 0, dira = 0,
vel = 0, velv = 0, vela = 0,
r = 1, rv = 0, ra = 0,
g = 1, gv = 0, ga = 0,
b = 1, bv = 0, ba = 0,
a = 1, av = 0, aa = -1/life/life,
}
end, },
function(self)
nb = nb + 1
if nb <= 1 then
self.ps:emit(1)
end
end,
1,
"particles_images/spike_of_decrepitude"
game/modules/tome/data/gfx/particles_images/spike_of_decrepitude.png

5.6 KiB

game/modules/tome/data/gfx/shockbolt/shader_images/boneyard_ground_gfx_3.png

191 KiB

......@@ -26,6 +26,7 @@ newTalent{
vim = 20,
range = 10,
tactical = { DISABLE = 2 },
is_curse = true,
direct_hit = true,
requires_target = true,
action = function(self, t)
......@@ -56,6 +57,7 @@ newTalent{
vim = 20,
range = 10,
tactical = { DISABLE = 2 },
is_curse = true,
direct_hit = true,
requires_target = true,
imppower = function(self,t) return self:combatLimit(self:combatTalentSpellDamage(t, 10, 30),100, 0, 0, 19.36, 19.36) end, -- Limit to <100%
......@@ -87,6 +89,7 @@ newTalent{
vim = 20,
range = 10,
tactical = { ATTACK = {DARKNESS = 2}, DISABLE = 1 },
is_curse = true,
direct_hit = true,
requires_target = true,
action = function(self, t)
......@@ -117,6 +120,7 @@ newTalent{
vim = 20,
range = 10,
tactical = { DISABLE = 2 },
is_curse = true,
requires_target = true,
direct_hit = true,
action = function(self, t)
......
......@@ -27,6 +27,7 @@ newTalent{
range = 10,
radius = 2,
tactical = { DISABLE = {stun = 2} },
is_hex = true,
direct_hit = true,
requires_target = true,
target = function(self, t)
......@@ -65,6 +66,7 @@ newTalent{
range = 10,
radius = 2,
tactical = { DISABLE = 2, ATTACK = {FIRE = 1} },
is_hex = true,
direct_hit = true,
requires_target = true,
target = function(self, t)
......@@ -103,6 +105,7 @@ newTalent{
range = 10,
radius = 2,
tactical = { ATTACK = 2 },
is_hex = true,
direct_hit = true,
requires_target = true,
target = function(self, t)
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009 - 2020 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newTalent{
name = "Dire Plague",
type = {"spell/age-of-dusk",1},
require = spells_req_high1,
points = 5,
soul = 1,
mana = 25,
range = 0,
cooldown = 20,
tactical = { ATTACKAREA={DARKNESS=2}, SOUL=1 },
radius = function(self, t) return math.floor(self:combatTalentScale(t, 4, 8)) end,
requires_target = true,
target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, friendlyfire=false} end,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 15, 70) end,
getChance = function(self, t) return self:combatTalentScale(t, 2, 7) end,
action = function(self, t)
local tg = self:getTalentTarget(t)
local mult = 100
if self:knowTalent(self.T_THE_END_OF_ALL_HOPE) then
mult = 100 + self:callTalent(self.T_THE_END_OF_ALL_HOPE, "getChance")
end
self:projectApply(tg, self.x, self.y, Map.ACTOR, function(target)
target:setEffect(target.EFF_DIRE_PLAGUE, 5, {src=self, apply_power=self:combatSpellpower(), dam=t:_getDamage(self), chance=t:_getChance(self) * mult / 100})
end)
game:playSoundNear(self, "talents/spell_generic")
return true
end,
info = function(self, t)
return ([[You unleash the glorious vision of the past when the continent was filled with death and plagues.
All foes in range %d catch a dire plague for 5 turns, dealing %0.2f darkness damage each turn.
The Dire Plague is considered a disease but is not prevented by diseases immunity.
Every turn there is a %d%% chance of a piece of the soul to be ripped away, increasing your souls by 1.
]]):tformat(self:getTalentRadius(t), damDesc(self, DamageType.DARKNESS, t:_getDamage(self)), t:_getChance(self))
end,
}
newTalent{
name = "Crepuscule",
type = {"spell/age-of-dusk", 2},
require = spells_req_high2,
points = 5,
mana = 30,
soul = 2,
cooldown = 20,
tactical = { ATTACK = { COLD = 2, DARKNESS = 2 }, DISABLE = { blind = 2 } },
range = 0,
radius = 7,
requires_target = true,
getDur = function(self, t) return math.floor(self:combatTalentScale(t, 3, 8)) end,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 20, 170) end,
trigger = function(self, t, target)
-- Find targets
if not target then
local targets = table.listify(self:projectCollect({type="ball", radius=self:getTalentRadius(t)}, self.x, self.y, Map.ACTOR, "hostile"))
if #targets == 0 then return end
table.sort(targets, function(a, b) return a[2].dist < b[2].dist end)
target = targets[#targets][1]
end
local dam = self:spellCrit(t:_getDamage(self))
self:projectApply({type="beam", range=self:getTalentRadius(t), friendlyfire=false}, target.x, target.y, Map.ACTOR, function(target)
if DamageType:get(DamageType.DARKNESS).projector(self, target.x, target.y, DamageType.DARKNESS, dam) > 0 then
if rng.percent(25) then
if target:canBe("blind") then target:setEffect(target.EFF_BLINDED, 4, {apply_power=self:combatSpellpower()})
else game.logSeen(target, "%s resists the crepuscule!", target:getName():capitalize()) end
end
end
end)
game.level.map:particleEmitter(self.x, self.y, self:getTalentRadius(t), "shadow_beam", {tx=target.x-self.x, ty=target.y-self.y})
end,
action = function(self, t)
self:setEffect(self.EFF_CREPUSCULE, t:_getDur(self), {})
return true
end,
info = function(self, t)
return ([[You call upon an eerie night to aid you for %d turns.
Each turn you automatically fire a beam of darkness towards a random foe (prioritizing the ones further away) that deals %0.2f darkness damage and has 25%% chances to blind any foes caught inside for 4 turns.
The damage will increase with your Spellpower.]]):
tformat(t:_getDur(self), damDesc(self, DamageType.DARKNESS, t:_getDamage(self)))
end,
}
newTalent{
name = "The End of All Hope",
type = {"spell/age-of-dusk", 3},
require = spells_req_high3,
points = 5,
mode = "passive",
radius = function(self, t) return math.floor(self:combatTalentScale(t, 1, 9)) end,
getDur = function(self, t) return math.floor(self:combatTalentScale(t, 1, 5)) end,
getChance = function(self, t) return math.floor(self:combatTalentScale(t, 30, 80)) end,
info = function(self, t)
return ([[Whenever one of your Dire Plague rips a soul it feels the inescapable coming of the end.
When this happens the darkness damage of the plague is a critical hit and all Dire Plagues in radius %d around it (including itself) have their durations increased by %d turns.
The duration increase may happen only once per turn.
If Crepuscule is currently active it fires an additional free beam at the target.
In addition the chance to rip a soul by Dire Plague increases by %d%%.
]]):tformat(self:getTalentRadius(t), t:_getDur(self), t:_getChance(self))
end,
}
newTalent{
name = "Golden Age of Necromancy",
type = {"spell/age-of-dusk",4},
require = spells_req_high4,
points = 5,
mode = "sustained",
sustain_mana = 50,
cooldown = 30,
tactical = { BUFF = 2 },
getImmune = function(self, t) return math.floor(self:combatTalentLimit(t, 100, 20, 50)) end,
getSaves = function(self, t) return math.floor(self:combatTalentScale(t, 10, 55)) end,
callbackOnActBase = checkLifeThreshold(1, function(self, t)
if self:getTalentLevel(t) < 5 then return end
self:setEffect(self.EFF_GOLDEN_AGE_OF_NECROMANCY, 1, {})
return true
end),
activate = function(self, t)
game:playSoundNear(self, "talents/spell_generic")
local ret = { }
self:talentTemporaryValue(ret, "combat_physresist", t:_getSaves(self))
self:talentTemporaryValue(ret, "combat_spellresist", t:_getSaves(self))
self:talentTemporaryValue(ret, "combat_mentalresist", t:_getSaves(self))
self:talentTemporaryValue(ret, "confusion_immune", t:_getImmune(self)/100)
self:talentTemporaryValue(ret, "teleport_immune", t:_getImmune(self)/100)
-- local particle
-- if core.shader.active(4) then
-- local p1, p2 = self:talentParticles(ret,
-- {type="shader_ring_rotating", args={rotation=0, radius=1.1, img="spinningwinds_black"}, shader={type="spinningwinds", ellipsoidalFactor={1,1}, time_factor=6000, noup=2.0, verticalIntensityAdjust=-3.0}},
-- {type="shader_ring_rotating", args={rotation=0, radius=1.1, img="spinningwinds_black"}, shader={type="spinningwinds", ellipsoidalFactor={1,1}, time_factor=6000, noup=1.0, verticalIntensityAdjust=-3.0}}
-- )
-- p1.toback = true
-- else
-- self:talentParticles(ret, {type="ultrashield", args={rm=0, rM=0, gm=0, gM=0, bm=10, bM=100, am=70, aM=180, radius=0.4, density=60, life=14, instop=20}})
-- end
return ret
end,
deactivate = function(self, t, p)
return true
end,
info = function(self, t)
return ([[You recall the age long gone where necromancers had free reign over the world.
Increases all saves by %d, confusion and teleport resistances by %d%%.
At level 5 any time you cross the 1 life thresshold you become invulnerable for 2 turns.]])
:tformat(t:_getSaves(self), t:_getImmune(self))
end,
}
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009 - 2019 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newTalent{
name = "Dread",
type = {"spell/dreadmaster",1},
require = spells_req1,
points = 5,
mana = 20,
soul = 4,
cooldown = 40,
tactical = { ATTACK = {DARKNESS=1}, DISABLE = 5 },
requires_target = true,
autolearn_talent = "T_SOUL_POOL",
range = 0,
minions_list = {
dread = {
type = "undead", subtype = "ghost",
name = "dread", blood_color = colors.GREY,
display = "G", color=colors.ORANGE, image="npc/dread.png",
combat = {dam=resolvers.mbonus(45, 45), atk=resolvers.mbonus(25, 45), apr=100, dammod={str=0.5, mag=0.5}, sound={"creatures/ghost/attack%d", 1, 2}},
sound_moam = {"creatures/ghost/on_hit%d", 1, 2},
sound_die = {"creatures/ghost/death%d", 1, 1},
sound_random = {"creatures/ghost/random%d", 1, 1},
level_range = {1, nil}, exp_worth = 0,
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, QUIVER=1 },
autolevel = "warriormage",
ai = "dumb_talented_simple", ai_state = { ai_target="target_closest", ai_move="move_complex", talent_in=2, },
dont_pass_target = true,
stats = { str=14, dex=18, mag=20, con=12 },
rank = 2,
size_category = 3,
infravision = 10,
mana_regen = 5,
vim_regen = 5,
stealth = resolvers.mbonus(40, 10),
can_pass = {pass_wall=70},
resists = {all = 35, [DamageType.LIGHT] = -70, [DamageType.DARKNESS] = 65},
no_breath = 1,
stone_immune = 1,
confusion_immune = 1,
fear_immune = 1,
teleport_immune = 0.5,
disease_immune = 1,
poison_immune = 1,
stun_immune = 1,
blind_immune = 1,
cut_immune = 1,
see_invisible = 80,
undead = 1,
avoid_pressure_traps = 1,
resolvers.sustains_at_birth(),
dread_minion = "dread",
no_boneyard_resurrect = true,
resolvers.talents{
T_BURNING_HEX={base=1, every=5},
T_EMPATHIC_HEX={base=0, last=10, every=5},
T_PACIFICATION_HEX={base=0, last=15, every=5},
T_BLUR_SIGHT={base=3, every=5},
T_PHASE_DOOR={base=1, every=6},
},
max_life = resolvers.rngavg(90,100),
},
dreadmaster = {
type = "undead", subtype = "ghost",
name = "dreadmaster", blood_color = colors.GREY,
display = "G", color=colors.YELLOW, image="npc/dreadmaster.png",
combat = {dam=resolvers.mbonus(45, 45), atk=resolvers.mbonus(25, 45), apr=100, dammod={str=0.5, mag=0.5}, sound={"creatures/ghost/attack%d", 1, 2}},
sound_moam = {"creatures/ghost/on_hit%d", 1, 2},
sound_die = {"creatures/ghost/death%d", 1, 1},
sound_random = {"creatures/ghost/random%d", 1, 1},
level_range = {1, nil}, exp_worth = 0,
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, QUIVER=1 },
autolevel = "warriormage",
ai = "dumb_talented_simple", ai_state = { ai_target="target_closest", ai_move="move_complex", talent_in=2, },
dont_pass_target = true,
stats = { str=14, dex=18, mag=20, con=12 },
rank = 2,
size_category = 3,
infravision = 10,
mana_regen = 5,
vim_regen = 5,
stealth = resolvers.mbonus(30, 20),
can_pass = {pass_wall=70},
resists = {all = 35, [DamageType.LIGHT] = -70, [DamageType.DARKNESS] = 65},
no_breath = 1,
stone_immune = 1,
confusion_immune = 1,
fear_immune = 1,
teleport_immune = 0.5,
disease_immune = 1,
poison_immune = 1,
stun_immune = 1,
blind_immune = 1,
cut_immune = 1,
see_invisible = 80,
undead = 1,
avoid_pressure_traps = 1,
resolvers.sustains_at_birth(),
dread_minion = "dread",
no_boneyard_resurrect = true,
resolvers.talents{
T_BURNING_HEX={base=1, every=5},
T_EMPATHIC_HEX={base=0, last=10, every=5},
T_PACIFICATION_HEX={base=0, last=15, every=5},
T_BLUR_SIGHT={base=3, every=5},
T_PHASE_DOOR={base=1, every=6},
-- Dreadmaster talents are learnt after summoning
},
max_life = resolvers.rngavg(140,170),
},
},
getLevel = function(self, t) return math.floor(self:combatScale(self:getTalentLevel(t), -6, 0.9, 2, 5)) end, -- -6 @ 1, +2 @ 5, +5 @ 8
on_pre_use = function(self, t) return not necroArmyStats(self).dread end,
action = function(self, t)
local lev = t.getLevel(self, t)
local x, y = util.findFreeGrid(self.x, self.y, 5, true, {[Map.ACTOR]=true})
if not x then return end
local dread = necroSetupSummon(self, self:knowTalent(self.T_DREADMASTER) and t.minions_list.dreadmaster or t.minions_list.dread, x, y, lev, nil, true)
if self:knowTalent(self.T_DREADMASTER) then
local lvl = math.floor(self:getTalentLevel(self.T_DREADMASTER))
dread:learnTalent(dread.T_SILENCE, true, lvl)
dread:learnTalent(dread.T_MIND_DISRUPTION, true, lvl)
dread:learnTalent(dread.T_BURNING_HEX, true, lvl)
end
game:playSoundNear(self, "creatures/ghost/random1")
return true
end,
info = function(self, t)
return ([[Summon a Dread of level %d that will annoyingly blink around, hexing your foes.
]]):tformat(math.max(1, self.level + t:_getLevel(self)))
end,
}
newTalent{
name = "Souleater",
type = {"spell/dreadmaster",2},
require = spells_req2,
points = 5,
mode = "passive",
getHeal = function(self, t) return 10 + self:combatTalentSpellDamage(t, 30, 200) end,
getCD = function(self, t) return math.floor(self:combatTalentScale(t, 1, 4)) end,
getFoes = function(self, t) return math.floor(self:combatTalentScale(t, 2, 8)) end,
callbackOnSummonDeath = function(self, t, summon, src, death_note)
if summon.summoner ~= self or not summon.necrotic_minion then return end
local dread = necroArmyStats(self).dread
if not dread then return end
dread:heal(t:_getHeal(self), dread)
for tid, _ in pairs(dread.talents) do dread:alterTalentCoolingdown(tid, -t:_getCD(self)) end
dread.__souleater_count = (dread.__souleater_count or 0) + 1
if dread.__souleater_count < 10 then return end
dread.__souleater_count = 0
game.logSeen(summon, "#GREY#%s has fed on enough minions and starts to randomly hex foes!", summon:getName():capitalize())
-- Find targets
local targets = table.keys(dread:projectCollect({type="ball", radius=10}, dread.x, dread.y, engine.Map.ACTOR, "hostile"))
if #targets == 0 then return end
-- Find hexes
local hexes = {}
for tid, _ in pairs(dread.talents) do
local tt = dread:getTalentFromId(tid)
if tt.is_hex or tt.is_curse then hexes[#hexes+1] = tid end
end
if #hexes == 0 then return end
local nb = t:_getFoes(self)
while nb > 0 and #targets > 0 do
nb = nb - 1
local target = rng.tableRemove(targets)
dread:forceUseTalent(rng.table(hexes), {ignore_energy=true, ignore_ressources=true, force_target=target, ignore_cd=true})
end
end,
info = function(self, t)
return ([[Any time one of your minions dies or expires, and even if it is resurrected by a boneyard, the dread feeds on it.
Each time it feeds it gets healed by %d and reduces remaining cooldown of its spells by %d.
Every 10 minion deaths it casts a random hex on up to %d foes at once, instantly and without triggering a cooldown.]]):
tformat(t:_getHeal(self), t:_getCD(self), t:_getFoes(self))
end,
}
newTalent{
name = "Neverending Peril",
type = {"spell/dreadmaster",3},
require = spells_req3,
points = 5,
mana = 10,
soul = 1,
cooldown = 20,
tactical = { BUFF=1 },
getTurns = function(self, t) return math.floor(self:combatTalentScale(t, 3, 9)) end,
on_pre_use = function(self, t) return necroArmyStats(self).dread end,
action = function(self, t)
local dread = necroArmyStats(self).dread
if not dread then return end
dread:setEffect(dread.EFF_NEVERENDING_PERIL, t:_getTurns(self), {})
return true
end,
info = function(self, t)
return ([[In an effort to make your dread more annoying you focus a shell of darkness around it, rendering it fully invincible for %d turns.]]):
tformat(t:_getTurns(self))
end,
}
newTalent{
name = "Dreadmaster",
type = {"spell/dreadmaster",4},
require = spells_req4,
points = 5,
mode = "passive",
info = function(self, t)
return ([[You now summon a Dreadmaster instead of a Dread.
Dreadmasters learn to cast silence, dispel magic and mind disruption, making them the ultimate annoyance tool.
It learns them at talent level %d.]]):
tformat(math.floor(self:getTalentLevel(t)))
end,
}
......@@ -35,7 +35,7 @@ newTalent{
getPower = function(self, t) return math.floor(self:combatTalentScale(t, 10, 55)) end,
getResurrect = function(self, t) return math.floor(self:combatTalentScale(t, 1, 9)) end,
callbackOnSummonDeath = function(self, t, summon, src, death_note)
if summon.summoner ~= self or not summon.necrotic_minion or summon.boneyard_resurrected then return end
if summon.summoner ~= self or not summon.necrotic_minion or summon.boneyard_resurrected or summon.no_boneyard_resurrect then return end
local ok = false
for i, e in ipairs(game.level.map.effects) do
if e.damtype == DamageType.BONEYARD and e.src == self and e.grids[summon.x] and e.grids[summon.x][summon.y] then ok = true break end
......@@ -53,7 +53,7 @@ newTalent{
DamageType.BONEYARD, {resist=t:_getResist(self), cooldown=t:_getCooldown(self), power=t:_getPower(self), resurrect=t:_getResurrect(self)},
self:getTalentRadius(t),
5, nil,
{type="vapour"},
MapEffect.new{zdepth=3, color_br=255, color_bg=255, color_bb=255, effect_shader="shader_images/boneyard_ground_gfx_3.png"},
nil,
true, true
)
......
......@@ -145,6 +145,7 @@ newTalent{
points = 5,
radius = 10,
sustain_mana = 10,
sustain_soul = 2,
cooldown = 10,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 5, 70) end,
getReduce = function(self, t) return self:combatTalentLimit(t, 50, 8, 25) end,
......@@ -158,6 +159,7 @@ newTalent{
local target = rng.tableRemove(targets)
runes = runes - 1
DamageType:get(DamageType.FROSTDUSK).projector(self, target.x, target.y, DamageType.FROSTDUSK, dam)
game.level.map:particleEmitter(target.x, target.y, 1, "spike_decrepitude", {})
if self.life < 1 then
target:setEffect(target.EFF_SPIKE_OF_DECREPITUDE, 2, {apply_power=self:combatSpellpower(), power=reduce})
end
......
......@@ -130,6 +130,7 @@ function necroArmyStats(self)
if act.ghoul_minion then stats.nb_ghoul = stats.nb_ghoul + 1 end
if act.lord_of_skulls then stats.lord_of_skulls = act end
if act.is_bone_giant then stats.bone_giant = act end
if act.dread_minion then stats.dread = act end
stats.list[#stats.list+1] = act
end end
else
......@@ -139,6 +140,7 @@ function necroArmyStats(self)
if act.ghoul_minion then stats.nb_ghoul = stats.nb_ghoul + 1 end
if act.lord_of_skulls then stats.lord_of_skulls = act end
if act.is_bone_giant then stats.bone_giant = act end
if act.dread_minion then stats.dread = act end
stats.list[#stats.list+1] = act
end end
end
......@@ -253,6 +255,7 @@ function necroSetupSummon(self, def, x, y, level, turns, no_control)
if e.src == src and e.damtype == engine.DamageType.PUTRESCENT_LIQUEFACTION and e.grids[self.x] and e.grids[self.x][self.y] and src:isTalentActive(src.T_PUTRESCENT_LIQUEFACTION) then
local p = src:isTalentActive(src.T_PUTRESCENT_LIQUEFACTION)
p.dur = p.dur + src:callTalent(src.T_PUTRESCENT_LIQUEFACTION, "getIncrease")
game.level.map:particleEmitter(self.x, self.y, 1, "pustulent_fulmination", {radius=1})
game.logSeen(self, "#GREY#%s dissolves into the cloud of gore.", self:getName():capitalize())
end
end
......@@ -262,6 +265,7 @@ function necroSetupSummon(self, def, x, y, level, turns, no_control)
-- Summons never flee
m.ai_tactic = m.ai_tactic or {}
m.ai_tactic.escape = 0
return m
end
function checkLifeThreshold(val, fct)
......@@ -310,6 +314,8 @@ load("/data/talents/spells/master-of-bones.lua")
load("/data/talents/spells/master-of-flesh.lua")
load("/data/talents/spells/master-necromancer.lua")
load("/data/talents/spells/nightfall.lua")
load("/data/talents/spells/dreadmaster.lua")
load("/data/talents/spells/age-of-dusk.lua")
load("/data/talents/spells/animus.lua")
load("/data/talents/spells/death.lua")
load("/data/talents/spells/eradication.lua")
......
......@@ -4893,3 +4893,89 @@ newEffect{
self:effectTemporaryValue(eff, "combat_dam", eff.power)
end,
}
newEffect{
name = "NEVERENDING_PERIL", image = "talents/neverending_peril.png",
desc = _t"Neverending Peril",
long_desc = function(self, eff) return _t"Invulnerable." end,
type = "magical",
subtype = { necrotic=true, invulnerable=true },
status = "beneficial",
parameters = {},
on_gain = function(self, err) return nil, true end,
on_lose = function(self, err) return nil, true end,
activate = function(self, eff)
self:effectTemporaryValue(eff, "invulnerable", 1)
end,
}
newEffect{
name = "GOLDEN_AGE_OF_NECROMANCY", image = "talents/golden_age_of_necromancy.png",
desc = _t"Golden Age of Necromancy",
long_desc = function(self, eff) return _t"Invulnerable." end,
type = "magical",
subtype = { necrotic=true, invulnerable=true },
status = "beneficial",
parameters = {},
on_gain = function(self, err) return nil, true end,
on_lose = function(self, err) return nil, true end,
activate = function(self, eff)
self:effectTemporaryValue(eff, "invulnerable", 1)
end,
}
newEffect{
name = "CREPUSCULE", image = "talents/crepuscule.png",
desc = _t"Crepuscule",
long_desc = function(self, eff) return _t"Bring the night!" end,
type = "magical",
subtype = { necrotic=true, darkness=true, blind=true },
status = "beneficial",
parameters = {},
on_gain = function(self, err) return _t"#Target# calls the night!", true end,
on_lose = function(self, err) return _t"The eerie night around #target# fades away.", true end,
on_timeout = function(self, eff)
self:callTalent(self.T_CREPUSCULE, "trigger")
end,
}
newEffect{
name = "DIRE_PLAGUE", image = "talents/dire_plague.png",
desc = _t"Dire Plague",
long_desc = function(self, eff) return ("The target is infected by a plague, doing %0.2f darkness damage per turn with a %d%% chance to rip apart the soul."):tformat(eff.dam, eff.chance) end,
type = "magical",
subtype = {disease=true, darkness=true},
status = "detrimental",
parameters = {dam=10, chance=2},
on_gain = function(self, err) return _t"#Target# is afflicted by a dire plague!" end,
on_lose = function(self, err) return _t"#Target# is free from the dire plague." end,
on_timeout = function(self, eff)
if self:attr("purify_disease") then self:heal(eff.dam, eff.src)
else if eff.dam > 0 then
local dam = eff.dam
if rng.percent(eff.chance) then
eff.src:incSoul(1)
game.logSeen(self, "Dire Plague rips out a piece of %s soul!", self:getName())
if eff.src:knowTalent(eff.src.T_THE_END_OF_ALL_HOPE) then
local t_eah = eff.src:getTalentFromId(eff.src.T_THE_END_OF_ALL_HOPE)
-- Force a crit
dam = eff.src:spellCrit(dam, 100)
-- Increase durations
if not eff.src.turn_procs.end_of_all_hope_trigger then
eff.src.turn_procs.end_of_all_hope_trigger = true
self:projectApply({type="ball", radius=eff.src:getTalentRadius(t_eah)}, self.x, self.y, Map.ACTOR, function(target)
local tareff = target:hasEffect(target.EFF_DIRE_PLAGUE)
if tareff then tareff.dur = tareff.dur + t_eah:_getDur(eff.src) end
end)
end
-- Trigger a crepuscule beam
if eff.src:hasEffect(eff.src.EFF_CREPUSCULE) then eff.src:callTalent(eff.src.T_CREPUSCULE, "trigger", self) end
end
end
DamageType:get(DamageType.DARKNESS).projector(eff.src, self.x, self.y, DamageType.DARKNESS, dam, {from_disease=true})
end end
end,
}
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