Skip to content
Snippets Groups Projects
Commit d1f0e2f3 authored by Chris Davidson's avatar Chris Davidson
Browse files

Implement working versions of Blink, Consume Affliction, Stormshield, and...

Implement working versions of Blink, Consume Affliction, Stormshield, and Ethereal with *very* ballparked numbers
parent 49ffe1b8
No related branches found
No related tags found
1 merge request!425Inscription revamp
......@@ -336,9 +336,72 @@ newEntity{ base = "BASE_RUNE",
},
inscription_talent = "RUNE:_MANASURGE",
}
newEntity{ base = "BASE_RUNE",
name = "blink rune",
level_range = {5, 50},
rarity = 15,
cost = 20,
material_level = 1,
inscription_kind = "movement",
inscription_data = {
cooldown = resolvers.rngrange(8, 15),
distance = resolvers.mbonus_level(5, 2, function(e, v) return v * 0.06 end),
use_stat_mod = 0.02,
},
inscription_talent = "RUNE:_BLINK",
}
newEntity{ base = "BASE_RUNE",
name = "stormshield rune",
level_range = {5, 50},
rarity = 15,
cost = 20,
material_level = 1,
inscription_kind = "protect",
inscription_data = {
cooldown = resolvers.rngrange(12, 17),
dur = 3,
threshold = resolvers.mbonus_level(100, 10), -- Not strictly good or bad so we use a high variance
blocks = resolvers.mbonus_level(10, 1, function(e, v) return v * 0.06 end),
use_stat_mod = 0.03,
},
inscription_talent = "RUNE:_STORMSHIELD",
}
newEntity{ base = "BASE_RUNE",
name = "ethereal rune",
level_range = {5, 50},
rarity = 15,
cost = 20,
material_level = 1,
inscription_kind = "protect",
inscription_data = {
cooldown = resolvers.rngrange(16, 22),
dur = resolvers.mbonus_level(5, 3),
power = resolvers.mbonus_level(50, 10, function(e, v) return v * 0.06 end),
damage = resolvers.mbonus_level(40, 20),
use_stat_mod = 0.2,
},
inscription_talent = "RUNE:_ETHEREAL",
}
-----------------------------------------------------------
-- Taints
-----------------------------------------------------------
newEntity{ base = "BASE_TAINT",
name = "taint of consume affliction",
level_range = {1, 50},
rarity = 20,
cost = 10,
material_level = 1,
inscription_kind = "heal",
inscription_data = {
cooldown = resolvers.rngrange(12, 17),
heal = resolvers.mbonus_level(150, 50, function(e, v) return v * 0.06 end),
use_stat_mod = 1.5,
},
inscription_talent = "TAINT:_CONSUME_AFFLICTION",
}
--[[
newEntity{ base = "BASE_TAINT",
......@@ -381,8 +444,7 @@ newEntity{ base = "BASE_TAINT",
-----------------------------------------------------------
-- Legacy/depreciated
-----------------------------------------------------------
newEntity{ base = "BASE_RUNE",
--[[newEntity{ base = "BASE_RUNE",
name = "lightning rune",
level_range = {25, 50},
rarity = 0,
......@@ -503,4 +565,4 @@ newEntity{ base = "BASE_INFUSION",
},
inscription_talent = "INFUSION:_SUN",
}
--]]
......@@ -349,6 +349,14 @@ newInscription{
-- Runes
-----------------------------------------------------------------------
local function attack_rune(self, btid)
for tid, lev in pairs(self.talents) do
if tid ~= btid and self.talents_def[tid].is_attack_rune and not self.talents_cd[tid] then
self.talents_cd[tid] = 1
end
end
end
newInscription{
name = "Rune: Teleportation",
type = {"inscriptions/runes", 1},
......@@ -717,7 +725,7 @@ newInscription{
tactical = { CLOSEIN = 2 },
action = function(self, t)
local data = self:getInscriptionData(t.short_name)
local tg = {type="ball", nolock=true, pass_terrain=true, nowarning=true, range=data.range + data.inc_stat, radius=1, requires_knowledge=false}
local tg = {type="beam", nolock=true, pass_terrain=false, nowarning=true, range=data.distance + data.inc_stat, radius=1, requires_knowledge=false}
local x, y = self:getTarget(tg)
if not x then return end
if not self:hasLOS(x, y) then return end
......@@ -725,7 +733,6 @@ newInscription{
local _ _, x, y = self:canProject(tg, x, y)
local rad = 1
game.level.map:particleEmitter(self.x, self.y, 1, "teleport")
self:teleportRandom(x, y, rad)
game.level.map:particleEmitter(self.x, self.y, 1, "teleport")
......@@ -733,11 +740,11 @@ newInscription{
end,
info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[Activate the rune to teleport up to %d spaces within line of sight.]]):format(data.range + data.inc_stat)
return ([[Activate the rune to teleport up to %d spaces within line of sight.]]):format(data.distance + data.inc_stat)
end,
short_info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[range %d]]):format(data.range + data.inc_stat)
return ([[range %d]]):format(data.distance + data.inc_stat)
end,
}
......@@ -749,11 +756,17 @@ newInscription{
is_spell = true,
--tactical = { DEFEND = 3, ESCAPE = 2 },
getDur = function(self, t) return 5 end,
getDamageMod = function(self, t) return 50 end, -- placeholder
getPower = function(self, t) return 50 end, -- placeholder
getDamageMod = function(self, t)
local data = self:getInscriptionData(t.short_name)
return data.damage
end,
getPower = function(self, t)
local data = self:getInscriptionData(t.short_name)
return data.power + data.inc_stat
end,
action = function(self, t)
local data = self:getInscriptionData(t.short_name)
self:setEffect(self.EFF_ETHEREAL, t.getDur(self, t), {power=t.getPower(self, t), t.getDamageMod(self, t)})
self:setEffect(self.EFF_ETHEREAL, t.getDur(self, t), {power=t.getPower(self, t), damage=t.getDamageMod(self, t)})
return true
end,
info = function(self, t)
......@@ -778,9 +791,18 @@ newInscription{
points = 1,
is_spell = true,
--tactical = { DEFEND = 3, ESCAPE = 2 },
getDur = function(self, t) return 5 end,
getThreshold = function(self, t) return 50 end, -- placeholder
getBlocks = function(self, t) return 10 end, -- placeholder
getDur = function(self, t)
local data = self:getInscriptionData(t.short_name)
return data.dur
end,
getThreshold = function(self, t)
local data = self:getInscriptionData(t.short_name)
return data.threshold
end,
getBlocks = function(self, t)
local data = self:getInscriptionData(t.short_name)
return data.blocks + data.inc_stat
end,
action = function(self, t)
local data = self:getInscriptionData(t.short_name)
self:setEffect(self.EFF_STORMSHIELD, t.getDur(self, t), {threshold=t.getThreshold(self, t), blocks=t.getBlocks(self, t)})
......@@ -793,13 +815,14 @@ newInscription{
:format(t.getDur(self, t), t.getThreshold(self, t), t.getBlocks(self, t) )
end,
short_info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[threshold %d, blocks %d, %d turns]]):format(t.getThreshold(self, t), t.getBlocks(self, t), t.getDur(self, t) )
end,
}
-----------------------------------------------------------------------
-- Taints: Arcane, activating a taint costs a % of maximum life representing the strain on the body and differentiating them from runes
-----------------------------------------------------------------------
-- Not quite moving to legacy.. If gloves of dispersion are acceptable than some form of this might be too.
-- But probably not.
newInscription{
name = "Taint: Devourer",
type = {"inscriptions/taints", 1},
......@@ -882,7 +905,8 @@ newInscription{
end,
info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[Activate the taint on a foe, removing up to %d magical or physical effects or sustains from it and healing you for %d for each effect.]]):format(data.effects, data.heal + data.inc_stat)
return ([[#RED#Lose 20%% of your maximum life.#LAST#
Activate the taint on a foe, removing up to %d magical or physical effects or sustains from it and healing you for %d for each effect.]]):format(data.effects, data.heal + data.inc_stat)
end,
short_info = function(self, t)
local data = self:getInscriptionData(t.short_name)
......@@ -893,34 +917,37 @@ newInscription{
-- Unreliable for healing when used to cleanse only 1-2 effects
newInscription{
name = "Taint: Consume Affliction",
type = {"inscriptions/infusions", 1},
type = {"inscriptions/taints", 1},
points = 1,
tactical = { HEAL = 2 },
is_heal = true,
is_spell = true,
no_energy = true,
getHeal = function(self, t) return 1 end,
getHeal = function(self, t)
local data = self:getInscriptionData(t.short_name)
return data.heal + data.inc_stat
end,
action = function(self, t)
self:takeHit(self.max_life * 0.2, self)
self:removeEffectsFilter({subtype={["cross tier"] = true}, status="detrimental"}, 3)
local consumed = 0
consumed = consumed + self:removeEffectsFilter(function(e) return e.type.physical end, 1)
consumed = consumed + self:removeEffectsFilter(function(e) return e.type.magical end, 1)
consumed = consumed + self:removeEffectsFilter(function(e) return e.subtype.mental end, 1)
consumed = consumed + self:removeEffectsFilter({type="physical", status="detrimental"}, 1)
consumed = consumed + self:removeEffectsFilter({type="magical", status="detrimental"}, 1)
consumed = consumed + self:removeEffectsFilter({type="mental", status="detrimental"}, 1)
self:attr("allow_on_heal", 1)
self:heal(t.getHeal(self, t) * consumed, t)
self:attr("allow_on_heal", -1)
return true
end,
info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[Lose 20%% of your maximum life.
Activate the taint to instantly cleanse 1 physical, mental, and magical effect. For each effect cleansed you heal for %d life. ]]):format(t.getHeal(self, t))
return ([[#RED#Lose 20%% of your maximum life.#LAST#
Activate the taint to instantly cleanse 1 physical, mental, and magical effect. For each effect cleansed you heal for %d life.
Crosstier effects are cleansed free but do not count towards the heal.]]):format(t.getHeal(self, t))
end,
short_info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[heal %d]]):format(t.getHeal(self, t))
end,
}
......@@ -1143,14 +1170,6 @@ newInscription{
end,
}
local function attack_rune(self, btid)
for tid, lev in pairs(self.talents) do
if tid ~= btid and self.talents_def[tid].is_attack_rune and not self.talents_cd[tid] then
self.talents_cd[tid] = 1
end
end
end
newInscription{
name = "Rune: Phase Door",
type = {"inscriptions/runes", 1},
......
......@@ -309,6 +309,71 @@ newEffect{
end,
}
newEffect{
name = "ETHEREAL", image = "effects/invisibility.png",
desc = "Ethereal",
long_desc = function(self, eff) return ("Invisible (power %d), reduced damage taken and dealt by %d%%, able to walk through walls."):format(eff.power, eff.damage) end,
type = "magical",
subtype = { phantasm=true },
status = "beneficial",
parameters = { power=10, damage=0},
on_gain = function(self, err) return "#Target# phases partially out of reality.", "+Ethereal" end,
on_lose = function(self, err) return "#Target# is no longer ethereal.", "-Ethereal" end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("invisible", eff.power)
eff.penaltyid = self:addTemporaryValue("invisible_damage_penalty", eff.damage)
eff.damid = self:addTemporaryValue("resists", {all = eff.damage})
eff.wallid = self:addTemporaryValue("can_pass", {pass_wall=20})
if not self.shader then
eff.set_shader = true
self.shader = "invis_edge"
self:removeAllMOs()
game.level.map:updateMap(self.x, self.y)
end
end,
deactivate = function(self, eff)
if eff.set_shader then
self.shader = nil
self:removeAllMOs()
game.level.map:updateMap(self.x, self.y)
end
self:removeTemporaryValue("invisible", eff.tmpid)
self:removeTemporaryValue("invisible_damage_penalty", eff.penaltyid)
self:removeTemporaryValue("resists", eff.damid)
self:removeTemporaryValue("can_pass", eff.wallid)
self:resetCanSeeCacheOf()
end,
}
newEffect{
name = "STORMSHIELD", image = "talents/suncloak.png",
desc = "Stormshield",
long_desc = function(self, eff) return ("The target is protected a raging storm deflecting up to %d instances of damage over %d."):
format(eff.blocks, eff.threshold) end,
type = "magical",
subtype = { lightning=true, },
status = "beneficial",
parameters = {threshold = 1, blocks = 1,},
on_gain = function(self, err) return "#Target# summons a storm to protect him!", "+Stormshield" end,
on_lose = function(self, err) return "#Target#'s storm dissipates.", "-Stormshield" end,
activate = function(self, eff)
end,
deactivate = function(self, eff)
end,
callbackOnTakeDamage = function(self, eff, src, x, y, type, dam, state)
if dam < eff.threshold then return end
local d_color = DamageType:get(type).text_color or "#ORCHID#"
game:delayedLogDamage(src, self, 0, ("%s(%d stormshielded#LAST#%s)#LAST#"):format(d_color, dam, d_color), false)
eff.blocks = eff.blocks - 1
if eff.blocks <= 0 then
src:logCombat(self, "#BLUE##Target#'s stormshield is out of charges and disspitates!#LAST#.")
self:removeEffect(self.EFF_STORMSHIELD)
end
return {dam = 0}
end,
}
newEffect{
name = "VIMSENSE_DETECT", image = "talents/vimsense.png",
......
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