[1.7.4] Weapon of Light and Avatar of a Distant Sun Interaction

Make all T-Engine/ToME 4 bug reports here

Moderator: Moderator

Post Reply
Message
Author
arazeru
Posts: 2
Joined: Sun May 22, 2022 11:41 pm

[1.7.4] Weapon of Light and Avatar of a Distant Sun Interaction

#1 Post by arazeru »

Hello,

I think there might be an unintended interaction with Weapon of Light and the Avatar of a Distant Sun prodigy. Specifically it seems that the damage sometimes does not proc as many times as I would expect after taking the prodigy. Unfortunately I keep dying in my attempts so haven't been able to reliably reproduce.

Edit: confirmed that in game when Gravitic Effulgence is active and I have a damage shield it only procs damage 1 time per turn, or when it is disabled or I don't have a damage shield there are multiple damage procs.

Looking at the code, I think this change might result in the behavior that I am expecting. I am guessing that the thought process was that the pull-in should potentially only happen once per turn, but having the damage tied to that as well means that if I am doing a triple hit e.g. with shield slam it only does the damage once instead of 3 times.

https://git.net-core.org/tome/t-engine4 ... at.lua#L86

Code: Select all

diff --git a/game/modules/tome/data/talents/celestial/combat.lua b/game/modules/tome/data/talents/celestial/combat.lua
index e075f431fa..198b1de1b8 100644
--- a/game/modules/tome/data/talents/celestial/combat.lua
+++ b/game/modules/tome/data/talents/celestial/combat.lua
@@ -84,6 +84,15 @@ newTalent{
 		return true
 	end,
 	callbackOnMeleeAttack = function(self, t, target, hitted, crit, weapon, damtype, mult, dam)
+		if hitted and self:isTalentActive(self.T_GRAVITIC_EFFULGENCE) then
+			local list = table.values(self:projectCollect({type="ball", radius=5, x=target.x, y=target.y, friendlyfire=false}, target.x, target.y, Map.ACTOR))
+			table.sort(list, "dist")
+			for _, l in ipairs(list) do
+				if l.target:canBe("knockback") then l.target:pull(target.x, target.y, 5) end
+			end
+			self:project({type="ball", radius=2, x=target.x, y=target.y, friendlyfire=false}, target.x, target.y, DamageType.LIGHT, t.getDamage(self, t))
+		end
+
 		if self.turn_procs.weapon_of_light then return end
 		if hitted and self:hasEffect(self.EFF_DAMAGE_SHIELD) and (self:reactionToward(target) < 0) then
 			self.turn_procs.weapon_of_light = true
@@ -95,14 +104,6 @@ newTalent{
 			shield.power_max = shield.power_max + shield_power
 			shield.dur = math.max(2, shield.dur)
 		end
-		if hitted and self:isTalentActive(self.T_GRAVITIC_EFFULGENCE) then
-			local list = table.values(self:projectCollect({type="ball", radius=5, x=target.x, y=target.y, friendlyfire=false}, target.x, target.y, Map.ACTOR))
-			table.sort(list, "dist")
-			for _, l in ipairs(list) do
-				if l.target:canBe("knockback") then l.target:pull(target.x, target.y, 5) end
-			end
-			self:project({type="ball", radius=2, x=target.x, y=target.y, friendlyfire=false}, target.x, target.y, DamageType.LIGHT, t.getDamage(self, t))
-		end
 	end,
 	info = function(self, t)
 		local damage = t.getDamage(self, t)


Post Reply