[1.7.3] Greater Weapon Focus bypassing trained reaction

Make all T-Engine/ToME 4 bug reports here

Moderator: Moderator

Post Reply
Message
Author
trungaczne
Higher
Posts: 69
Joined: Mon Aug 03, 2020 8:48 pm

[1.7.3] Greater Weapon Focus bypassing trained reaction

#1 Post by trungaczne »

Ran into a Berserker/Marauder unique. It was equipped with a two hander with no on hit effect (so GWF should always proc at most once per turn with a single damage instance). It performed stunning blow and from the screenshot it can be seen that both blows were reacted to, but GWF bypassed it somehow.
This kept happening through out the fight so it's not a one off occurrence.
Attachments
gwf.jpg
gwf.jpg (51.77 KiB) Viewed 600 times

trungaczne
Higher
Posts: 69
Joined: Mon Aug 03, 2020 8:48 pm

Re: [1.7.3] Greater Weapon Focus bypassing trained reaction

#2 Post by trungaczne »

The reason why this happens is because Trained Reaction only blocks attacks from

Code: Select all

			local psrc = src.__project_source
			if psrc then
				local kind = util.getval(psrc.getEntityKind)
				if kind == "projectile" or kind == "trap" or kind == "object" then
				else
					return
				end
			end

The __project_source for greater weapon focus is the effect and thus getEntityKind() returns nil

Code: Select all

[dur] = 8
[chance] = 60.502812010087
[getName] = function: 0x419cfc18
[__set_time] = 13599
[resolveSource] = function: 0x40bb3e20
[__talent_source] = T_GREATER_WEAPON_FOCUS
[src] = table: 0x4235d6b8
[__orig_params] = {
  [chance] = 60.502812010087
}
Proposed solution is to do the same check on the src.src (it returns "actor" here)

trungaczne
Higher
Posts: 69
Joined: Mon Aug 03, 2020 8:48 pm

Re: [1.7.3] Greater Weapon Focus bypassing trained reaction

#3 Post by trungaczne »

More examples of nil entity types damage instances that won't get mitigated

Tempest of Metals
Thunderstorm
Arcane Vortex
Hurricane
Dark Whisper
Dissolved Face

Post Reply