@@ -53,18 +53,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
5353 end
5454 end
5555end
56- function s .xyzfilter (c ,tp )
56+ function s .xyzfilter (c ,tp , exc )
5757 return c :IsFaceup () and c :IsType (TYPE_XYZ ) and c :IsSetCard (SET_GHOSTRICK )
58- and Duel .IsExistingMatchingCard (s .attachfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,tp ,c )
58+ and Duel .IsExistingMatchingCard (s .attachfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,exc ,tp ,c )
5959end
6060function s .attachfilter (c ,tp ,xyzc )
6161 return c :IsSetCard (SET_GHOSTRICK ) and c :IsCanBeXyzMaterial (xyzc ,tp ,REASON_EFFECT )
6262end
6363function s .mattg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
64- if chkc then return chkc :IsControler (tp ) and chkc :IsLocation (LOCATION_MZONE ) and s .xyzfilter (chkc ,tp ) end
65- if chk == 0 then return Duel .IsExistingTarget (s .xyzfilter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ,tp ) end
64+ local c = e :GetHandler ()
65+ if chkc then return chkc :IsControler (tp ) and chkc :IsLocation (LOCATION_MZONE ) and s .xyzfilter (chkc ,tp ,c ) end
66+ if chk == 0 then return Duel .IsExistingTarget (s .xyzfilter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ,tp ,c ) end
6667 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TARGET )
67- Duel .SelectTarget (tp ,s .xyzfilter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil ,tp )
68+ Duel .SelectTarget (tp ,s .xyzfilter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil ,tp , c )
6869 Duel .SetOperationInfo (0 ,CATEGORY_LEAVE_GRAVE ,nil ,1 ,tp ,0 )
6970end
7071function s .matop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
0 commit comments