Skip to content

Commit 4d714db

Browse files
committed
"Trap Gatherer" fix
Fixed a bug where it would be possible to activate its effect when any monster inflicted battle damage, not only the equip target
1 parent 3b47057 commit 4d714db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

official/c24839398.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp)
3838
local ec=e:GetHandler():GetEquipTarget()
3939
if not ec then return false end
4040
local bc=ec:GetBattleTarget()
41-
local ex,_,damp=Duel.CheckEvent(EVENT_BATTLE_DAMAGE,true)
42-
return (bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and bc:IsControler(1-tp)) or (ex and damp==1-tp)
41+
local ex,damg,damp=Duel.CheckEvent(EVENT_BATTLE_DAMAGE,true)
42+
return (bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and bc:IsControler(1-tp)) or (ex and damp==1-tp and damg:GetFirst()==ec)
4343
end
4444
function s.setfilter(c,ignore_zones)
4545
return c:IsTrap() and c:IsSSetable(ignore_zones)

0 commit comments

Comments
 (0)