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

fix meditation esp range

git-svn-id: http://svn.net-core.org/repos/t-engine4@5717 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9f8a3530
No related branches found
No related tags found
No related merge requests found
......@@ -619,7 +619,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
-- Reactive target on hit damage
if hitted then for typ, dam in pairs(target.on_melee_hit) do
if dam > 0 then
if (type(dam) == "number" and dam > 0) or (dam.dam and dam.dam > 0) then
DamageType:get(typ).projector(target, self.x, self.y, typ, dam)
end
end end
......
......@@ -2342,11 +2342,12 @@ newDamageType{
newDamageType{
name = "acid disarm", type = "ACID_DISARM", text_color = "#GREEN#",
projector = function(src, x, y, type, dam)
local realdam = DamageType:get(DamageType.ACID).projector(src, x, y, DamageType.ACID, dam)
if _G.type(dam) == "number" then dam = {chance=25, dam=dam} end
local realdam = DamageType:get(DamageType.ACID).projector(src, x, y, DamageType.ACID, dam.dam)
local target = game.level.map(x, y, Map.ACTOR)
if target and rng.percent(25) then
if target and rng.percent(dam.chance) then
if target:canBe("disarm") then
target:setEffect(target.EFF_DISARMED, 3, {src=src, apply_power=src:combatMindpower()})
target:setEffect(target.EFF_DISARMED, dam.dur or 3, {src=src, apply_power=src:combatMindpower()})
else
game.logSeen(target, "%s resists!", target.name:capitalize())
end
......
......@@ -44,7 +44,7 @@ newTalent{
if self:knowTalent(self.T_EARTH_S_EYES) then
local te = self:getTalentFromId(self.T_EARTH_S_EYES)
self:talentTemporaryValue(ret, "esp_all", 1)
self:talentTemporaryValue(ret, "esp_range", te.radius_esp(self, te))
self:talentTemporaryValue(ret, "esp_range", te.radius_esp(self, te) - 10)
end
game:playSoundNear(self, "talents/heal")
......
......@@ -87,15 +87,16 @@ newTalent{
points = 5,
mode = "sustained",
message = "The skin of @Source@ starts dripping acid.",
sustain_equilibrium = 25,
cooldown = 10,
sustain_equilibrium = 30,
cooldown = 30,
range = 1,
requires_target = false,
tactical = { DEFEND = 1 },
activate = function(self, t)
game:playSoundNear(self, "talents/slime")
local power = 10 + 5 * self:getTalentLevel(t)
return {
onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.ACID]=power}),
onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.ACID_DISARM]={dam=power, chance=5 + self:getTalentLevel(t) * 2}}),
}
end,
deactivate = function(self, t, p)
......@@ -103,7 +104,7 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Your skin drips with acid, damaging all that hit you for %0.2f acid damage.]]):format(damDesc(self, DamageType.ACID, 10 + 5 * self:getTalentLevel(t)))
return ([[Your skin drips with acid, damaging all that hit you for %0.2f acid damage and giving %d%% chances to disarm them for 3 turns.]]):format(damDesc(self, DamageType.ACID, self:combatTalentMindDamage(t, 10, 50)), 5 + self:getTalentLevel(t) * 2)
end,
}
......
......@@ -133,6 +133,7 @@ newTalent{
m.inc_damage.all = (m.inc_damage.all or 0) - 50
m.forceLevelup = function() end
m.on_die = nil
m.die = nil
m.puuid = nil
m.on_acquire_target = nil
m.no_inventory_access = true
......
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