Reflection rune gives mistaken shield amount

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Delmuir
Uruivellas
Posts: 992
Joined: Sat Aug 24, 2013 5:55 am

Reflection rune gives mistaken shield amount

#1 Post 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

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Reflection rune gives mistaken shield amount

#2 Post 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.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

ghostbuster
Uruivellas
Posts: 617
Joined: Mon Oct 09, 2006 7:47 pm

Re: Reflection rune gives mistaken shield amount

#3 Post 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()

Delmuir
Uruivellas
Posts: 992
Joined: Sat Aug 24, 2013 5:55 am

Re: Reflection rune gives mistaken shield amount

#4 Post 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.

PureQuestion
Master Artificer
Posts: 726
Joined: Fri Feb 03, 2012 3:53 am

Re: Reflection rune gives mistaken shield amount

#5 Post by PureQuestion »

Oops. Darkgod fixed it.

Post Reply