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

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@6497 51575b47-30f0-44d4-a5cc-537603b46e54
parent be67f918
No related branches found
No related tags found
No related merge requests found
......@@ -176,10 +176,10 @@ newBirthDescriptor{
["wild-gift/mucus"]={true, 0.3},
["wild-gift/ooze"]={true, 0.3},
["wild-gift/fungus"]={true, 0.3},
["wild-gift/oozing-blades"]={true, 0.3},
["wild-gift/corrosive-blades"]={true, 0.3},
["wild-gift/oozing-blades"]={false, 0.3},
["wild-gift/corrosive-blades"]={false, 0.3},
["wild-gift/moss"]={true, 0.3},
["wild-gift/malleable-body"]={true, 0.3},
-- ["wild-gift/malleable-body"]={true, 0.3},
["wild-gift/slime"]={true, 0.3},
},
talents = {
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012, 2013 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
-- Make the 2 main forks
local tx = tx * engine.Map.tile_w
local ty = ty * engine.Map.tile_h
local basesize = math.sqrt((ty*ty)+(tx*tx))
local basedir = math.atan2(ty, tx)
local points = {}
for fork_i = 1, 10 do
local bc = fork_i == 1 and 0 or rng.float(0.8, 1)
local c = 0.5
local a = 1 or rng.float(0.3, 0.6)
local size = fork_i == 1 and 8 or 0.5
local starta = basedir+math.pi/2
local starts = rng.range(-12, 12)
points[#points+1] = {bc=bc, c=c, a=a, size=size, x=math.cos(starta) * starts, y=math.sin(starta) * starts, prev=-1}
local nb = fork_i == 1 and 2 or 6
for i = 0, nb - 1 do
-- Split point in the segment
local split = rng.range(0, basesize / nb) + i * (basesize / nb)
--[[
local dev = math.rad(rng.range(-8, 8))
points[#points+1] = {
bc=bc, c=c, a=a,
movea=basedir+dev+math.pi/2,
size=size + rng.range(-2, 2),
x=math.cos(basedir+dev) * split,
y=math.sin(basedir+dev) * split,
prev=#points-1
}
--]]
-- [[
local dev = rng.range(-8, 8) * (9 + fork_i) / 10
points[#points+1] = {
bc=bc, c=c, a=a,
movea=basedir+dev+math.pi/2,
size=size + rng.range(-2, 2),
x=math.cos(basedir) * split + math.cos(basedir+math.pi/2) * dev,
y=math.sin(basedir) * split + math.sin(basedir+math.pi/2) * dev,
prev=#points-1
}
--]]
end
points[#points+1] = {bc=bc, c=c, a=a, size=size, x=tx, y=ty, prev=#points-1}
end
local nbp = #points
-- Populate the lightning based on the forks
return { blend_mode=core.particles.BLEND_ADDITIVE, engine=core.particles.ENGINE_LINES, generator = function()
local p = table.remove(points, 1)
return {
life = 12, trail=p.prev,
size = p.size, sizev = 0, sizea = 0,
x = p.x, xv = 0, xa = 0,
y = p.y, yv = 0, ya = 0,
dir = p.movea, dirv = 0, dira = 0,
vel = rng.float(-1, 1), velv = 0, vela = 0,
r = p.bc / 5, rv = 0, ra = 0,
g = p.c, gv = 0, ga = 0,
b = p.bc / 5, bv = 0, ba = 0,
a = p.a, av = 0, aa = -0.04,
}
end, },
function(self)
if nbp > 0 then
self.ps:emit(10)
nbp = nbp - 10
end
end,
nbp, "particles_images/beam"
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012, 2013 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 = "Acidbeam",
type = {"wild-gift/corrosive-blades", 1},
require = gifts_req_high1,
points = 5,
equilibrium = 4,
cooldown = 3,
tactical = { ATTACKAREA = {ACID=2} },
on_pre_use = function(self, t)
local main, off = self:hasPsiblades(true, true)
return main and off
end,
range = 10,
direct_hit = true,
reflectable = true,
requires_target = true,
target = function(self, t)
return {type="beam", range=self:getTalentRange(t), talent=t}
end,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 20, 290) end,
action = function(self, t)
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local dam = self:spellCrit(t.getDamage(self, t))
self:project(tg, x, y, DamageType.ACID, dam)
local _ _, x, y = self:canProject(tg, x, y)
game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(x-self.x), math.abs(y-self.y)), "ooze_beam", {tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self, t)
local dam = t.getDamage(self, t)
return ([[Channel acid through your psiblades, extending their reach to create a beam doing %0.2f acid damage.
Damage increase with Mindpower.]]):
format(damDesc(self, DamageType.ACID, dam))
end,
}
newTalent{
name = "Corrosive Nature",
type = {"wild-gift/corrosive-blades", 2},
require = gifts_req_high2,
points = 5,
equilibrium = 10,
cooldown = 10,
range = 7,
radius = function(self, t) return 3 + (self:getTalentLevel(t) >= 5 and 1 or 0) end,
target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), friendlyfire=false} end,
tactical = { ATTACKAREA = { ACID = 2, NATURE = 1 } },
requires_target = true,
getDamage = function(self, t) return self:combatTalentMindDamage(t, 20, 220) end,
action = function(self, t)
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local grids, px, py = self:project(tg, x, y, DamageType.ACID, self:mindCrit(t.getDamage(self, t)))
if self:knowTalent(self.T_MUCUS) then self:callTalent(self.T_MUCUS, nil, px, py, tg.radius) end
game.level.map:particleEmitter(px, py, tg.radius, "acidflash", {radius=tg.radius, tx=px, ty=py})
local tgts = {}
for x, ys in pairs(grids) do for y, _ in pairs(ys) do
local target = game.level.map(x, y, Map.ACTOR)
if target and self:reactionToward(target) < 0 then tgts[#tgts+1] = target end
end end
if #tgts > 0 then
if game.party:hasMember(self) then
for act, def in pairs(game.party.members) do
local target = rng.table(tgts)
if act.summoner and act.summoner == self and act.is_mucus_ooze then
act.inc_damage.all = (act.inc_damage.all or 0) - 50
act:forceUseTalent(act.T_MUCUS_OOZE_SPIT, {force_target=target, ignore_energy=true})
act.inc_damage.all = (act.inc_damage.all or 0) + 50
end
end
else
for _, act in pairs(game.level.entities) do
local target = rng.table(tgts)
if act.summoner and act.summoner == self and act.is_mucus_ooze then
act.inc_damage.all = (act.inc_damage.all or 0) - 50
act:forceUseTalent(act.T_MUCUS_OOZE_SPIT, {force_target=target, ignore_energy=true})
act.inc_damage.all = (act.inc_damage.all or 0) + 50
end
end
end
end
game:playSoundNear(self, "talents/cloud")
return true
end,
info = function(self, t)
local dam = t.getDamage(self, t)
return ([[You call upon nature to turn the ground into an acidic explosion in a radius %d, dealing %0.2f acid damage to all creatures and creating mucus under it.
Also if you have any Mucus Oozes active they will, if in line of sight, instantly throw a slime spit (at reduced power) at one of the target hit by the splash.
Damage will increase with Mindpower.]]):
format(self:getTalentRadius(t), damDesc(self, DamageType.ACID, dam))
end,
}
newTalent{
name = "Corrosive Seeds",
type = {"wild-gift/corrosive-blades", 3},
require = gifts_req_high3,
points = 5,
mode = "passive",
getMax = function(self, t) return math.max(1, math.floor(self:getCun() / 10)) end,
getChance = function(self, t) return 10 + self:combatTalentMindDamage(t, 5, 300) / 10 end,
spawn = function(self, t)
if checkMaxSummon(self, true) or not self:canBe("summon") then return end
local ps = {}
for i, e in ipairs(game.level.map.effects) do
if e.damtype == DamageType.MUCUS then
for x, ys in pairs(e.grids) do for y, _ in pairs(ys) do
if self:canMove(x, y) then ps[#ps+1] = {x=x, y=y} end
end end
end
end
if #ps == 0 then return end
local p = rng.table(ps)
local m = mod.class.NPC.new{
type = "vermin", subtype = "oozes",
display = "j", color=colors.GREEN, image = "npc/vermin_oozes_green_ooze.png",
name = "mucus ooze",
desc = "It's made from mucus and it's oozing.",
sound_moam = {"creatures/jelly/jelly_%d", 1, 3},
sound_die = {"creatures/jelly/jelly_die_%d", 1, 2},
sound_random = {"creatures/jelly/jelly_%d", 1, 3},
body = { INVEN = 10 },
autolevel = "wildcaster",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { str=10, dex=10, mag=3, con=self:getTalentLevel(t) / 5 * 4, wil=self:getWil(), cun=self:getCun() },
global_speed_base = 0.7,
combat = {sound="creatures/jelly/jelly_hit"},
combat_armor = 1, combat_def = 1,
rank = 1,
size_category = 3,
infravision = 10,
cut_immune = 1,
blind_immune = 1,
resists = { [DamageType.LIGHT] = -50, [DamageType.COLD] = -50 },
fear_immune = 1,
blood_color = colors.GREEN,
level_range = {self.level, self.level}, exp_worth = 0,
max_life = 30,
combat = { dam=5, atk=0, apr=5, damtype=DamageType.POISON },
summoner = self, summoner_gain_exp=true, wild_gift_summon=true, is_mucus_ooze = true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
max_summon_time = math.ceil(self:getTalentLevel(t)) + 5,
}
m:learnTalent(m.T_MUCUS_OOZE_SPIT, true, self:getTalentLevelRaw(t))
if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_VIRULENT_DISEASE, true, 3) end
setupSummon(self, m, p.x, p.y)
return true
end,
on_crit = function(self, t)
if game.party:hasMember(self) then
for act, def in pairs(game.party.members) do
if act.summoner and act.summoner == self and act.is_mucus_ooze then
act.summon_time = util.bound(act.summon_time + 2, 1, act.max_summon_time)
end
end
else
for _, act in pairs(game.level.entities) do
if act.summoner and act.summoner == self and act.is_mucus_ooze then
act.summon_time = util.bound(act.summon_time + 2, 1, act.max_summon_time)
end
end
end
end,
info = function(self, t)
return ([[Your mucus is brought to near sentience. Each turn there is a %d%% chance that a random spot of your mucus will spawn a Mucus Ooze.
Mucus Oozes will attack any of your foes by spitting slime at them.
You may have up to %d Oozes active at any time (based on your Cunning).
Any time you deal a mental critical, all your Mucus Oozes' remaining time will increase by 2.
The effect will increase with your Mindpower.]]):
format(t.getChance(self, t), t.getMax(self, t))
end,
}
newTalent{
name = "Acidic Soil",
type = {"wild-gift/corrosive-blades", 4},
require = gifts_req_high4,
points = 5,
cooldown = 7,
equilibrium = 10,
range = 10,
tactical = { CLOSEIN = 2 },
getNb = function(self, t) return 1 + math.ceil(self:getTalentLevel(t) / 3, 0, 3) end,
getEnergy = function(self, t)
local l = self:getTalentLevel(t)
if l <= 1 then return 1
elseif l <= 2 then return 0.9
elseif l <= 3 then return 0.7
elseif l <= 4 then return 0.5
elseif l <= 5 then return 0.4
elseif l <= 6 then return 0.3
elseif l <= 7 then return 0.2
elseif l <= 8 then return 0.1
elseif l <= 9 then return 0.05
elseif l <= 10 then return 0.03
elseif l <= 11 then return 0.02
elseif l <= 12 then return 0.01
end
end,
on_pre_use = function(self, t)
return game.level and game.level.map and isOnMucus(game.level.map, self.x, self.y)
end,
action = function(self, t)
local tg = {type="hit", nolock=true, pass_terrain=true, nowarning=true, range=self:getTalentRange(t), requires_knowledge=false}
x, y = self:getTarget(tg)
if not x then return nil end
-- Target code does not restrict the target coordinates to the range, it lets the project function do it
-- but we cant ...
local _ _, x, y = self:canProject(tg, x, y)
if not x then return nil end
if not isOnMucus(game.level.map, x, y) then return nil end
if not self:canMove(x, y) then return nil end
local energy = 1 - t.getEnergy(self, t)
self.energy.value = self.energy.value + game.energy_to_act * self.energy.mod * energy
self:removeEffectsFilter(function(t) return t.type == "physical" or t.type == "magical" end, t.getNb(self, t))
game.level.map:particleEmitter(self.x, self.y, 1, "slime")
self:move(x, y, true)
game.level.map:particleEmitter(self.x, self.y, 1, "slime")
return true
end,
info = function(self, t)
local nb = t.getNb(self, t)
local energy = t.getEnergy(self, t)
return ([[You temporarily merge with your mucus, cleasing you from %d physical or magical effects.
You can then reappear on any tile in sight that is also covered by mucus.
This takes %d%% of a turn to do.
Only works when standing over mucus.]]):
format(nb, (energy) * 100)
end,
}
......@@ -38,6 +38,8 @@ newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/
newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/mucus", name = "mucus", description = "Cover the floor with natural mucus." }
newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/ooze", name = "ooze", description = "Your body and internal organs are becoming more ooze-like in nature, allowing you to spawn more of you." }
newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/malleable-body", name = "malleable body", description = "Your body's anatomy is starting to blur." }
newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/oozing-blades", name = "oozing blades", description = "You channel ooze through your psiblades." }
newTalentType{ allow_random=true, is_mind=true, is_nature=true, type="wild-gift/corrosive-blades", name = "corrosive blades", description = "You channel acid through your psiblades." }
-- Generic requires for gifts based on talent level
gifts_req1 = {
......@@ -200,6 +202,8 @@ load("/data/talents/gifts/fungus.lua")
load("/data/talents/gifts/mucus.lua")
load("/data/talents/gifts/ooze.lua")
load("/data/talents/gifts/malleable-body.lua")
load("/data/talents/gifts/oozing-blades.lua")
load("/data/talents/gifts/corrosive-blades.lua")
load("/data/talents/gifts/sand-drake.lua")
load("/data/talents/gifts/fire-drake.lua")
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012, 2013 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 = "Oozebeam",
type = {"wild-gift/oozing-blades", 1},
require = gifts_req_high1,
points = 5,
equilibrium = 4,
cooldown = 3,
tactical = { ATTACKAREA = {NATURE=2} },
on_pre_use = function(self, t)
local main, off = self:hasPsiblades(true, true)
return main and off
end,
range = 10,
direct_hit = true,
reflectable = true,
requires_target = true,
target = function(self, t)
return {type="beam", range=self:getTalentRange(t), talent=t}
end,
getDamage = function(self, t) return self:combatTalentSpellDamage(t, 20, 290) end,
action = function(self, t)
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local dam = self:spellCrit(t.getDamage(self, t))
self:project(tg, x, y, DamageType.SLIME, dam)
local _ _, x, y = self:canProject(tg, x, y)
game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(x-self.x), math.abs(y-self.y)), "ooze_beam", {tx=x-self.x, ty=y-self.y})
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self, t)
local dam = t.getDamage(self, t)
return ([[Channel slime through your psiblades, extending their reach to create a beam doing %0.2f slime damage.
Damage increase with Mindpower.]]):
format(damDesc(self, DamageType.NATURE, dam))
end,
}
newTalent{
name = "Mind Parasite",
type = {"wild-gift/oozing-blades", 2},
require = gifts_req_high2,
points = 5,
equilibrium = 10,
cooldown = 10,
range = 7,
radius = function(self, t) return 3 + (self:getTalentLevel(t) >= 5 and 1 or 0) end,
target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), friendlyfire=false} end,
tactical = { ATTACKAREA = { ACID = 2, NATURE = 1 } },
requires_target = true,
getDamage = function(self, t) return self:combatTalentMindDamage(t, 20, 220) end,
action = function(self, t)
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local grids, px, py = self:project(tg, x, y, DamageType.ACID, self:mindCrit(t.getDamage(self, t)))
if self:knowTalent(self.T_MUCUS) then self:callTalent(self.T_MUCUS, nil, px, py, tg.radius) end
game.level.map:particleEmitter(px, py, tg.radius, "acidflash", {radius=tg.radius, tx=px, ty=py})
local tgts = {}
for x, ys in pairs(grids) do for y, _ in pairs(ys) do
local target = game.level.map(x, y, Map.ACTOR)
if target and self:reactionToward(target) < 0 then tgts[#tgts+1] = target end
end end
if #tgts > 0 then
if game.party:hasMember(self) then
for act, def in pairs(game.party.members) do
local target = rng.table(tgts)
if act.summoner and act.summoner == self and act.is_mucus_ooze then
act.inc_damage.all = (act.inc_damage.all or 0) - 50
act:forceUseTalent(act.T_MUCUS_OOZE_SPIT, {force_target=target, ignore_energy=true})
act.inc_damage.all = (act.inc_damage.all or 0) + 50
end
end
else
for _, act in pairs(game.level.entities) do
local target = rng.table(tgts)
if act.summoner and act.summoner == self and act.is_mucus_ooze then
act.inc_damage.all = (act.inc_damage.all or 0) - 50
act:forceUseTalent(act.T_MUCUS_OOZE_SPIT, {force_target=target, ignore_energy=true})
act.inc_damage.all = (act.inc_damage.all or 0) + 50
end
end
end
end
game:playSoundNear(self, "talents/cloud")
return true
end,
info = function(self, t)
local dam = t.getDamage(self, t)
return ([[You call upon nature to turn the ground into an acidic explosion in a radius %d, dealing %0.2f acid damage to all creatures and creating mucus under it.
Also if you have any Mucus Oozes active they will, if in line of sight, instantly throw a slime spit (at reduced power) at one of the target hit by the splash.
Damage will increase with Mindpower.]]):
format(self:getTalentRadius(t), damDesc(self, DamageType.ACID, dam))
end,
}
newTalent{
name = "??AzdazdaZd",
type = {"wild-gift/oozing-blades", 3},
require = gifts_req_high3,
points = 5,
mode = "passive",
getMax = function(self, t) return math.max(1, math.floor(self:getCun() / 10)) end,
getChance = function(self, t) return 10 + self:combatTalentMindDamage(t, 5, 300) / 10 end,
spawn = function(self, t)
if checkMaxSummon(self, true) or not self:canBe("summon") then return end
local ps = {}
for i, e in ipairs(game.level.map.effects) do
if e.damtype == DamageType.MUCUS then
for x, ys in pairs(e.grids) do for y, _ in pairs(ys) do
if self:canMove(x, y) then ps[#ps+1] = {x=x, y=y} end
end end
end
end
if #ps == 0 then return end
local p = rng.table(ps)
local m = mod.class.NPC.new{
type = "vermin", subtype = "oozes",
display = "j", color=colors.GREEN, image = "npc/vermin_oozes_green_ooze.png",
name = "mucus ooze",
desc = "It's made from mucus and it's oozing.",
sound_moam = {"creatures/jelly/jelly_%d", 1, 3},
sound_die = {"creatures/jelly/jelly_die_%d", 1, 2},
sound_random = {"creatures/jelly/jelly_%d", 1, 3},
body = { INVEN = 10 },
autolevel = "wildcaster",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=1, },
stats = { str=10, dex=10, mag=3, con=self:getTalentLevel(t) / 5 * 4, wil=self:getWil(), cun=self:getCun() },
global_speed_base = 0.7,
combat = {sound="creatures/jelly/jelly_hit"},
combat_armor = 1, combat_def = 1,
rank = 1,
size_category = 3,
infravision = 10,
cut_immune = 1,
blind_immune = 1,
resists = { [DamageType.LIGHT] = -50, [DamageType.COLD] = -50 },
fear_immune = 1,
blood_color = colors.GREEN,
level_range = {self.level, self.level}, exp_worth = 0,
max_life = 30,
combat = { dam=5, atk=0, apr=5, damtype=DamageType.POISON },
summoner = self, summoner_gain_exp=true, wild_gift_summon=true, is_mucus_ooze = true,
summon_time = math.ceil(self:getTalentLevel(t)) + 5,
max_summon_time = math.ceil(self:getTalentLevel(t)) + 5,
}
m:learnTalent(m.T_MUCUS_OOZE_SPIT, true, self:getTalentLevelRaw(t))
if self:knowTalent(self.T_BLIGHTED_SUMMONING) then m:learnTalent(m.T_VIRULENT_DISEASE, true, 3) end
setupSummon(self, m, p.x, p.y)
return true
end,
on_crit = function(self, t)
if game.party:hasMember(self) then
for act, def in pairs(game.party.members) do
if act.summoner and act.summoner == self and act.is_mucus_ooze then
act.summon_time = util.bound(act.summon_time + 2, 1, act.max_summon_time)
end
end
else
for _, act in pairs(game.level.entities) do
if act.summoner and act.summoner == self and act.is_mucus_ooze then
act.summon_time = util.bound(act.summon_time + 2, 1, act.max_summon_time)
end
end
end
end,
info = function(self, t)
return ([[Your mucus is brought to near sentience. Each turn there is a %d%% chance that a random spot of your mucus will spawn a Mucus Ooze.
Mucus Oozes will attack any of your foes by spitting slime at them.
You may have up to %d Oozes active at any time (based on your Cunning).
Any time you deal a mental critical, all your Mucus Oozes' remaining time will increase by 2.
The effect will increase with your Mindpower.]]):
format(t.getChance(self, t), t.getMax(self, t))
end,
}
newTalent{
name = "Unstoppable Nature",
type = {"wild-gift/oozing-blades", 4},
require = gifts_req_high4,
points = 5,
cooldown = 7,
equilibrium = 10,
range = 10,
tactical = { CLOSEIN = 2 },
getNb = function(self, t) return 1 + math.ceil(self:getTalentLevel(t) / 3, 0, 3) end,
getEnergy = function(self, t)
local l = self:getTalentLevel(t)
if l <= 1 then return 1
elseif l <= 2 then return 0.9
elseif l <= 3 then return 0.7
elseif l <= 4 then return 0.5
elseif l <= 5 then return 0.4
elseif l <= 6 then return 0.3
elseif l <= 7 then return 0.2
elseif l <= 8 then return 0.1
elseif l <= 9 then return 0.05
elseif l <= 10 then return 0.03
elseif l <= 11 then return 0.02
elseif l <= 12 then return 0.01
end
end,
on_pre_use = function(self, t)
return game.level and game.level.map and isOnMucus(game.level.map, self.x, self.y)
end,
action = function(self, t)
local tg = {type="hit", nolock=true, pass_terrain=true, nowarning=true, range=self:getTalentRange(t), requires_knowledge=false}
x, y = self:getTarget(tg)
if not x then return nil end
-- Target code does not restrict the target coordinates to the range, it lets the project function do it
-- but we cant ...
local _ _, x, y = self:canProject(tg, x, y)
if not x then return nil end
if not isOnMucus(game.level.map, x, y) then return nil end
if not self:canMove(x, y) then return nil end
local energy = 1 - t.getEnergy(self, t)
self.energy.value = self.energy.value + game.energy_to_act * self.energy.mod * energy
self:removeEffectsFilter(function(t) return t.type == "physical" or t.type == "magical" end, t.getNb(self, t))
game.level.map:particleEmitter(self.x, self.y, 1, "slime")
self:move(x, y, true)
game.level.map:particleEmitter(self.x, self.y, 1, "slime")
return true
end,
info = function(self, t)
local nb = t.getNb(self, t)
local energy = t.getEnergy(self, t)
return ([[You temporarily merge with your mucus, cleasing you from %d physical or magical effects.
You can then reappear on any tile in sight that is also covered by mucus.
This takes %d%% of a turn to do.
Only works when standing over mucus.]]):
format(nb, (energy) * 100)
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