@@ -12,7 +12,7 @@ function s.initial_effect(c)
1212 e1 :SetRange (LOCATION_MZONE )
1313 e1 :SetHintTiming (0 ,TIMINGS_CHECK_MONSTER_E )
1414 e1 :SetCountLimit (1 ,id )
15- e1 :SetCondition (s . condition )
15+ e1 :SetCondition (function ( e , tp ) return Duel . IsTurnPlayer ( 1 - tp ) end )
1616 e1 :SetTarget (s .target )
1717 e1 :SetOperation (s .operation )
1818 c :RegisterEffect (e1 )
@@ -24,16 +24,13 @@ function s.initial_effect(c)
2424 e2 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
2525 e2 :SetCode (EVENT_TO_GRAVE )
2626 e2 :SetCountLimit (1 ,{id ,1 })
27- e2 :SetCondition (s . spcon )
27+ e2 :SetCondition (function ( e ) return e : GetHandler (): IsPreviousLocation ( LOCATION_HAND | LOCATION_MZONE ) end )
2828 e2 :SetTarget (s .eqtg )
2929 e2 :SetOperation (s .eqop )
3030 c :RegisterEffect (e2 )
3131end
3232s .listed_series = {SET_PLUNDER_PATROLL }
3333s .listed_names = {id }
34- function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
35- return Duel .IsTurnPlayer (1 - tp )
36- end
3734function s .filter (c ,e ,tp ,att )
3835 return c :IsSetCard (SET_PLUNDER_PATROLL ) and c :IsAttribute (att ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
3936 and Duel .GetLocationCountFromEx (tp ,tp ,nil ,c )> 0
@@ -61,7 +58,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
6158 local tc = Duel .SelectMatchingCard (tp ,s .filter ,tp ,LOCATION_EXTRA ,0 ,1 ,1 ,nil ,e ,tp ,att ):GetFirst ()
6259 if tc and Duel .SpecialSummon (tc ,0 ,tp ,tp ,false ,false ,POS_FACEUP )> 0 then
6360 local c = e :GetHandler ()
64- if not c :IsRelateToEffect (e ) then return end
61+ if not ( c :IsRelateToEffect (e ) and c : IsFaceup ()) then return end
6562 Duel .Equip (tp ,c ,tc ,true )
6663 local e1 = Effect .CreateEffect (c )
6764 e1 :SetType (EFFECT_TYPE_SINGLE )
7572function s .eqlimit (e ,c )
7673 return c == e :GetLabelObject ()
7774end
78- function s .spcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
79- return e :GetHandler ():IsPreviousLocation (LOCATION_HAND |LOCATION_MZONE )
80- end
8175function s .eqfilter (c ,ec )
8276 return c :IsFaceup () and c :IsSetCard (SET_PLUNDER_PATROLL ) and not c :IsCode (id )
8377end
@@ -106,4 +100,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
106100 e1 :SetLabelObject (tc )
107101 c :RegisterEffect (e1 )
108102 end
109- end
103+ end
0 commit comments