PK
P~zA data/UT PPux d PK
P~zAق' ' data/timed_effects.luaUT PPux d -- ToME - Tales of Maj'Eyal:
-- Copyright (C) 2009, 2010, 2011, 2012 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 .
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local Stats = require "engine.interface.ActorStats"
local Particles = require "engine.Particles"
local Entity = require "engine.Entity"
local Chat = require "engine.Chat"
local Map = require "engine.Map"
local Level = require "engine.Level"
newEffect{
name = "STONE_VINE",
desc = "Stone Vine",
long_desc = function(self, eff) return ("A living stone vine holds the target on the ground and doing %0.2f physical damage per turn."):format(eff.dam) end,
type = "physical",
subtype = { earth=true, pin=true },
status = "detrimental",
parameters = { dam=10 },
on_gain = function(self, err) return "#Target# is grabbed by a stone vine.", "+Stone Vine" end,
on_lose = function(self, err) return "#Target# is free from the stone vine.", "-Stone Vine" end,
activate = function(self, eff)
eff.last_x = eff.src.x
eff.last_y = eff.src.y
eff.tmpid = self:addTemporaryValue("never_move", 1)
eff.particle = self:addParticles(Particles.new("stonevine", 1, {tx=eff.src.x-self.x, ty=eff.src.y-self.y}))
end,
deactivate = function(self, eff)
self:removeTemporaryValue("never_move", eff.tmpid)
self:removeParticles(eff.particle)
end,
on_timeout = function(self, eff)
local severed = false
if core.fov.distance(self.x, self.y, eff.src.x, eff.src.y) >= eff.free or eff.src.dead or not game.level:hasEntity(eff.src) then severed = true end
if rng.percent(eff.free_chance) then severed = true end
self:removeParticles(eff.particle)
eff.particle = self:addParticles(Particles.new("stonevine", 1, {tx=eff.src.x-self.x, ty=eff.src.y-self.y}))
if severed then
return true
else
DamageType:get(DamageType.PHYSICAL).projector(eff.src or self, self.x, self.y, DamageType.PHYSICAL, eff.dam)
if eff.src:knowTalent(eff.src.T_ELDRITCH_VINES) then
local l = eff.src:getTalentLevel(eff.src.T_ELDRITCH_VINES)
eff.src:incEquilibrium(-l / 4)
eff.src:incMana(l / 3)
end
end
eff.last_x = eff.src.x
eff.last_y = eff.src.y
end,
}
newEffect{
name = "DWARVEN_RESILIENCE", image = "talents/dwarf_resilience.png",
desc = "Dwarven Resilience",
long_desc = function(self, eff)
if eff.mid then
return ("The target's skin turns to stone, granting %d armour, %d physical save and %d spell save. Also applies %d armour to all non-physical damage."):format(eff.armor, eff.physical, eff.spell, eff.mid_ac)
else
return ("The target's skin turns to stone, granting %d armour, %d physical save and %d spell save."):format(eff.armor, eff.physical, eff.spell)
end
end,
type = "physical",
subtype = { earth=true },
status = "beneficial",
parameters = { armor=10, spell=10, physical=10 },
on_gain = function(self, err) return "#Target#'s skin turns to stone." end,
on_lose = function(self, err) return "#Target#'s skin returns to normal." end,
activate = function(self, eff)
eff.aid = self:addTemporaryValue("combat_armor", eff.armor)
eff.pid = self:addTemporaryValue("combat_physresist", eff.physical)
eff.sid = self:addTemporaryValue("combat_spellresist", eff.spell)
if self:knowTalent(self.T_STONE_FORTRESS) then
local ac = self:combatArmor() * (50 + self:getTalentLevel(self.T_STONE_FORTRESS) * 10) / 100
eff.mid_ac = ac
eff.mid = self:addTemporaryValue("flat_damage_armor", {all=ac, [DamageType.PHYSICAL]=-ac})
end
end,
deactivate = function(self, eff)
self:removeTemporaryValue("combat_armor", eff.aid)
self:removeTemporaryValue("combat_physresist", eff.pid)
self:removeTemporaryValue("combat_spellresist", eff.sid)
if eff.mid then self:removeTemporaryValue("flat_damage_armor", eff.mid) end
end,
}
newEffect{
name = "ELDRITCH_STONE", image = "talents/eldritch_stone.png",
desc = "Eldritch Stone Shield",
long_desc = function(self, eff) return ("The target's is surrounded by a shield absorbing %d/%d damage."):format(eff.power, eff.max) end,
type = "magical",
subtype = { earth=true, shield=true },
status = "beneficial",
parameters = { power=100, radius=3 },
on_gain = function(self, err) return "#Target#'s is surrounded by stone." end,
on_lose = function(self, err) return "#Target#'s free from the stone." end,
on_aegis = function(self, eff, aegis)
self.power = self.power + eff.max * aegis / 100
end,
activate = function(self, eff)
if self:attr("shield_factor") then eff.power = eff.power * (100 + self:attr("shield_factor")) / 100 end
if self:attr("shield_dur") then eff.dur = eff.dur + self:attr("shield_dur") end
eff.max = eff.power
eff.particle = self:addParticles(Particles.new("eldritch_stone", 1))
end,
deactivate = function(self, eff)
self:removeParticles(eff.particle)
local equi = self:getEquilibrium() - self:getMinEquilibrium()
if equi > 0 then
self:incMana(equi)
self:incEquilibrium(-equi)
self:project({type="ball", radius=eff.radius, selffire=false}, self.x, self.y, DamageType.ARCANE, math.min(equi, 100 * self:getTalentLevel(self.T_ELDRITCH_STONE)))
game.level.map:particleEmitter(self.x, self.y, eff.radius, "eldricth_stone_explo", {radius=eff.radius})
end
end,
}
newEffect{
name = "STONE_LINK_SOURCE", image = "talents/stone_link.png",
desc = "Stone Link",
long_desc = function(self, eff) return ("The target's protects all those around it in radius %d."):format(eff.rad) end,
type = "physical",
subtype = { earth=true, shield=true },
status = "beneficial",
parameters = { rad=3 },
on_gain = function(self, err) return "#Target#'s is protecting its friends.", "+Stone Link" end,
on_lose = function(self, err) return "#Target#'s is not protecting anymore.", "-Stone Link" end,
activate = function(self, eff)
if core.shader.active() then
eff.particle = self:addParticles(Particles.new("shader_shield", 1, {size_factor=eff.rad}, {type="shield", time_factor=4000, color={0.7, 0.4, 0.3}}))
else
eff.particle = self:addParticles(Particles.new("eldritch_stone", 1, {size_factor=eff.rad}))
end
end,
deactivate = function(self, eff)
self:removeParticles(eff.particle)
end,
on_timeout = function(self, eff)
self:project({type="ball", radius=eff.rad, selffire=false}, self.x, self.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_STONE_LINK, 2, {src=self})
end)
end,
}
newEffect{
name = "STONE_LINK", image = "talents/stone_link.png",
desc = "Stone Link",
long_desc = function(self, eff) return ("The target's is protected by %s, redirecting all damage to it."):format(eff.src.name) end,
type = "physical",
subtype = { earth=true, shield=true },
status = "beneficial",
parameters = { },
on_gain = function(self, err) return "#Target#'s is protected.", "+Stone Link" end,
on_lose = function(self, err) return "#Target#'s is less protected.", "-Stone Link" end,
activate = function(self, eff)
end,
deactivate = function(self, eff)
end,
}
newEffect{
name = "DEEPROCK_FORM", image = "talents/deeprock_form.png",
desc = "Deeprock Form",
long_desc = function(self, eff) return ("The target has turned into a huge deeprock elemental."):format() end,
type = "magical",
subtype = { earth=true, elemental=true },
status = "beneficial",
parameters = { },
on_gain = function(self, err) return "#Target#'s is imbued by the power of the stone.", "+Deeprock Form" end,
on_lose = function(self, err) return "#Target#'s is abandonned by stone's power.", "-Deeprock Form" end,
activate = function(self, eff)
if self:knowTalent(self.T_VOLCANIC_ROCK) then
self:learnTalent(self.T_VOLCANO, true, self:getTalentLevelRaw(self.T_VOLCANIC_ROCK))
self:effectTemporaryValue(eff, "talent_cd_reduction", {[self.T_VOLCANO] = 15})
end
if self:knowTalent(self.T_BOULDER_ROCK) then
self:learnTalent(self.T_THROW_BOULDER, true, self:getTalentLevelRaw(self.T_BOULDER_ROCK))
end
if self:knowTalent(self.T_MOUNTAINHEWN) then
if self:getTalentLevel(self.T_MOUNTAINHEWN) >= 5 then self:effectTemporaryValue(eff, "force_use_resist", DamageType.PHYSICAL) end
self:effectTemporaryValue(eff, "cut_immune", 20 + self:getTalentLevel(self.T_MOUNTAINHEWN) * 7)
self:effectTemporaryValue(eff, "poison_immune", 20 + self:getTalentLevel(self.T_MOUNTAINHEWN) * 7)
self:effectTemporaryValue(eff, "disease_immune", 20 + self:getTalentLevel(self.T_MOUNTAINHEWN) * 7)
self:effectTemporaryValue(eff, "stun_immune", 20 + self:getTalentLevel(self.T_MOUNTAINHEWN) * 7)
end
self:effectTemporaryValue(eff, "inc_damage", {[DamageType.PHYSICAL] = eff.dam})
self:effectTemporaryValue(eff, "resists_pen", {[DamageType.PHYSICAL] = eff.pen})
self:effectTemporaryValue(eff, "combat_armor", eff.armor)
self:effectTemporaryValue(eff, "size_category", 2)
self.replace_display = mod.class.Actor.new{
image = "invis.png",
add_displays = {mod.class.Actor.new{
image = "npc/elemental_xorn_harkor_zun.png", display_y=-1, display_h=2,
shader = "shadow_simulacrum",
shader_args = { color = {0.6, 0.5, 0.2}, base = 0.95, time_factor = 1500 },
}},
}
self:removeAllMOs()
game.level.map:updateMap(self.x, self.y)
end,
deactivate = function(self, eff)
if self:knowTalent(self.T_VOLCANIC_ROCK) then self:unlearnTalent(self.T_VOLCANO, self:getTalentLevelRaw(self.T_VOLCANIC_ROCK)) end
if self:knowTalent(self.T_BOULDER_ROCK) then self:unlearnTalent(self.T_THROW_BOULDER, self:getTalentLevelRaw(self.T_BOULDER_ROCK)) end
self.replace_display = nil
self:removeAllMOs()
game.level.map:updateMap(self.x, self.y)
end,
}
PK
P~zA
data/talents/UT PPux d PK
P~zA data/talents/gifts/UT PPux d PK
"A坨p/ / $ data/talents/gifts/earthen-power.luaUT (PPux d -- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012 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 .
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newTalent{
name = "Stoneshield",
type = {"wild-gift/earthen-power", 1},
mode = "passive",
require = gifts_req1,
points = 5,
no_unlearn_last = true,
on_learn = function(self, t)
self:attr("show_shield_combat", 1)
end,
on_unlearn = function(self, t)
self:attr("show_shield_combat", -1)
end,
getValues = function(self, t)
return
(5 + self:getTalentLevel(t) * 2) / 100,
5 + self:getTalentLevel(t),
(5 + self:getTalentLevel(t) * 1.7) / 100,
4 + self:getTalentLevel(t)
end,
getDamage = function(self, t) return self:getTalentLevel(t) * 10 end,
getPercentInc = function(self, t) return math.sqrt(self:getTalentLevel(t) / 5) / 2 end,
info = function(self, t)
local m, mm, e, em = t.getValues(self, t)
local damage = t.getDamage(self, t)
local inc = t.getPercentInc(self, t)
return ([[Each time you get hit you regenerate %d%% of the damage dealt as mana (up to a maximun of %0.2f) and %d%% as equilibrium (up to %0.2f).
This effect can only happen once per turn.
Makes all your melee attack also do a shield bash and allows you to dual-wield shields.
Increases Physical Power by %d and increases damage done with shields by %d%%.]]):format(100 * m, mm, 100 * e, em, damage, inc*100)
end,
}
newTalent{
name = "Stone Fortress",
type = {"wild-gift/earthen-power", 2},
require = gifts_req2,
points = 5,
mode = "passive",
info = function(self, t)
return ([[When you use your Resilience of the Dwarves racial power your skin becomes so thick that it even absorbs damage from non physical attacks.
Non physical damages are reduced by %d%% of your total armour value (ignoring hardiness).]]):
format(50 + self:getTalentLevel(t) * 10)
end,
}
newTalent{
name = "Shards",
type = {"wild-gift/earthen-power", 3},
require = gifts_req3,
mode = "sustained",
points = 5,
sustain_equilibrium = 15,
cooldown = 30,
tactical = { BUFF = 2 },
activate = function(self, t)
return {}
end,
deactivate = function(self, t, p)
return true
end,
info = function(self, t)
return ([[Sharp shards of stone grow on your shields, when you get attacked in melee the shards will automatically do %d%% shield attack damage as nature.
This effect can only happen once per turn.]]):
format(self:combatTalentWeaponDamage(t, 0.4, 1) * 100)
end,
}
newTalent{
name = "Eldritch Stone",
type = {"wild-gift/earthen-power", 4},
require = gifts_req4,
points = 5,
equilibrium = 10,
cooldown = 20,
tactical = { DEFEND = 2, EQUILIBRIUM=1, MANA=1 },
radius = function(self, t) return math.floor(2 + self:getTalentLevel(t) / 2) end,
getPower = function(self, t) return 70 + self:combatTalentStatDamage(t, "wil", 5, 400) end,
action = function(self, t)
self:setEffect(self.EFF_ELDRITCH_STONE, 7, {power=t.getPower(self, t), radius=self:getTalentRadius(t)})
game:playSoundNear(self, "talents/stone")
return true
end,
info = function(self, t)
local power = t.getPower(self, t)
local radius = self:getTalentRadius(t)
return ([[Creates a shield of impenetrable stone around you, absorbing all damage taken up to %d for 7 turns.
All damage absorbed will increase your equilibrium, when the effect ends your equilibrium resets to the minimum and transfers to mana while unleashing a radius %d arcane storm equal to the mana regenerated.
The shield will increase with Willpower]]):format(power, radius)
end,
}
PK
P~zAvƜ $ data/talents/gifts/earthen-vines.luaUT PPux d -- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012 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 .
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newTalent{
name = "Stone Vines",
type = {"wild-gift/earthen-vines", 1},
require = gifts_req1,
points = 5,
mode = "sustained",
sustain_equilibrium = 15,
cooldown = 10,
no_energy = true,
tactical = { ATTACK = { PHYSICAL = 2 }, BUFF = 2, DISABLE = { pin = 2 } },
radius = function(self, t) return 4 + math.ceil(self:getTalentLevel(t) / 2) end,
getValues = function(self, t) return 4 + self:getTalentLevelRaw(t), self:combatTalentStatDamage(t, "wil", 3, 50) end,
do_vines = function(self, t)
local p = self:isTalentActive(t.id)
local rad = self:getTalentRadius(t)
local tgts = {}
local grids = core.fov.circle_grids(self.x, self.y, rad, true)
for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do
local a = game.level.map(x, y, Map.ACTOR)
if a and self:reactionToward(a) < 0 and not a:hasEffect(a.EFF_STONE_VINE) then
tgts[#tgts+1] = a
end
end end
if #tgts <= 0 then return end
-- Randomly take targets
local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local a, id = rng.table(tgts)
local hit, chance = a:checkHit(self:combatTalentStatDamage(t, "wil", 5, 110), a:combatPhysicalResist(), 0, 95, 5)
if a:canBe("pin") and hit then
local turns, dam = t.getValues(self, t)
a:setEffect(a.EFF_STONE_VINE, turns, {dam=dam, src=self, free=rad*2, free_chance=100-chance})
game:playSoundNear(self, "talents/stone")
end
end,
activate = function(self, t)
return {
movid = self:addTemporaryValue("movement_speed", -0.5),
particle = self:addParticles(Particles.new("stonevine_static", 1, {})),
}
end,
deactivate = function(self, t, p)
self:removeTemporaryValue("movement_speed", p.movid)
self:removeParticles(p.particle)
return true
end,
info = function(self, t)
local rad = self:getTalentRadius(t)
local turns, dam = t.getValues(self, t)
return ([[Living stone vines extend from your feet, each turn the vines will randomly target a creature in a radius of %d.
Affected creatures are pinned to the ground and take %0.2f physical damage for %d turns.
Targets will be free from the vines if they are at least %d grids away from you.
While earthen vines are active your movement speed is reduced by 50%%.
Each turn a creature entangled by the vines will have a chance to break free.
The damage will increase with Willpower stats.]]):
format(rad, damDesc(self, DamageType.PHYSICAL, dam), turns, rad*2)
end,
}
newTalent{
name = "Eldritch Vines",
type = {"wild-gift/earthen-vines", 2},
require = gifts_req2,
points = 5,
mode = "passive",
info = function(self, t)
return ([[Each time a vine deal damage to a creature it will restore %0.2f equilibrium and %0.2f mana.]])
:format(self:getTalentLevel(t) / 4, self:getTalentLevel(t) / 3)
end,
}
newTalent{
name = "Rockwalk",
type = {"wild-gift/earthen-vines", 3},
require = gifts_req3,
points = 5,
equilibrium = 15,
cooldown = 10,
requires_target = true,
range = 20,
tactical = { HEAL = 2, CLOSEIN = 2 },
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)}
local x, y, target = self:getTarget(tg)
if not x or not y or not target then return nil end
if not target:hasEffect(target.EFF_STONE_VINE) then return nil end
self:attr("allow_on_heal", 1)
self:heal(100 + self:combatTalentStatDamage(t, "wil", 40, 630))
self:attr("allow_on_heal", -1)
local tx, ty = util.findFreeGrid(x, y, 2, true, {[Map.ACTOR]=true})
if tx and ty then
local ox, oy = self.x, self.y
self:move(tx, ty, true)
if config.settings.tome.smooth_move > 0 then
self:resetMoveAnim()
self:setMoveAnim(ox, oy, 8, 5)
end
end
return true
end,
info = function(self, t)
return ([[Merge with a stone vine, travelling alongside it to reappear near an entangled creature.
Merging with the stone is beneficial for you, healing %0.2f life.
Healing will increase with Willpower.]])
:format(100 + self:combatTalentStatDamage(t, "wil", 40, 630))
end,
}
newTalent{
name = "Rockswallow",
type = {"wild-gift/earthen-vines", 4},
require = gifts_req4,
points = 5,
equilibrium = 15,
cooldown = 10,
requires_target = true,
range = 20,
tactical = { ATTACK = { PHYSICAL = 2 }, CLOSEIN = 2 },
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)}
local x, y, target = self:getTarget(tg)
if not x or not y or not target then return nil end
if not target:hasEffect(target.EFF_STONE_VINE) then return nil end
DamageType:get(DamageType.PHYSICAL).projector(self, target.x, target.y, DamageType.PHYSICAL, 80 + self:combatTalentStatDamage(t, "wil", 40, 330))
if target.dead then return end
local tx, ty = util.findFreeGrid(self.x, self.y, 2, true, {[Map.ACTOR]=true})
if tx and ty then
local ox, oy = target.x, target.y
target:move(tx, ty, true)
if config.settings.tome.smooth_move > 0 then
target:resetMoveAnim()
target:setMoveAnim(ox, oy, 8, 5)
end
end
return true
end,
info = function(self, t)
return ([[Merge your target with a stone vine, forcing it to travel alongside it to reappear near you.
Merging with the stone is detrimental for the target, dealing %0.2f physical damage.
Damage will increase with Willpower.]])
:format(80 + self:combatTalentStatDamage(t, "wil", 40, 330))
end,
}
PK
P~zAzSD/ / % data/talents/gifts/dwarven-nature.luaUT PPux d -- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012 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 .
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newTalent{
name = "Elemental Split",
type = {"wild-gift/dwarven-nature", 1},
require = gifts_req1,
points = 5,
equilibrium = 20,
cooldown = 30,
getDuration = function(self, t) return math.ceil(5 + self:getTalentLevel(t)) end,
on_pre_use = function(self, t) return not self:hasEffect(self.EFF_DEEPROCK_FORM) end,
action = function(self, t)
-- Find space
local x, y = util.findFreeGrid(self.x, self.y, 1, true, {[Map.ACTOR]=true})
if x then
local m = require("mod.class.NPC").new(self:clone{
shader = "shadow_simulacrum", shader_args = {time_factor=1000, base=0.5, color={0.6, 0.3, 0.6}},
no_drops = true,
faction = self.faction,
summoner = self, summoner_gain_exp=true,
summon_time = t.getDuration(self, t),
ai_target = {actor=nil},
ai = "summoned", ai_real = "tactical",
name = "Crystaline Half ("..self.name..")",
desc = [[A crystaline structure that has taken your exact form.]],
})
m:removeAllMOs()
m.make_escort = nil
m.on_added_to_level = nil
m.energy.value = 0
m.player = nil
-- m.max_life = m.max_life * t.getHealth(self, t)
-- m.life = util.bound(m.life, 0, m.max_life)
m.forceLevelup = function() end
m.die = nil
m.on_die = nil
m.on_acquire_target = nil
m.seen_by = nil
m.can_talk = nil
m.puuid = nil
m.on_takehit = nil
m.exp_worth = 0
m.no_inventory_access = true
m.clone_on_hit = nil
local tids = table.keys(m.talents)
for i, tid in ipairs(tids) do
if tid ~= m.T_STONESIELD and tid ~= m.T_ARMOUR_TRAINING then
m:unlearnTalent(tid, m:getTalentLevelRaw(tid))
end
end
m.talent_cd_reduction={[m.T_EARTHEN_MISSILES]=4},
m:learnTalent(m.T_EARTHEN_MISSILES, true, self:getTalentLevelRaw(t))
m.remove_from_party_on_death = true
if self:knowTalent(self.T_POWER_CORE) then
m:learnTalent(m.T_RAIN_OF_SPIKES, true, math.floor(self:getTalentLevel(self.T_POWER_CORE)))
end
game.zone:addEntity(game.level, m, "actor", x, y)
game.level.map:particleEmitter(x, y, 1, "shadow")
if game.party:hasMember(self) then
game.party:addMember(m, {
control="no",
type="dwarven nature crystaline half",
title="Crystaline Half",
orders = {target=true},
})
end
end
-- Find space
local x, y = util.findFreeGrid(self.x, self.y, 1, true, {[Map.ACTOR]=true})
if x then
local m = require("mod.class.NPC").new(self:clone{
shader = "shadow_simulacrum", shader_args = {time_factor=-8000, base=0.5, color={0.6, 0.4, 0.3}},
no_drops = true,
faction = self.faction,
summoner = self, summoner_gain_exp=true,
summon_time = t.getDuration(self, t),
ai_target = {actor=nil},
ai = "summoned", ai_real = "tactical",
name = "Stone Half ("..self.name..")",
desc = [[A stone structure that has taken your exact form.]],
})
m:removeAllMOs()
m.make_escort = nil
m.on_added_to_level = nil
m.energy.value = 0
m.player = nil
-- m.max_life = m.max_life * t.getHealth(self, t)
-- m.life = util.bound(m.life, 0, m.max_life)
m.forceLevelup = function() end
m.die = nil
m.on_die = nil
m.on_acquire_target = nil
m.seen_by = nil
m.can_talk = nil
m.puuid = nil
m.on_takehit = nil
m.exp_worth = 0
m.no_inventory_access = true
m.clone_on_hit = nil
local tids = table.keys(m.talents)
for i, tid in ipairs(tids) do
if tid ~= m.T_STONESIELD and tid ~= m.T_ARMOUR_TRAINING then
m:unlearnTalent(tid, m:getTalentLevelRaw(tid))
end
end
m.talent_cd_reduction={[m.T_TAUNT]=3},
m:learnTalent(m.T_TAUNT, true, self:getTalentLevelRaw(t))
m.remove_from_party_on_death = true
if self:knowTalent(self.T_POWER_CORE) then
m:learnTalent(m.T_STONE_LINK, true, math.floor(self:getTalentLevel(self.T_POWER_CORE)))
end
game.zone:addEntity(game.level, m, "actor", x, y)
game.level.map:particleEmitter(x, y, 1, "shadow")
if game.party:hasMember(self) then
game.party:addMember(m, {
control="no",
type="dwarven nature stone half",
title="Stone Half",
orders = {target=true},
})
end
end
game:playSoundNear(self, "talents/spell_generic2")
return true
end,
info = function(self, t)
return ([[Reach inside your dwarven core and summon your stone and crystaline halves to fight alongside you for %d turns.
Crystaline Half: will attack your foes with earthen missiles
Stone Half: will taunt your foes to protect you
This power can not be called upon while under the effect of Deeprock Form.
]]):format(t.getDuration(self, t))
end,
}
newTalent{
name = "Power Core",
type = {"wild-gift/dwarven-nature", 2},
require = gifts_req2,
points = 5,
mode = "passive",
info = function(self, t)
return ([[Improves your halves with new powers:
Crystaline Half: Rain of Spikes. A massive effect on a zone the makes all foes bleed.
Stone Half: Stone Link. A protective shield over a radius that will redirect all damage inside it to the stone half.
The level of those talents is %d.]]):
format(self:getTalentLevel(t))
end,
}
newTalent{
name = "Dwarven Unity",
type = {"wild-gift/dwarven-nature", 3},
require = gifts_req3,
points = 5,
equilibrium = 10,
cooldown = 6,
tactical = { ATTACK = 2, PROTECT = 2 },
radius = function(self, t) return 3 + math.floor(self:getTalentLevel(t)) end,
on_pre_use = function(self, t)
local cryst = game.party:findMember{type="dwarven nature crystaline half"}
local stone = game.party:findMember{type="dwarven nature stone half"}
if not cryst and not stone then return false end
return true
end,
action = function(self, t)
local cryst = game.party:findMember{type="dwarven nature crystaline half"}
local stone = game.party:findMember{type="dwarven nature stone half"}
if cryst then
self:project({type="ball", radius=self:getTalentRadius(t), friendlyfire=false}, self.x, self.y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
cryst:forceUseTalent(cryst.T_EARTHEN_MISSILES, {ignore_cd=true, ignore_energy=true, force_target=target, force_level=self:getTalentLevelRaw(t), ignore_ressources=true})
end)
end
if stone then
game.level.map:remove(self.x, self.y, Map.ACTOR)
game.level.map:remove(stone.x, stone.y, Map.ACTOR)
game.level.map(self.x, self.y, Map.ACTOR, stone)
game.level.map(stone.x, stone.y, Map.ACTOR, self)
self.x, self.y, stone.x, stone.y = stone.x, stone.y, self.x, self.y
game.level.map:particleEmitter(stone.x, stone.y, 1, "teleport")
game.level.map:particleEmitter(self.x, self.y, 1, "teleport")
self:project({type="ball", radius=self:getTalentRadius(t), friendlyfire=false}, self.x, self.y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
target:setTarget(stone)
end)
end
return true
end,
info = function(self, t)
return ([[You call upon the immediate help of your halves.
Your stone half will trade place with you and all creatures currently targetting you in a radius of %d will target it instead.
Your crystaline half will instantly fire a volley of level %d earthen missiles at all foes near the stone half (or you if the stone half is dead) in radius %d.]]):
format(self:getTalentRadius(t), self:getTalentLevelRaw(t), self:getTalentRadius(t))
end,
}
newTalent{
name = "Mergeback",
type = {"wild-gift/dwarven-nature", 4},
require = gifts_req4,
points = 5,
equilibrium = 10,
cooldown = 20,
no_npc_use = true,
radius = 3,
getRemoveCount = function(self, t) return math.floor(4 + self:getTalentLevel(t)) end,
getDamage = function(self, t) return self:combatTalentStatDamage(t, "wil", 60, 330) end,
getHeal = function(self, t) return self:combatTalentStatDamage(t, "wil", 60, 330) end,
on_pre_use = function(self, t)
local cryst = game.party:findMember{type="dwarven nature crystaline half"}
local stone = game.party:findMember{type="dwarven nature stone half"}
if not cryst and not stone then return false end
return true
end,
action = function(self, t)
local cryst = game.party:findMember{type="dwarven nature crystaline half"}
local stone = game.party:findMember{type="dwarven nature stone half"}
local nb = (cryst and 1 or 0) + (stone and 1 or 0)
cryst:die()
stone:die()
local target = self
local effs = {}
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if (e.type == "magical" or e.type == "mental" or e.type == "physical") and e.status == "detrimental" then
effs[#effs+1] = {"effect", eff_id}
end
end
for i = 1, t.getRemoveCount(self, t) do
if #effs == 0 then break end
local eff = rng.tableRemove(effs)
if eff[1] == "effect" then
target:removeEffect(eff[2])
end
end
self:heal(self:mindCrit(t.getHeal(self, t) * nb))
self:project({type="ball", radius=self:getTalentRadius(t), friendlyfire=false}, self.x, self.y, DamageType.NATURE, self:mindCrit(t.getDamage(self, t)) * nb)
game.level.map:particleEmitter(self.x, self.y, self:getTalentRadius(t), "generic_ball", {radius=self:getTalentRadius(t), rm=0, rM=0, gm=200, gM=250, bm=100, bM=170, am=200, aM=255})
game:playSoundNear(self, "talents/stone")
return true
end,
info = function(self, t)
local nb = t.getRemoveCount(self, t)
local dam = t.getDamage(self, t)
local heal = t.getHeal(self, t)
return ([[Merges your halves back into you, cleaning your body from %d magical, mental or physical effects.
For each half also heals you for %d and releases a shockwave of nature of radius 3 dealing %0.2f nature damage.]]):
format(nb, heal, damDesc(self, DamageType.NATURE, dam))
end,
}
-----------------------------------------------------------
-- Halves talents
-----------------------------------------------------------
newTalent{
name = "Stone Link",
type = {"wild-gift/other", 1},
points = 5,
equilibrium = 10,
cooldown = 10,
tactical = { BUFF = 2, },
radius = function(self, t) return math.floor(2 + self:getTalentLevel(t) / 2) end,
requires_target = false,
action = function(self, t)
self:setEffect(self.EFF_STONE_LINK_SOURCE, 5, {rad=self:getTalentRadius(t)})
game:playSoundNear(self, "talents/stone")
return true
end,
info = function(self, t)
local radius = self:getTalentRadius(t)
return ([[Creates a shield of radius %d that redirects all damage done to friends inside it to you for 5 turns.]]):format(radius)
end,
}
newTalent{
name = "Rain of Spikes",
type = {"wild-gift/other", 1},
points = 5,
equilibrium = 10,
cooldown = 6,
tactical = { ATTACKAREA = {PHYSICAL=2}, },
radius = function(self, t) return math.floor(2 + self:getTalentLevel(t)) end,
getDamage = function(self, t) return self:combatTalentStatDamage(t, "wil", 60, 330) end,
action = function(self, t)
self:project({type="ball", radius=self:getTalentRadius(t), friendlyfire=false}, self.x, self.y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
if target:canBe("cut") then
target:setEffect(target.EFF_CUT, 6, {apply_power=self:combatMindpower(), power=self:mindCrit(t.getDamage(self, t))/6})
end
end, nil, {type="stone_spikes"})
game:playSoundNear(self, "talents/stone")
return true
end,
info = function(self, t)
local radius = self:getTalentRadius(t)
return ([[Fires spikes all around you, making all your foes bleed for %0.2f damage over 6 turns.
Damage will increase with Willpower.]]):format(radius)
end,
}
PK
P~zAfw: data/talents/gifts/gifts.luaUT PPux d -- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012 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 .
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newTalentType{ allow_random=true, is_nature=true, type="wild-gift/earthen-power", name = "earthen power", description = "Dwarves have learned to imbue their shields with the power of stone itself." }
newTalentType{ allow_random=true, is_nature=true, type="wild-gift/earthen-vines", name = "earthen vines", description = "Control the stone itself and bring it alive in the form of dreadful vines." }
newTalentType{ allow_random=true, is_nature=true, type="wild-gift/dwarven-nature", name = "dwarven nature", description = "Learn to harness the inate power of your race." }
damDesc = Talents.main_env.damDesc
gifts_req1 = Talents.main_env.gifts_req1
gifts_req2 = Talents.main_env.gifts_req2
gifts_req3 = Talents.main_env.gifts_req3
gifts_req4 = Talents.main_env.gifts_req4
gifts_req5 = Talents.main_env.gifts_req5
load("/data-stone-wardens/talents/gifts/earthen-power.lua")
load("/data-stone-wardens/talents/gifts/earthen-vines.lua")
load("/data-stone-wardens/talents/gifts/dwarven-nature.lua")
PK
P~zA data/talents/spells/UT PPux d PK
P~zA data/talents/spells/spells.luaUT PPux d -- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012 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 .
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/eldritch-shield", name = "eldritch shield", description = "Infuse arcane forces in your shield." }
newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/eldritch-stone", name = "eldritch stone", description = "Summon stony spikes inbued with various powers." }
newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="spell/deeprock", name = "deeprock", description = "Harness the power of the world to turn into a Deeprock Form." }
damDesc = Talents.main_env.damDesc
spells_req1 = Talents.main_env.spells_req1
spells_req2 = Talents.main_env.spells_req2
spells_req3 = Talents.main_env.spells_req3
spells_req4 = Talents.main_env.spells_req4
spells_req5 = Talents.main_env.spells_req5
spells_high_req1 = Talents.main_env.spells_high_req1
spells_high_req2 = Talents.main_env.spells_high_req2
spells_high_req3 = Talents.main_env.spells_high_req3
spells_high_req4 = Talents.main_env.spells_high_req4
spells_high_req5 = Talents.main_env.spells_high_req5
load("/data-stone-wardens/talents/spells/eldritch-shield.lua")
load("/data-stone-wardens/talents/spells/eldritch-stone.lua")
load("/data-stone-wardens/talents/spells/deeprock.lua")
PK
P~zAH H &