[1.0.4] Alchemist Protection talent resistance issue

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
vadim
Wayist
Posts: 22
Joined: Mon Jun 17, 2013 8:30 pm
Location: Russia

[1.0.4] Alchemist Protection talent resistance issue

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

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: [1.0.4] Alchemist Protection talent resistance issue

#2 Post 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%%.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [1.0.4] Alchemist Protection talent resistance issue

#3 Post by darkgod »

No it works, the protection is embedded in the throw bomb talent
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Zonk
Sher'Tul
Posts: 1067
Joined: Sat Mar 01, 2003 4:01 pm

Re: [1.0.4] Alchemist Protection talent resistance issue

#4 Post 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?
ToME online profile: http://te4.org/users/zonk
Addons (most likely obsolete): Wights, Trolls, Starting prodigy, Alternate save/resistance system

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: [1.0.4] Alchemist Protection talent resistance issue

#5 Post by Hachem_Muche »

Friendly fire already works. My patch allows the golem to get the general elemental resistances of the talent.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [1.0.4] Alchemist Protection talent resistance issue

#6 Post by darkgod »

Not meant to :=)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Zonk
Sher'Tul
Posts: 1067
Joined: Sat Mar 01, 2003 4:01 pm

Re: [1.0.4] Alchemist Protection talent resistance issue

#7 Post 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)
ToME online profile: http://te4.org/users/zonk
Addons (most likely obsolete): Wights, Trolls, Starting prodigy, Alternate save/resistance system

Post Reply