Skip to content
Snippets Groups Projects
Commit 06a830c7 authored by dg's avatar dg
Browse files

curses tree

git-svn-id: http://svn.net-core.org/repos/t-engine4@1128 51575b47-30f0-44d4-a5cc-537603b46e54
parent b00705f7
No related branches found
No related tags found
No related merge requests found
......@@ -48,18 +48,18 @@ newBirthDescriptor{
stats = { str=5, mag=3, dex=1, },
talents_types = {
["technique/combat-training"]={true, 0.3},
["cunning/survival"]={false, 0.1},
["corruption/sanguisuge"]={true, 0.3},
["corruption/reaving-combat"]={true, 0.3},
["corruption/scourge"]={true, 0.3},
["corruption/plague"]={true, 0.3},
["corruption/hexes"]={true, 0.3},
["corruption/curses"]={true, 0.3},
["corruption/hexes"]={false, 0.3},
["corruption/curses"]={false, 0.3},
["corruption/bone"]={true, 0.3},
},
talents = {
[ActorTalents.T_CORRUPTED_STRENGTH] = 1,
[ActorTalents.T_WEAPON_COMBAT] = 1,
[ActorTalents.T_VIRULENT_DISEASE] = 1,
[ActorTalents.T_BLOOD_SACRIFICE] = 1,
[ActorTalents.T_REND] = 1,
},
......
......@@ -36,8 +36,6 @@ newBirthDescriptor{
},
},
copy = {
-- All mages are of angolwen faction
faction = "angolwen",
mana_regen = 0.5,
mana_rating = 7,
resolvers.generic(function(e)
......@@ -79,6 +77,8 @@ newBirthDescriptor{
[ActorTalents.T_TELEPORT_ANGOLWEN]=1,
},
copy = {
-- All mages are of angolwen faction
faction = "angolwen",
max_life = 90,
life_rating = 10,
resolvers.equip{ id=true,
......@@ -182,6 +182,8 @@ newBirthDescriptor{
[ActorTalents.T_TELEPORT_ANGOLWEN]=1,
},
copy = {
-- All mages are of angolwen faction
faction = "angolwen",
max_life = 90,
life_rating = 10,
resolvers.equip{ id=true,
......@@ -227,6 +229,8 @@ newBirthDescriptor{
[ActorTalents.T_TELEPORT_ANGOLWEN]=1,
},
copy = {
-- All mages are of angolwen faction
faction = "angolwen",
max_life = 90,
life_rating = 10,
resolvers.equip{ id=true,
......@@ -268,6 +272,8 @@ newBirthDescriptor{
[ActorTalents.T_TELEPORT_ANGOLWEN]=1,
},
copy = {
-- All mages are of angolwen faction
faction = "angolwen",
max_life = 90,
life_rating = 10,
resolvers.equip{ id=true,
......
......@@ -25,6 +25,7 @@ newTalent{
vim = 13,
cooldown = 4,
range = 20,
random_ego = "attack",
action = function(self, t)
local tg = {type="beam", range=self:getTalentRange(t), talent=t}
local x, y = self:getTarget(tg)
......@@ -89,6 +90,7 @@ newTalent{
points = 5,
vim = 25,
cooldown = 12,
random_ego = "attack",
range = function(self, t) return self:getTalentLevelRaw(t) end,
action = function(self, t)
local tg = {type="ball", radius=self:getTalentRange(t), friendlyfire=false}
......
......@@ -73,3 +73,4 @@ load("/data/talents/corruptions/scourge.lua")
load("/data/talents/corruptions/plague.lua")
load("/data/talents/corruptions/reaving-combat.lua")
load("/data/talents/corruptions/bone.lua")
load("/data/talents/corruptions/curses.lua")
-- ToME - Tales of Middle-Earth
-- 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 = "Curse of Defenselessness",
type = {"corruption/curses", 1},
require = corrs_req1,
points = 5,
cooldown = 20,
vim = 20,
range = 20,
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
if target:checkHit(self:combatSpellpower(), target:combatSpellResist(), 0, 95, 15) then
target:setEffect(target.EFF_CURSE_DEFENSELESSNESS, 10, {power=self:combatTalentSpellDamage(t, 30, 60)})
end
end)
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self, t)
return ([[Curses your target, decreasing its defense and saves by %d.
The defense and saves will decrease with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 30))
end,
}
newTalent{
name = "Curse of Impotence",
type = {"corruption/curses", 2},
require = corrs_req2,
points = 5,
cooldown = 20,
vim = 20,
range = 20,
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
if target:checkHit(self:combatSpellpower(), target:combatSpellResist(), 0, 95, 15) then
target:setEffect(target.EFF_CURSE_IMPOTENCE, 10, {power=self:combatTalentSpellDamage(t, 10, 30)})
end
end)
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self, t)
return ([[Curses your target, decreasing all damage done by %d%%.
The damage will decrease with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 30))
end,
}
newTalent{
name = "Curse of Death",
type = {"corruption/curses", 3},
require = corrs_req3,
points = 5,
cooldown = 20,
vim = 20,
range = 20,
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
if target:checkHit(self:combatSpellpower(), target:combatSpellResist(), 0, 95, 15) then
target:setEffect(target.EFF_CURSE_DEATH, 10, {src=self, dam=self:combatTalentSpellDamage(t, 10, 70)})
end
end)
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self, t)
return ([[Curses your target, stopping any natural healing and dealing %0.2f darkness damage each turn.
The resistances will decrease with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 70))
end,
}
newTalent{
name = "Curse of Vulnerability",
type = {"corruption/curses", 4},
require = corrs_req4,
points = 5,
cooldown = 20,
vim = 20,
range = 20,
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
if target:checkHit(self:combatSpellpower(), target:combatSpellResist(), 0, 95, 15) then
target:setEffect(target.EFF_CURSE_VULNERABILITY, 10, {power=self:combatTalentSpellDamage(t, 10, 60)})
end
end)
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self, t)
return ([[Curses your target, decreasing all its resistances by %d%%.
The resistances will decrease with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 60))
end,
}
......@@ -24,6 +24,7 @@ newTalent{
points = 5,
vim = 8,
cooldown = 3,
random_ego = "attack",
range = function(self, t) return 5 + math.floor(self:getTalentLevel(t) * 1.3) end,
action = function(self, t)
local tg = {type="bolt", range=self:getTalentRange(t)}
......
......@@ -951,31 +951,3 @@ newTalent{
The damage will increase with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 170), 20 + self:getTalentLevel(t) * 10, self:combatTalentSpellDamage(t, 10, 220))
end,
}
newTalent{
name = "Curse of Vulnerability",
type = {"corruption/other", 1},
points = 5,
cooldown = 20,
vim = 20,
range = 20,
random_ego = "utility",
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
if target:checkHit(self:combatSpellpower(), target:combatSpellResist(), 0, 95, 15) then
target:setEffect(target.EFF_CURSE_VULNERABILITY, 10, {power=self:combatTalentSpellDamage(t, 10, 85)})
end
end)
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self)
return ([[Curses your target,
The resistances will decrease with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 85))
end,
}
......@@ -1014,6 +1014,66 @@ newEffect{
end,
}
newEffect{
name = "CURSE_IMPOTENCE",
desc = "Curse of Impotence",
type = "curse",
status = "detrimental",
parameters = { power=10 },
on_gain = function(self, err) return "#Target# is cursed.", "+Curse" end,
on_lose = function(self, err) return "#Target# is no longer cursed.", "-Curse" end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("inc_damage", {
all = -eff.power,
})
end,
deactivate = function(self, eff)
self:removeTemporaryValue("inc_damage", eff.tmpid)
end,
}
newEffect{
name = "CURSE_DEFENSELESSNESS",
desc = "Curse of Defenselessness",
type = "curse",
status = "detrimental",
parameters = { power=10 },
on_gain = function(self, err) return "#Target# is cursed.", "+Curse" end,
on_lose = function(self, err) return "#Target# is no longer cursed.", "-Curse" end,
activate = function(self, eff)
eff.def = self:addTemporaryValue("combat_def", eff.power)
eff.mental = self:addTemporaryValue("combat_mentalresist", eff.power)
eff.spell = self:addTemporaryValue("combat_spellresist", eff.power)
eff.physical = self:addTemporaryValue("combat_physresist", eff.power)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("combat_def", eff.def)
self:removeTemporaryValue("combat_mentalresist", eff.mental)
self:removeTemporaryValue("combat_spellresist", eff.spell)
self:removeTemporaryValue("combat_physresist", eff.physical)
end,
}
newEffect{
name = "CURSE_DEATH",
desc = "Curse of Death",
type = "curse",
status = "detrimental",
parameters = { power=10 },
on_gain = function(self, err) return "#Target# is cursed.", "+Curse" end,
on_lose = function(self, err) return "#Target# is no longer cursed.", "-Curse" end,
-- Damage each turn
on_timeout = function(self, eff)
DamageType:get(DamageType.DARKNESS).projector(eff.src, self.x, self.y, DamageType.DARKNESS, eff.dam)
end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("life_regen", -self.life_regen)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("life_regen", eff.tmpid)
end,
}
newEffect{
name = "CONTINUUM_DESTABILIZATION",
desc = "Continuum Destabilization",
......
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