[b38] Piercing Sight has no effect
Moderator: Moderator
-
- Thalore
- Posts: 148
- Joined: Tue Feb 28, 2012 6:36 am
[b38] Piercing Sight has no effect
Piercing Sight (a newly added talent in the Cunning/Survival tree) is supposed to passively raise the see invisible and see through stealth scores of a character. However, when a point is taken (or multiple), no effect is seen on the character sheet. Other sources, such as rings and the Keen Senses talent, increase the stats on the character sheet as expected.
Re: [b38] Piercing Sight has no effect
Code: Select all
--- Computes see stealth
function _M:combatSeeStealth()
local bonus = 0
if self:knowTalent(self.T_PIERCING_SIGHT) then bonus = bonus + 5 + self:getTalentLevel(self.T_PIERCING_SIGHT) * self:getCun(15, true) end
return self.level / 2 + self:getCun(25, true) + (self:attr("see_stealth") or 0) + bonus
end
--- Computes see invisible
function _M:combatSeeInvisible()
local bonus = 0
if self:knowTalent(self.T_PIERCING_SIGHT) then bonus = bonus + 5 + self:getTalentLevel(self.T_PIERCING_SIGHT) * self:getCun(15, true) end
return (self:attr("see_invisible") or 0) + bonus
end
Code: Select all
-- Check for stealth. Checks against the target cunning and level
if actor:attr("stealth") and actor ~= self then
local def = self:combatSeeStealth()
local hit, chance = self:checkHitOld(def, actor:attr("stealth") + (actor:attr("inc_stealth") or 0), 0, 100)
if not hit then
return false, chance
end
end
-- Check for invisibility. This is a "simple" checkHit between invisible and see_invisible attrs
if actor:attr("invisible") then
-- Special case, 0 see invisible, can NEVER see invisible things
local def = self:combatSeeInvisible()
if def <= 0 then return false, 0 end
local hit, chance = self:checkHitOld(def, actor:attr("invisible"), 0, 100)
if not hit then
return false, chance
end
end
Code: Select all
text = compare_fields(player, actor_to_compare, "see_stealth", "%.1f", "%+.1f")
if text then
self:mouseTooltip(self.TOOLTIP_VISION_SEE_STEALTH, s:drawColorStringBlended(self.font, ("See stealth : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
text = compare_fields(player, actor_to_compare, "see_invisible", "%.1f", "%+.1f")
if text then
self:mouseTooltip(self.TOOLTIP_VISION_SEE_INVISIBLE, s:drawColorStringBlended(self.font, ("See invisible : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
end
-
- Thalore
- Posts: 148
- Joined: Tue Feb 28, 2012 6:36 am
Re: [b38] Piercing Sight has no effect
This issue is in the same state as of SVN 5034.
As zhouwei_e indicated, piercing sight's bonuses are actually applied when see invis and see stealth checks are made. However, because piercing sight is implemented as a passive skill, this bonus is not shown on the character sheet. This is because the character sheet display performs straight field comparisons, rather than making calls to combatSeeInvisible() and combatSeeStealth() (where the passive bonus from piercing sight is calculated).
The reason that keen senses doesn't exhibit the same issue is that keen senses is an active sustain. Temporary bonuses are added directly to the see_invisible and see_stealth fields upon the talent's activation and later removed when the talent is deactivated.
As zhouwei_e indicated, piercing sight's bonuses are actually applied when see invis and see stealth checks are made. However, because piercing sight is implemented as a passive skill, this bonus is not shown on the character sheet. This is because the character sheet display performs straight field comparisons, rather than making calls to combatSeeInvisible() and combatSeeStealth() (where the passive bonus from piercing sight is calculated).
The reason that keen senses doesn't exhibit the same issue is that keen senses is an active sustain. Temporary bonuses are added directly to the see_invisible and see_stealth fields upon the talent's activation and later removed when the talent is deactivated.