Skip to content

Commit 8942dfb

Browse files
committed
"Time Wizard" fix
Fixed a bug where it would consider the ATK of monsters that were face-down when inflicting damage
1 parent 885bbfd commit 8942dfb

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

official/c71625222.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--Time Wizard
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--destroy
5+
--Destroy monsters on the field
66
local e1=Effect.CreateEffect(c)
77
e1:SetDescription(aux.Stringid(id,0))
88
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN+CATEGORY_DAMAGE)
@@ -19,6 +19,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
1919
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
2020
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
2121
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
22+
Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,1,tp,0)
2223
end
2324
function s.desop(e,tp,eg,ep,ev,re,r,rp)
2425
if Duel.CallCoin(tp) then
@@ -28,8 +29,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
2829
else
2930
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
3031
Duel.Destroy(g,REASON_EFFECT)
31-
local dg=Duel.GetOperatedGroup()
32-
local sum=dg:GetSum(Card.GetAttack)
33-
Duel.Damage(tp,sum/2,REASON_EFFECT)
32+
local dg=Duel.GetOperatedGroup():Filter(Card.IsPreviousPosition,nil,POS_FACEUP)
33+
local sum=dg:GetSum(Card.GetPreviousAttackOnField)
34+
if #sum>0 then
35+
Duel.Damage(tp,sum/2,REASON_EFFECT)
36+
end
3437
end
3538
end

0 commit comments

Comments
 (0)