@@ -6,28 +6,27 @@ function s.initial_effect(c)
66 local e1 = Effect .CreateEffect (c )
77 e1 :SetCategory (CATEGORY_TOHAND )
88 e1 :SetType (EFFECT_TYPE_ACTIVATE )
9+ e1 :SetProperty (EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_DELAY )
910 e1 :SetCode (EVENT_REMOVE )
10- e1 :SetProperty (EFFECT_FLAG_DELAY )
11- e1 :SetCondition (s .condition )
11+ e1 :SetCondition (function (e ,tp ,eg ) return eg :IsExists (Card .IsPreviousControler ,1 ,nil ,tp ) end )
1212 e1 :SetTarget (s .target )
1313 e1 :SetOperation (s .activate )
1414 c :RegisterEffect (e1 )
1515end
16- function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
17- return eg :IsExists (Card .IsPreviousControler ,1 ,nil ,tp )
18- end
1916function s .filter (c )
2017 return c :IsSpell () and c :IsAbleToHand ()
2118end
22- function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
23- if chk == 0 then return Duel .IsExistingMatchingCard (s .filter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ) end
24- Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,LOCATION_GRAVE )
19+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
20+ if chkc then chkc :IsControler (tp ) and chkc :IsLocation (LOCATION_GRAVE ) and s .filter (chkc ) end
21+ if chk == 0 then return Duel .IsExistingTarget (s .filter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ) end
22+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
23+ local g = Duel .SelectTarget (tp ,s .filter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil )
24+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,g ,1 ,tp ,LOCATION_GRAVE )
2525end
2626function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
27- Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
28- local g = Duel .SelectMatchingCard (tp ,s .filter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil )
29- if # g > 0 then
30- Duel .SendtoHand (g ,nil ,REASON_EFFECT )
31- Duel .ConfirmCards (1 - tp ,g )
27+ local tc = Duel .GetFirstTarget ()
28+ if tc and tc :IsRelateToEffect (e ) then
29+ Duel .SendtoHand (tc ,nil ,REASON_EFFECT )
30+ Duel .ConfirmCards (1 - tp ,tc )
3231 end
33- end
32+ end
0 commit comments