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

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@2565 51575b47-30f0-44d4-a5cc-537603b46e54
parent 26022bba
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,28 @@ newEntity{
end}
}
newEntity{
define_as = "BASE_TAINT",
type = "scroll", subtype="taint", add_name = " [#INSCRIPTION#]",
unided_name = "taint", id_by_type = true,
display = "?", color=colors.LIGHT_BLUE, image="object/rune_yellow.png",
encumber = 0.1,
use_sound = "actions/read",
use_no_blind = true,
use_no_silence = true,
is_magic_device = true,
fire_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}},
desc = [[Corrupted taints may be inscribes onto your body, granting you an on-demand ability.]],
egos = "/data/general/objects/egos/infusions.lua", egos_chance = resolvers.mbonus(30, 5),
power_source = {arcane=true},
use_simple = { name="inscribe your skin with the taint.", use = function(self, who, inven, item)
if who:setInscription(nil, self.inscription_talent, self.inscription_data, true, true, {obj=self, inven=inven, item=item}) then
return "destroy", true
end
end}
}
newEntity{
define_as = "BASE_LORE",
type = "lore", subtype="lore", not_in_stores=true,
......@@ -86,6 +108,9 @@ newEntity{
desc = [[This parchment contains some lore.]],
}
-----------------------------------------------------------
-- Infusions
-----------------------------------------------------------
newEntity{ base = "BASE_INFUSION",
name = "healing infusion",
level_range = {7, 50},
......@@ -206,6 +231,9 @@ newEntity{ base = "BASE_INFUSION",
inscription_talent = "INFUSION:_MIND_POWER",
}
-----------------------------------------------------------
-- Runes
-----------------------------------------------------------
newEntity{ base = "BASE_RUNE",
name = "phase door rune",
level_range = {1, 50},
......@@ -397,3 +425,24 @@ newEntity{ base = "BASE_RUNE",
},
inscription_talent = "RUNE:_MANASURGE",
}
-----------------------------------------------------------
-- Taints
-----------------------------------------------------------
--[[
newEntity{ base = "BASE_TAINT",
name = "taint of the devourer",
level_range = {1, 50},
rarity = 15,
cost = 10,
material_level = 1,
inscription_data = {
cooldown = resolvers.rngrange(12, 17),
effects = resolvers.mbonus_level(3, 2, function(e, v) return v * 0.06 end),
heal = resolvers.mbonus_level(70, 40, function(e, v) return v * 0.06 end),
use_stat_mod = 0.6,
},
inscription_talent = "TAINT:_DEVOURER",
}
]]
......@@ -677,3 +677,70 @@ newInscription{
return ("%0.2f temporal damage, removed from time %d turns"):format(t.getDamage(self, t), t.getDuration(self, t))
end,
}
-----------------------------------------------------------------------
-- Taints
-----------------------------------------------------------------------
newInscription{
name = "Taint: Devourer",
type = {"inscriptions/taints", 1},
points = 1,
is_spell = true,
tactical = { ATTACK = 1, HEAL=1 },
requires_target = true,
direct_hit = true,
no_energy = true,
range = 5,
action = function(self, t)
local data = self:getInscriptionData(t.short_name)
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(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
local effs = {}
-- Go through all spell effects
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "magical" or e.type == "physical" then
effs[#effs+1] = {"effect", eff_id}
end
end
-- Go through all sustained spells
for tid, act in pairs(target.sustain_talents) do
if act then
effs[#effs+1] = {"talent", tid}
end
end
local nb = data.effects
for i = 1, nb do
if #effs == 0 then break end
local eff = rng.tableRemove(effs)
if eff[1] == "effect" then
target:removeEffect(eff[2])
else
target:forceUseTalent(eff[2], {ignore_energy=true})
end
self:heal(data.heal + data.inc_stat)
end
game.level.map:particleEmitter(px, py, 1, "shadow_zone")
end)
game:playSoundNear(self, "talents/fire")
return true
end,
info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[Activate the taint on a foe, removing %d effects from it and healing you for %d per effects.]]):format(data.effects, data.heal + data.inc_stat)
end,
short_info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[%d effects / %d heal]]):format(data.effects, data.heal + data.inc_stat)
end,
}
......@@ -22,6 +22,7 @@ newTalentType{ type="base/class", name = "class", hide = true, description = "Th
newTalentType{ type="base/race", name = "race", hide = true, description = "The various racial bonuses a character can have." }
newTalentType{ type="inscriptions/infusions", name = "infusions", hide = true, description = "Infusions are not class abilities, you must find them or learn them from other people." }
newTalentType{ is_spell=true, type="inscriptions/runes", name = "runes", hide = true, description = "Runes are not class abilities, you must find them or learn them from other people." }
newTalentType{ is_spell=true, type="inscriptions/taints", name = "taints", hide = true, description = "Taints are not class abilities, you must find them or learn them from other people." }
-- Load other misc things
load("/data/talents/misc/inscriptions.lua")
......
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