1- -- ディメンション・ワンダラー
1+ -- ディメンション・ワンダラー (Anime)
2+ -- Dimension Wanderer (Anime)
23local s ,id = GetID ()
34function s .initial_effect (c )
4- -- damage
5+ -- When a monster you control is banished by a card effect: You can send this card from your hand to the Graveyard, then target 2 banished monsters; inflict damage to your opponent equal to the total ATK of those targets.
56 local e1 = Effect .CreateEffect (c )
67 e1 :SetDescription (aux .Stringid (62107612 ,0 ))
78 e1 :SetCategory (CATEGORY_DAMAGE )
89 e1 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O )
9- e1 :SetCode (EVENT_REMOVE )
1010 e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
11+ e1 :SetCode (EVENT_REMOVE )
1112 e1 :SetRange (LOCATION_HAND )
1213 e1 :SetCondition (s .condition )
13- e1 :SetCost (s . cost )
14+ e1 :SetCost (Cost . SelfToGrave )
1415 e1 :SetTarget (s .target )
1516 e1 :SetOperation (s .operation )
1617 c :RegisterEffect (e1 )
1718end
18- function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
19- return r &REASON_EFFECT ~= 0 and re
20- end
21- function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
22- if chk == 0 then return e :GetHandler ():IsAbleToGraveAsCost () end
23- Duel .SendtoGrave (e :GetHandler (),REASON_COST )
19+ function s .cfilter (c ,tp )
20+ return c :IsPreviousLocation (LOCATION_MZONE ) and c :IsPreviousControler (tp )
2421end
25- function s .filter ( c )
26- return c : IsFaceup () and c : GetAttack () > 0
22+ function s .condition ( e , tp , eg , ep , ev , re , r , rp )
23+ return eg : IsExists ( s . cfilter , 1 , nil , tp )
2724end
2825function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
29- if chkc then return chkc :IsLocation (LOCATION_REMOVED ) and s . filter ( chkc ) end
30- if chk == 0 then return Duel .IsExistingTarget (s . filter ,tp ,LOCATION_REMOVED ,LOCATION_REMOVED ,2 ,nil ) end
26+ if chkc then return chkc :IsFaceup () and chkc : IsLocation (LOCATION_REMOVED ) and chkc : HasNonZeroAttack ( ) end
27+ if chk == 0 then return Duel .IsExistingTarget (aux . FaceupFilter ( Card . HasNonZeroAttack ) ,tp ,LOCATION_REMOVED ,LOCATION_REMOVED ,2 ,nil ) end
3128 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
32- local g = Duel .SelectTarget (tp ,s . filter ,tp ,LOCATION_REMOVED ,LOCATION_REMOVED ,2 ,2 ,nil )
29+ local g = Duel .SelectTarget (tp ,aux . FaceupFilter ( Card . HasNonZeroAttack ) ,tp ,LOCATION_REMOVED ,LOCATION_REMOVED ,2 ,2 ,nil )
3330 Duel .SetOperationInfo (0 ,CATEGORY_DAMAGE ,nil ,0 ,1 - tp ,g :GetSum (Card .GetAttack ))
3431end
3532function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
@@ -39,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
3936 local sum = g :GetSum (Card .GetAttack )
4037 Duel .Damage (1 - tp ,sum ,REASON_EFFECT )
4138 end
42- end
39+ end
0 commit comments