Page 1 of 1
Reflection rune gives mistaken shield amount
Posted: Mon Jan 06, 2014 9:01 pm
by Delmuir
When it's sitting in a shop, it listed at 178 but when I hovered the cursor over it (and then bought it), it listed at 139. I posted in the Dumb Questions section and Housepet thought it was bug so I'm reposting here.
Mac version 1.13
Re: Reflection rune gives mistaken shield amount
Posted: Mon Jan 06, 2014 9:54 pm
by Doctornull
By any chance do you have the Aegis tree's Shielding spell active?
That sustain enhances any Shield effect, including the Rune of Reflection.
Re: Reflection rune gives mistaken shield amount
Posted: Mon Jan 06, 2014 10:07 pm
by ghostbuster
The problem is in the code
Code: Select all
newInscription{
name = "Rune: Reflection Shield",
type = {"inscriptions/runes", 1},
points = 1,
is_spell = true,
allow_autocast = true,
no_energy = true,
tactical = { DEFEND = 2 },
on_pre_use = function(self, t)
return not self:hasEffect(self.EFF_DAMAGE_SHIELD)
end,
action = function(self, t)
local data = self:getInscriptionData(t.short_name)
self:setEffect(self.EFF_DAMAGE_SHIELD, 5, {power=100+3*self:getMag(), reflect=100})
return true
end,
info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[Activate the rune to create a protective shield absorbing and reflecting at most %d damage for %d turns.
The effect will scale with your magic stat.]]):format(100+1.5*self:getMag(), 5)
end,
short_info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[absorb and reflect %d for %d turns]]):format(100+3*self:getMag(), 5)
end,
}
The short info and the action states a shield of 100+3*self:getMag() while the info only states 100+1.5*self:getMag()
Re: Reflection rune gives mistaken shield amount
Posted: Mon Jan 06, 2014 10:50 pm
by Delmuir
I can't speak to the code but it was a new game and I didn't have access to the anything other than the first skill in the Aegis tree.
Re: Reflection rune gives mistaken shield amount
Posted: Mon Jan 06, 2014 11:15 pm
by PureQuestion
Oops. Darkgod fixed it.