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

finish vim tree

git-svn-id: http://svn.net-core.org/repos/t-engine4@1920 51575b47-30f0-44d4-a5cc-537603b46e54
parent 68af39e6
No related branches found
No related tags found
No related merge requests found
...@@ -795,6 +795,11 @@ function _M:onTakeHit(value, src) ...@@ -795,6 +795,11 @@ function _M:onTakeHit(value, src)
-- end -- end
-- end -- end
if self:knowTalent(self.T_LEECH) and src.hasEffect and src:hasEffect(src.EFF_VIMSENSE) then
self:incVim(3 + self:getTalentLevel(self.T_LEECH) * 0.7)
game.logPlayer(self, "#AQUAMARINE#You leech a part of %s vim.", src.name:capitalize())
end
return value return value
end end
......
...@@ -285,6 +285,7 @@ function _M:playerFOV() ...@@ -285,6 +285,7 @@ function _M:playerFOV()
end end
if ok then if ok then
if self.detect_function then self.detect_function(self, x, y) end
game.level.map.seens(x, y, 1) game.level.map.seens(x, y, 1)
end end
end, true, true, true) end, true, true, true)
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
-- Corruptions -- Corruptions
newTalentType{ no_silence=true, is_spell=true, type="corruption/sanguisuge", name = "sanguisuge", generic = true, description = "Manipulate the life force to power your own dark powers." } newTalentType{ no_silence=true, is_spell=true, type="corruption/sanguisuge", name = "sanguisuge", generic = true, description = "Manipulate the life force to power your own dark powers." }
newTalentType{ no_silence=true, is_spell=true, type="corruption/vim", name = "vim", generic = true, description = "Touch the very essence of your victims." }
newTalentType{ no_silence=true, is_spell=true, type="corruption/bone", name = "bone", description = "Harness the power of bones." } newTalentType{ no_silence=true, is_spell=true, type="corruption/bone", name = "bone", description = "Harness the power of bones." }
newTalentType{ no_silence=true, is_spell=true, type="corruption/hexes", name = "hexes", description = "Hex your foes, hindering and crippling them." } newTalentType{ no_silence=true, is_spell=true, type="corruption/hexes", name = "hexes", description = "Hex your foes, hindering and crippling them." }
newTalentType{ no_silence=true, is_spell=true, type="corruption/curses", name = "curses", description = "Curse your foes, hindering and crippling them." } newTalentType{ no_silence=true, is_spell=true, type="corruption/curses", name = "curses", description = "Curse your foes, hindering and crippling them." }
...@@ -27,7 +28,6 @@ newTalentType{ no_silence=true, is_spell=true, type="corruption/scourge", name = ...@@ -27,7 +28,6 @@ newTalentType{ no_silence=true, is_spell=true, type="corruption/scourge", name =
newTalentType{ no_silence=true, is_spell=true, type="corruption/reaving-combat", name = "reaving combat", description = "Enhanced melee combat through the dark arts." } newTalentType{ no_silence=true, is_spell=true, type="corruption/reaving-combat", name = "reaving combat", description = "Enhanced melee combat through the dark arts." }
newTalentType{ no_silence=true, is_spell=true, type="corruption/blood", name = "blood", description = "Harness the power of blood, both your own and your foes." } newTalentType{ no_silence=true, is_spell=true, type="corruption/blood", name = "blood", description = "Harness the power of blood, both your own and your foes." }
newTalentType{ no_silence=true, is_spell=true, type="corruption/blight", name = "blight", description = "Bring corruption and decay to all who oppose you." } newTalentType{ no_silence=true, is_spell=true, type="corruption/blight", name = "blight", description = "Bring corruption and decay to all who oppose you." }
newTalentType{ no_silence=true, is_spell=true, type="corruption/vim", name = "vim", description = "Touch the very essence of your victims." }
newTalentType{ no_silence=true, is_spell=true, type="corruption/shadowflame", name = "Shadowflame", description = "Harness the power of the demonic shadowflame." } newTalentType{ no_silence=true, is_spell=true, type="corruption/shadowflame", name = "Shadowflame", description = "Harness the power of the demonic shadowflame." }
-- Generic requires for corruptions based on talent level -- Generic requires for corruptions based on talent level
......
...@@ -120,9 +120,13 @@ newTalent{ ...@@ -120,9 +120,13 @@ newTalent{
cooldown = 60, cooldown = 60,
no_sustain_autoreset = true, no_sustain_autoreset = true,
no_npc_use = true, no_npc_use = true,
range = 10,
activate = function(self, t) activate = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t), talent=t} local tg = {type="hit", range=self:getTalentRange(t), talent=t}
local tx, ty, target = self:getTarget(tg) local tx, ty, target = self:getTarget(tg)
local _ _, tx, ty = self:canProject(tg, tx, ty)
if not tx or not ty or not target then return nil end
target = game.level.map(tx, ty, Map.ACTOR)
if not tx or not ty or not target then return nil end if not tx or not ty or not target then return nil end
game:playSoundNear(self, "talents/flame") game:playSoundNear(self, "talents/flame")
......
...@@ -42,126 +42,93 @@ newTalent{ ...@@ -42,126 +42,93 @@ newTalent{
} }
newTalent{ newTalent{
name = "Vimtouch", name = "Vimsense",
type = {"corruption/vim", 2}, type = {"corruption/vim", 2},
require = corrs_req2, require = corrs_req2,
points = 5, points = 5,
cooldown = 10, cooldown = 25,
vim = 30, vim = 25,
range = 20,
requires_target = true, requires_target = true,
no_npc_use = true,
action = function(self, t) action = function(self, t)
local tg = {type="ball", radius=3, range=self:getTalentRange(t), talent=t} local rad = 10
local x, y = self:getTarget(tg) self:setEffect(self.EFF_SENSE, 3 + self:getTalentLevel(t), {
if not x or not y then return nil end range = rad,
local dam = self:spellCrit(self:combatTalentSpellDamage(t, 28, 120)) actor = 1,
local nb = self:getTalentLevelRaw(t) on_detect = function(self, x, y)
self:project(tg, x, y, function(px, py) local a = game.level.map(x, y, engine.Map.ACTOR)
local target = game.level.map(px, py, Map.ACTOR) if not a or self:reactionToward(a) >= 0 then return end
if not target then return end a:setTarget(game.player)
a:setEffect(a.EFF_VIMSENSE, 2, {power=self:combatTalentSpellDamage(t, 10, 45)})
DamageType:get(DamageType.BLIGHT).projector(self, px, py, DamageType.BLIGHT, dam) end,
})
local effs = {} game:playSoundNear(self, "talents/spell_generic")
-- 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
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
end
end, nil, {type="slime"})
game:playSoundNear(self, "talents/slime")
return true return true
end, end,
info = function(self, t) info = function(self, t)
return ([[Project a corrupted blast of power that deals %0.2f blight damage and removes %d magical or physical effects from any creatures caught in the area. return ([[Feel the very existence of creatures around you for %d turns in a radius of 10.
The damage will increase with Magic stat.]]):format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 10, 120)), self:getTalentLevelRaw(t)) The evil touch will reduce their blight resistance by %d%% but also make them aware of you.
The damage will increase with Magic stat.]]):format(3 + self:getTalentLevel(t), self:combatTalentSpellDamage(t, 10, 45))
end, end,
} }
newTalent{ newTalent{
name = "Soul Drain", name = "Leech",
type = {"corruption/vim", 3}, type = {"corruption/vim", 3},
require = corrs_req3, require = corrs_req3,
mode = "passive",
points = 5, points = 5,
cooldown = 10,
vim = 12,
range = 20,
requires_target = true,
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(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
target:setEffect(target.EFF_CORROSIVE_WORM, 10, {src=self, dam=self:combatTalentSpellDamage(t, 10, 60), explosion=self:spellCrit(self:combatTalentSpellDamage(t, 10, 230))})
end)
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self, t) info = function(self, t)
return ([[Infect your target with a corrosive worm that deals %0.2f acid damage per turn. return ([[Each time a creature affected by vimsense hurts you you regain %0.2f vim.]]):
If the target dies while the worm is inside it will explode doing %0.2f acid damage in a radius of 4. format(3 + self:getTalentLevel(t) * 0.7)
The damage will increase with Magic stat.]]):
format(damDesc(self, DamageType.ACID, self:combatTalentSpellDamage(t, 10, 60)), damDesc(self, DamageType.ACID, self:combatTalentSpellDamage(t, 10, 230)))
end, end,
} }
newTalent{ newTalent{
name = "??????", name = "Dark Portal",
type = {"corruption/vim", 4}, type = {"corruption/vim", 4},
require = corrs_req4, require = corrs_req4,
points = 5, points = 5,
vim = 36, vim = 30,
cooldown = 30, cooldown = 15,
tactical = { tactical = {
ATTACKAREA = 20, ATTACKAREA = 5,
}, },
range = 15,
action = function(self, t) action = function(self, t)
local duration = 5 + self:getTalentLevel(t) local tg = {type="ball", radius=3, range=self:getTalentRange(t), talent=t}
local radius = 4 local x, y = self:getTarget(tg)
local dam = self:combatTalentSpellDamage(t, 12, 130) if not x or not y then return nil end
-- Add a lasting map effect local actors = {}
game.level.map:addEffect(self, self:project(tg, x, y, function(px, py)
self.x, self.y, duration, local target = game.level.map(px, py, Map.ACTOR)
DamageType.POISON, dam, if not target or target == self then return end
radius, if not target:canBe("teleport") then game.logSeen("%s resists the portal!") return end
5, nil, actors[#actors+1] = target
engine.Entity.new{alpha=100, display='', color_br=20, color_bg=220, color_bb=70}, end)
function(e) local _ _, x, y = self:canProject(tg, x, y)
e.x = e.src.x game.level.map:particleEmitter(x, y, 1, "demon_teleport")
e.y = e.src.y game.level.map:particleEmitter(self.x, self.y, 1, "demon_teleport")
return true
end, for i, a in ipairs(actors) do
false local tx, ty = util.findFreeGrid(self.x, self.y, 20, true, {[Map.ACTOR]=true})
) if tx and ty then a:move(tx, ty, true) end
if a:canBe("disease") then
local diseases = {{self.EFF_WEAKNESS_DISEASE, "str"}, {self.EFF_ROTTING_DISEASE,"con"}, {self.EFF_DECREPITUDE_DISEASE,"dex"}}
local disease = rng.table(diseases)
a:setEffect(disease[1], 6, {src=self, dam=self:combatTalentSpellDamage(t, 12, 80), [disease[2]]=self:combatTalentSpellDamage(t, 5, 25)})
end
end
local tx, ty = util.findFreeGrid(x, y, 20, true, {[Map.ACTOR]=true})
if tx and ty then self:move(tx, ty, true) end
game:playSoundNear(self, "talents/slime") game:playSoundNear(self, "talents/slime")
return true return true
end, end,
info = function(self, t) info = function(self, t)
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. return ([[Open a dark portal to the target zone, all creatures caught inside will be teleported to your location and you to theirs.
Poisoning is cumulative, the longer they stay in they higher the poison they take. All creatures(except you) traversing the portal will catch a random disease doing %0.2f blight damage per turn for 6 turns.
The damage and duration will increase with the Magic stat]]):format(damDesc(self, DamageType.NATURE, self:combatTalentSpellDamage(t, 12, 130)), 5 + self:getTalentLevel(t)) The damage will increase with the Magic stat]]):format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 12, 80)))
end, end,
} }
...@@ -410,6 +410,21 @@ newEffect{ ...@@ -410,6 +410,21 @@ newEffect{
end, end,
} }
newEffect{
name = "VIMSENSE",
desc = "Vimsense",
long_desc = function(self, eff) return ("Reduces blight resistance by %d%%."):format(eff.power) end,
type = "magical",
status = "detrimental",
parameters = { power=10 },
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("resists", {[DamageType.BLIGHT]=-eff.power})
end,
deactivate = function(self, eff)
self:removeTemporaryValue("resists", eff.tmpid)
end,
}
newEffect{ newEffect{
name = "SPEED", name = "SPEED",
desc = "Speed", desc = "Speed",
...@@ -694,6 +709,7 @@ newEffect{ ...@@ -694,6 +709,7 @@ newEffect{
eff.aid = self:addTemporaryValue("detect_actor", eff.actor) eff.aid = self:addTemporaryValue("detect_actor", eff.actor)
eff.oid = self:addTemporaryValue("detect_object", eff.object) eff.oid = self:addTemporaryValue("detect_object", eff.object)
eff.tid = self:addTemporaryValue("detect_trap", eff.trap) eff.tid = self:addTemporaryValue("detect_trap", eff.trap)
self.detect_function = eff.on_detect
game.level.map.changed = true game.level.map.changed = true
end, end,
deactivate = function(self, eff) deactivate = function(self, eff)
...@@ -701,6 +717,7 @@ newEffect{ ...@@ -701,6 +717,7 @@ newEffect{
self:removeTemporaryValue("detect_actor", eff.aid) self:removeTemporaryValue("detect_actor", eff.aid)
self:removeTemporaryValue("detect_object", eff.oid) self:removeTemporaryValue("detect_object", eff.oid)
self:removeTemporaryValue("detect_trap", eff.tid) self:removeTemporaryValue("detect_trap", eff.tid)
self.detect_function = nil
end, end,
} }
......
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