Page 1 of 1

[1.0.4] Alchemist Protection talent resistance issue

Posted: Tue Jun 18, 2013 11:26 am
by vadim
Talent description: Improves your resistance (and your golem's) against the elemental damage of your own bombs by 20%, and against external elemental damage (fire, cold, lightning and acid) by 3%. At talent level 5 it also protects you against all side effects of your bombs. (level1)

Issue: External elemntal resistance doesn't work on golem. When i open my golem's character sheet and open defence tab there are no resistances shown from this talent, but resistance from items shown correctly. Also, it works properly for the alchemist.

Re: [1.0.4] Alchemist Protection talent resistance issue

Posted: Tue Jun 18, 2013 6:28 pm
by Hachem_Muche
Apparently the code to share the resistances with the golem is missing. Fix:

Code: Select all

 .../modules/tome/data/talents/spells/explosives.lua | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/game/modules/tome/data/talents/spells/explosives.lua b/game/modules/tome/data/talents/spells/explosives.lua
index a38d594..56738f6 100644
--- a/game/modules/tome/data/talents/spells/explosives.lua
+++ b/game/modules/tome/data/talents/spells/explosives.lua
@@ -148,17 +148,16 @@ newTalent{
 	require = spells_req2,
 	mode = "passive",
 	points = 5,
-	on_learn = function(self, t)
-		self.resists[DamageType.FIRE] = (self.resists[DamageType.FIRE] or 0) + 3
-		self.resists[DamageType.COLD] = (self.resists[DamageType.COLD] or 0) + 3
-		self.resists[DamageType.LIGHTNING] = (self.resists[DamageType.LIGHTNING] or 0) + 3
-		self.resists[DamageType.ACID] = (self.resists[DamageType.ACID] or 0) + 3
-	end,
-	on_unlearn = function(self, t)
-		self.resists[DamageType.FIRE] = self.resists[DamageType.FIRE] - 3
-		self.resists[DamageType.COLD] = self.resists[DamageType.COLD] - 3
-		self.resists[DamageType.LIGHTNING] = self.resists[DamageType.LIGHTNING] - 3
-		self.resists[DamageType.ACID] = self.resists[DamageType.ACID] - 3
+	passives = function(self, t, p)
+		local resist = self:getTalentLevelRaw(t) * 3
+		local res = {[DamageType.FIRE] = resist,
+					[DamageType.COLD] = resist,
+					[DamageType.LIGHTNING] = resist,
+					[DamageType.ACID] = resist}
+		self:talentTemporaryValue(p, "resists", res)
+		if self.alchemy_golem then
+			self:talentTemporaryValue(p, "alchemy_golem", {resists = res})
+		end
 	end,
 	info = function(self, t)
 		return ([[Improves your resistance (and your golem's) against the elemental damage of your own bombs by %d%%, and against external elemental damage (fire, cold, lightning and acid) by %d%%.

Re: [1.0.4] Alchemist Protection talent resistance issue

Posted: Mon Jul 01, 2013 10:20 am
by darkgod
No it works, the protection is embedded in the throw bomb talent

Re: [1.0.4] Alchemist Protection talent resistance issue

Posted: Mon Jul 01, 2013 3:39 pm
by Zonk
darkgod wrote:No it works, the protection is embedded in the throw bomb talent
I think they are referring to the resistanc against non-bomb effects too...which I'm not sure the golem is meant to get.
If not, make it clearer in the talent?

Re: [1.0.4] Alchemist Protection talent resistance issue

Posted: Mon Jul 01, 2013 4:28 pm
by Hachem_Muche
Friendly fire already works. My patch allows the golem to get the general elemental resistances of the talent.

Re: [1.0.4] Alchemist Protection talent resistance issue

Posted: Mon Jul 01, 2013 4:47 pm
by darkgod
Not meant to :=)

Re: [1.0.4] Alchemist Protection talent resistance issue

Posted: Mon Jul 01, 2013 5:14 pm
by Zonk
darkgod wrote:Not meant to :=)
Then maybe change text to 'Improves your and your's golems resistance to your own bombs by X%, and your own only against external elemental damage (fire, cold, lightning and acid) by 3%. At talent level 5 it also protects you against all side effects of your bombs. (level1)'
(something like that so it's clearer)