@@ -34,26 +34,28 @@ function s.tdfilter(c)
3434 return c :IsLevelBelow (8 ) and c :IsFaceup () and c :IsAbleToDeck ()
3535end
3636function s .tdop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
37- -- requirement
37+ -- Requirement
3838 local g = Duel .GetMatchingGroup (s .tdcostfilter ,tp ,LOCATION_GRAVE ,0 ,nil )
3939 local cg = aux .SelectUnselectGroup (g ,e ,tp ,2 ,2 ,s .tdcostrescon ,1 ,tp ,HINTMSG_TODECK )
40- if Duel .SendtoDeck (cg ,nil ,SEQ_DECKSHUFFLE ,REASON_COST )> 0 then
41- -- Effect
42- Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TODECK )
43- local g = Duel .SelectMatchingCard (tp ,aux .FilterMaximumSideFunctionEx (s .tdfilter ),tp ,0 ,LOCATION_MZONE ,1 ,1 ,nil )
44- if # g == 0 then return end
45- g = g :AddMaximumCheck ()
46- Duel .HintSelection (g ,true )
47- if Duel .SendtoDeck (g ,nil ,SEQ_DECKBOTTOM ,REASON_EFFECT )> 0 then
48- local c = e :GetHandler ()
49- -- Cannot attack directly
50- local e1 = Effect .CreateEffect (c )
51- e1 :SetDescription (3207 )
52- e1 :SetType (EFFECT_TYPE_SINGLE )
53- e1 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_CLIENT_HINT )
54- e1 :SetCode (EFFECT_CANNOT_DIRECT_ATTACK )
55- e1 :SetReset (RESETS_STANDARD_PHASE_END )
56- c :RegisterEffect (e1 )
40+ if Duel .SendtoDeck (cg ,nil ,SEQ_DECKSHUFFLE ,REASON_COST )< 1 then return end
41+ -- Effect
42+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TODECK )
43+ local g = Duel .SelectMatchingCard (tp ,aux .FilterMaximumSideFunctionEx (s .tdfilter ),tp ,0 ,LOCATION_MZONE ,1 ,1 ,nil )
44+ if # g == 0 then return end
45+ g = g :AddMaximumCheck ()
46+ Duel .HintSelection (g )
47+ if Duel .SendtoDeck (g ,nil ,SEQ_DECKBOTTOM ,REASON_EFFECT )> 0 then
48+ if # g > 1 then
49+ Duel .SortDeckbottom (1 - tp ,1 - tp ,# g )
5750 end
51+ local c = e :GetHandler ()
52+ -- Cannot attack directly
53+ local e1 = Effect .CreateEffect (c )
54+ e1 :SetDescription (3207 )
55+ e1 :SetType (EFFECT_TYPE_SINGLE )
56+ e1 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_CLIENT_HINT )
57+ e1 :SetCode (EFFECT_CANNOT_DIRECT_ATTACK )
58+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
59+ c :RegisterEffect (e1 )
5860 end
5961end
0 commit comments