Skip to content
Snippets Groups Projects
Commit 4c99e91f authored by dg's avatar dg
Browse files

shadowflame talents

git-svn-id: http://svn.net-core.org/repos/t-engine4@1918 51575b47-30f0-44d4-a5cc-537603b46e54
parent f6add064
No related branches found
No related tags found
No related merge requests found
Showing
with 563 additions and 19 deletions
......@@ -357,6 +357,15 @@ newDamageType{
end,
}
-- Darkness + Fire
newDamageType{
name = "shadowflame", type = "SHADOWFLAME",
projector = function(src, x, y, type, dam)
DamageType:get(DamageType.FIRE).projector(src, x, y, DamageType.FIRE, dam / 2)
DamageType:get(DamageType.DARKNESS).projector(src, x, y, DamageType.DARKNESS, dam / 2)
end,
}
-- Darkness + Stun
newDamageType{
name = "darkstun", type = "DARKSTUN",
......@@ -819,6 +828,21 @@ newDamageType{
end,
}
-- Demonfire: heal demon; damage others
newDamageType{
name = "demonfire", type = "DEMONFIRE",
projector = function(src, x, y, type, dam)
local target = game.level.map(x, y, Map.ACTOR)
if target and target.demon then
target:heal(dam)
return -dam
elseif target then
DamageType:get(DamageType.FIRE).projector(src, x, y, DamageType.FIRE, dam)
return dam
end
end,
}
-- Retch: heal undead; damage living
newDamageType{
name = "retch", type = "RETCH",
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010 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 = 32
return {
base = 1000,
angle = { 0, 360 }, anglev = { 2000, 5000 }, anglea = { 20, 60 },
life = { 20, 30 },
size = { 3, 7 }, sizev = {0, 0}, sizea = {0, 0},
r = {200, 255}, rv = {0, 0}, ra = {0, 0},
g = {120, 170}, gv = {0, 0}, ga = {0, 0},
b = {0, 100}, bv = {0, 0}, ba = {0, 0},
a = {255, 255}, av = {0, 0}, aa = {0, 0},
}, function(self)
self.nb = (self.nb or 0) + 1
if self.nb < 6 then
self.ps:emit(100)
end
end
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010 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 = 32
return { generator = function()
local ad = rng.range(0, 360)
local a = math.rad(ad)
local dir = math.rad(ad)
local r = rng.range(18, 22)
local dirchance = rng.chance(2)
if rng.chance(2) then
return {
life = 20,
size = 4, sizev = -0.05, sizea = 0,
x = r * math.cos(a), xv = 0, xa = 0,
y = r * math.sin(a), yv = 0, ya = 0,
dir = dir, dirv = 0.1, dira = 0,
vel = dirchance and 0.2 or -0.2, velv = 0, vela = dirchance and -0.02 or 0.02,
r = rng.range(180, 250)/255, rv = rng.range(0, 10)/100, ra = 0,
g = rng.range(80, 110)/255, gv = 0.005, ga = 0.0005,
b = 0, bv = 0, ba = 0,
a = rng.range(70, 255)/255, av = 0, aa = 0,
}
else
return {
life = 20,
size = 4, sizev = -0.05, sizea = 0,
x = r * math.cos(a), xv = 0, xa = 0,
y = r * math.sin(a), yv = 0, ya = 0,
dir = dir, dirv = 0.1, dira = 0,
vel = dirchance and 0.2 or -0.2, velv = 0, vela = dirchance and -0.02 or 0.02,
r = rng.range(0, 40)/255, rv = 0, ra = 0,
g = rng.range(0, 40)/255, gv = 0.005, ga = 0.0005,
b = rng.range(0, 40)/255, bv = 0, ba = 0,
a = rng.range(255, 255)/255, av = static and -0.034 or 0, aa = 0.005,
}
end
end, },
function(self)
self.ps:emit(4)
end,
80
......@@ -131,31 +131,39 @@ newTalent{
}
newTalent{
name = "Blight Storm",
name = "Poison Storm",
type = {"corruption/blight", 4},
mode = "sustained",
require = corrs_req4,
points = 5,
sustain_vim = 60,
vim = 36,
cooldown = 30,
on_crit = function(self, t)
self:setEffect(self.EFF_BLOOD_FURY, 5, {power=self:combatTalentSpellDamage(t, 10, 30)})
end,
activate = function(self, t)
tactical = {
ATTACKAREA = 20,
},
action = function(self, t)
local duration = 5 + self:getTalentLevel(t)
local radius = 4
local dam = self:combatTalentSpellDamage(t, 12, 130)
-- Add a lasting map effect
game.level.map:addEffect(self,
self.x, self.y, duration,
DamageType.POISON, dam,
radius,
5, nil,
engine.Entity.new{alpha=100, display='', color_br=20, color_bg=220, color_bb=70},
function(e)
e.x = e.src.x
e.y = e.src.y
return true
end,
false
)
game:playSoundNear(self, "talents/slime")
local ret = {
per = self:addTemporaryValue("combat_spellcrit", self:combatTalentSpellDamage(t, 10, 24)),
}
return ret
end,
deactivate = function(self, t, p)
self:removeTemporaryValue("combat_spellcrit", p.per)
return true
end,
info = function(self, t)
return ([[Concentrate on the corruption you bring, increasing your spell critical chance by %d%%.
Each time your spells are critical you enter a blood rage for 5 turns, increasing your blight damage by %d%%.
The damage will increase with your Magic stat.]]):
format(self:combatTalentSpellDamage(t, 10, 24), self:combatTalentSpellDamage(t, 10, 30))
return ([[A furious poison storm rages around the caster, poisoning all creatures inside for doing %0.2f nature damage in 6 turns in a radius of 4 for %d turns.
Poisoning is cumulative, the longer they stay in they higher the poison they take.
The damage and duration will increase with the Magic stat]]):format(damDesc(self, DamageType.NATURE, self:combatTalentSpellDamage(t, 12, 130)), 5 + self:getTalentLevel(t))
end,
}
......@@ -81,3 +81,4 @@ load("/data/talents/corruptions/curses.lua")
load("/data/talents/corruptions/hexes.lua")
load("/data/talents/corruptions/blood.lua")
load("/data/talents/corruptions/blight.lua")
load("/data/talents/corruptions/shadowflame.lua")
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010 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 = "Wraithform",
type = {"corruption/shadowflame", 1},
require = corrs_req1,
points = 5,
sustain_vim = 20,
cooldown = 30,
action = function(self, t)
self:setEffect(self.EFF_WRAITHFORM, 4 + self:getTalentLevel(t), {def=self:combatTalentSpellDamage(t, 5, 19), armor=self:combatTalentSpellDamage(t, 5, 15)})
return true
end,
info = function(self, t)
return ([[Turn into a wraith, allowing you to walk through walls (but does not prevent suffocation) for %d turns.
Also increases your defense and armor by %d and %d.
The bonuses will increase with your Magic stat.]]):
format(4 + self:getTalentLevel(t), self:combatTalentSpellDamage(t, 5, 19), self:combatTalentSpellDamage(t, 5, 15))
end,
}
newTalent{
name = "Darkfire",
type = {"corruption/shadowflame", 2},
require = corrs_req2,
points = 5,
cooldown = 10,
vim = 20,
requires_target = true,
range = 15,
proj_speed = 4,
direct_hit = true,
requires_target = true,
action = function(self, t)
local tg = {type="ball", range=self:getTalentRange(t), radius=1 + self:getTalentLevelRaw(t), friendlyfire=self:spellFriendlyFire(), talent=t, display={particle="bolt_fire", trail="firetrail"}}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:projectile(tg, x, y, DamageType.SHADOWFLAME, self:spellCrit(self:combatTalentSpellDamage(t, 28, 220)), function(self, tg, x, y, grids)
game.level.map:particleEmitter(x, y, tg.radius, "fireflash", {radius=tg.radius, grids=grids, tx=x, ty=y})
game.level.map:particleEmitter(x, y, tg.radius, "shadow_flash", {radius=tg.radius, grids=grids, tx=x, ty=y})
end)
game:playSoundNear(self, "talents/fireflash")
return true
end,
info = function(self, t)
return ([[Conjures up a bolt of shadowflame moving toward the target that explodes into a flash of darkness and fire doing %0.2f fire damage and %0.2f darkness damage in a radius of %d.
The damage will increase with the Magic stat]]):format(
damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 28, 220) / 2),
damDesc(self, DamageType.DARKNESS, self:combatTalentSpellDamage(t, 28, 220) / 2),
1 + self:getTalentLevelRaw(t)
)
end,
}
newTalent{
name = "Flame of Urh'Rok",
type = {"corruption/shadowflame", 3},
require = corrs_req3,
mode = "sustained",
points = 5,
sustain_vim = 90,
cooldown = 30,
activate = function(self, t)
game:playSoundNear(self, "talents/flame")
self.__old_type = {self.type, self.subtype}
self.type, self.subtype = "demon", "major"
local power = 1 - 1 / (1 + self:getTalentLevel(t) * 0.03)
return {
demon = self:addTemporaryValue("demon", 1),
speed = self:addTemporaryValue("energy", {mod=power}),
res = self:addTemporaryValue("resists", {[DamageType.FIRE]=self:combatTalentSpellDamage(t, 20, 30), [DamageType.DARKNESS]=self:combatTalentSpellDamage(t, 20, 35)}),
particle = self:addParticles(Particles.new("shadowfire", 1)),
}
end,
deactivate = function(self, t, p)
self.type, self.subtype = unpack(self.__old_type)
self.__old_type = nil
self:removeTemporaryValue("resists", p.res)
self:removeTemporaryValue("energy", p.speed)
self:removeTemporaryValue("demon", p.demon)
self:removeParticles(p.particle)
return true
end,
info = function(self, t)
return ([[Call upon the essence of the supreme demon overlord Urh'Rok to turn into a demon.
While in demon form you gain %d%% fire resistance, %d%% darkness resistance and your global speed is increased by %d%%.
The flames of the demon plane will heal you while in demon form.
The bonuses will increase with Magic stat.]]):
format(
self:combatTalentSpellDamage(t, 20, 30), self:combatTalentSpellDamage(t, 20, 30),
self:getTalentLevel(t) * 3
)
end,
}
newTalent{
name = "Demon Plane",
type = {"corruption/shadowflame", 4},
require = corrs_req4,
mode = "sustained",
points = 5,
sustain_vim = 90,
cooldown = 60,
no_sustain_autoreset = true,
no_npc_use = true,
activate = 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 then return nil end
game:playSoundNear(self, "talents/flame")
local dam = self:combatTalentSpellDamage(t, 12, 140)
game:onTickEnd(function()
local oldzone = game.zone
local oldlevel = game.level
local zone = engine.Zone.new("demon-plane-spell")
local level = zone:getLevel(game, 1, 0)
level.demonfire_dam = dam
if oldlevel:hasEntity(self) then oldlevel:removeEntity(self) end
level:addEntity(self)
if oldlevel:hasEntity(target) then oldlevel:removeEntity(target) end
level:addEntity(target)
level.source_zone = oldzone
level.source_level = oldlevel
game.zone = zone
game.level = level
local x1, y1 = util.findFreeGrid(4, 6, 20, true, {[Map.ACTOR]=true})
if x1 then
self:move(x1, y1, true)
game.level.map:particleEmitter(x1, y1, 1, "demon_teleport")
end
local x2, y2 = util.findFreeGrid(8, 6, 20, true, {[Map.ACTOR]=true})
if x2 then
target:move(x2, y2, true)
game.level.map:particleEmitter(x2, y2, 1, "demon_teleport")
end
target:setTarget(self)
target.demon_plane_trapper = self
target.demon_plane_on_die = target.on_die
target.on_die = function(...)
target.demon_plane_trapper:forceUseTalent(self.T_DEMON_PLANE, {ignore_energy=true})
if target.demon_plane_on_die then target.demon_plane_on_die(...) end
end
game.logPlayer(self, "#LIGHT_RED#You are taken to the demon plane!")
end)
local ret = {
target = target,
x = self.x, y = self.y,
}
return ret
end,
deactivate = function(self, t, p)
game:onTickEnd(function()
-- Collect objects
local objs = {}
for i = 0, game.level.map.w - 1 do for j = 0, game.level.map.h - 1 do
for z = game.level.map:getObjectTotal(i, j), 1, -1 do
objs[#objs+1] = game.level.map:getObject(i, j, z)
game.level.map:removeObject(i, j, z)
end
end end
local oldzone = game.zone
local oldlevel = game.level
local zone = game.level.source_zone
local level = game.level.source_level
oldlevel:removeEntity(self)
level:addEntity(self)
game.zone = zone
game.level = level
local x1, y1 = util.findFreeGrid(p.x, p.y, 20, true, {[Map.ACTOR]=true})
if x1 then
self:move(x1, y1, true)
game.level.map:particleEmitter(x1, y1, 1, "demon_teleport")
end
if not p.target.dead then
local x2, y2 = util.findFreeGrid(p.x, p.y, 20, true, {[Map.ACTOR]=true})
if x2 then
p.target:move(x2, y2, true)
game.level.map:particleEmitter(x2, y2, 1, "demon_teleport")
end
if oldlevel:hasEntity(p.target) then oldlevel:removeEntity(p.target) end
level:addEntity(p.target)
end
-- Add objects back
for i, o in ipairs(objs) do
game.level.map:addObject(game.player.x, game.player.y, o)
end
game.logPlayer(self, "#LIGHT_RED#You are brought back from the demon plane!")
end)
return true
end,
info = function(self, t)
return ([[Summon a part of the demon plane to intersect with the current level.
Your target and yourself are taken to the demon plane, trapped there until you end the spell or until your target dies.
While in the demon plane a constant aura of flames will burn both of you (unless you are a demon) for %0.2f fire damage.
When the spell ends only you and the target (if still alive) are taken back to your home plane, all summons are left in the demon plane.
Objects will be moved as well.
The damage will increase with the Magic stat]]):format(damDesc(self, DamageType.FIRE, self:combatTalentSpellDamage(t, 12, 140)))
end,
}
......@@ -2234,4 +2234,25 @@ newEffect{
on_timeout = function(self, eff)
self:addTemporaryValue("energy", {mod= eff.power*eff.dur})
end,
}
\ No newline at end of file
}
newEffect{
name = "WRAITHFORM",
desc = "Wraithform",
long_desc = function(self, eff) return ("Turn into a wraith, allowing to pass walls(but not natural obstacles), granting %d defense and %d armour."):format(eff.def, eff.armor) end,
type = "magical",
status = "beneficial",
parameters = { power=10 },
on_gain = function(self, err) return "#Target# turns into a wraith.", "+Wraithform" end,
on_lose = function(self, err) return "#Target# returns to normal.", "-Wraithform" end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("can_pass", {pass_wall=20})
eff.defid = self:addTemporaryValue("combat_def", eff.def)
eff.armid = self:addTemporaryValue("combat_armor", eff.armor)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("can_pass", eff.tmpid)
self:removeTemporaryValue("combat_def", eff.defid)
self:removeTemporaryValue("combat_armor", eff.armid)
end,
}
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010 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
load("/data/general/grids/basic.lua")
newEntity{
define_as = "LAVA_FLOOR",
name = "lava floor", image = "terrain/lava_floor.png",
display = '.', color=colors.RED, back_color=colors.DARK_GREY,
shader = "lava",
on_move = function(self, x, y, who)
local DT = engine.DamageType
local dam = DT:get(DT.DEMONFIRE).projector(self, x, y, DT.DEMONFIRE, game.level.demonfire_dam or 1)
if dam > 0 then game.logPlayer(who, "The laval burns you!")
elseif dam < 0 then game.logPlayer(who, "The lava heals you!") end
end,
}
newEntity{
define_as = "LAVA_WALL",
name = "lava wall", image = "terrain/granite_wall1.png",
display = '#', color=colors.RED, back_color=colors.DARK_GREY, tint=colors.LIGHT_RED,
always_remember = true,
does_block_move = true,
block_sight = true,
air_level = -20,
dig = "LAVA_FLOOR",
}
newEntity{
define_as = "LAVA",
name = "molten lava", image = "terrain/lava.png",
display = '%', color=colors.LIGHT_RED, back_color=colors.RED,
does_block_move = true,
shader = "lava",
}
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010 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
load("/data/general/npcs/all.lua")
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010 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
load("/data/general/objects/objects.lua")
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010 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
load("/data/general/traps/natural_forest.lua")
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010 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
return {
name = "Demon Plane",
level_range = {1, 100},
level_scheme = "player",
max_level = 1,
actor_adjust_level = function(zone, level, e) return level.source_zone.base_level + e:getRankLevelAdjust() + level.source_level.level-1 + rng.range(-1,2) end,
width = 12, height = 12,
-- all_remembered = true,
all_lited = true,
no_worldport = true,
ambiant_music = "Straight Into Ambush.ogg",
generator = {
map = {
class = "engine.generator.map.Forest",
zoom = 3,
sqrt_percent = 30,
noise = "fbm_perlin",
floor = "LAVA_FLOOR",
wall = "LAVA_WALL",
up = "LAVA_FLOOR",
down = "LAVA_FLOOR",
},
},
}
No preview for this file type
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