22-- Time Wizard
33local s ,id = GetID ()
44function 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 )
2223end
2324function 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
3538end
0 commit comments