@@ -5,30 +5,43 @@ function s.initial_effect(c)
55 -- Activate
66 local e1 = Effect .CreateEffect (c )
77 e1 :SetDescription (aux .Stringid (id ,0 ))
8- e1 :SetCategory (CATEGORY_SPECIAL_SUMMON + CATEGORY_TOHAND )
8+ e1 :SetCategory (CATEGORY_DRAW + CATEGORY_SPECIAL_SUMMON + CATEGORY_TOGRAVE )
99 e1 :SetType (EFFECT_TYPE_ACTIVATE )
1010 e1 :SetCode (EVENT_FREE_CHAIN )
1111 e1 :SetTarget (s .target )
12- e1 :SetOperation (s .activate )
12+ e1 :SetOperation (s .operation )
1313 c :RegisterEffect (e1 )
1414end
1515function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
16- if chk == 0 then return Duel .IsPlayerCanSpecialSummon (tp ) and Duel .GetFieldGroupCount (tp ,LOCATION_DECK ,0 )> 1 end
16+ if chk == 0 then return Duel .IsPlayerCanSpecialSummon (tp ) and Duel .IsPlayerCanDraw (tp ,2 ) end
17+ Duel .SetOperationInfo (0 ,CATEGORY_DRAW ,nil ,0 ,tp ,2 )
18+ Duel .SetPossibleOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_HAND )
19+ Duel .SetOperationInfo (0 ,CATEGORY_TOGRAVE ,nil ,1 ,tp ,LOCATION_HAND )
1720end
18- function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
19- if Duel .GetFieldGroupCount (tp ,LOCATION_DECK ,0 )< 2 then return end
20- Duel .ConfirmDecktop (tp ,2 )
21- local g = Duel .GetDecktopGroup (tp ,2 )
22- if # g > 0 then
23- Duel .DisableShuffleCheck ()
24- local tg = g :RandomSelect (1 - tp ,1 )
25- local tc = tg :GetFirst ()
26- if tc :IsMonster () and tc :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ) then
27- Duel .SpecialSummon (tc ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
28- local g2 = g :Filter (aux .TRUE ,tg )
29- Duel .SendtoHand (g2 ,nil ,REASON_EFFECT )
30- Duel .ConfirmCards (1 - tp ,g2 )
31- Duel .ShuffleHand (tp )
32- else Duel .SendtoGrave (g ,REASON_EFFECT |REASON_EXCAVATE ) end
21+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
22+ if Duel .Draw (tp ,2 ,REASON_EFFECT )> 0 then
23+ local g = Duel .GetOperatedGroup ()
24+ local rcard = g :GetFirst ()
25+ local lcard = g :GetNext ()
26+ local op = Duel .SelectOption (1 - tp ,aux .Stringid (id ,1 ),aux .Stringid (id ,2 ))
27+ if op == 0 then
28+ Duel .ConfirmCards (1 - tp ,lcard )
29+ if lcard :IsMonster () and lcard :IsCanBeSpecialSummoned (e ,0 ,tp ,true ,false ) then
30+ Duel .BreakEffect ()
31+ Duel .SpecialSummon (lcard ,0 ,tp ,tp ,true ,false ,POS_FACEUP )
32+ Duel .SendtoGrave (rcard ,REASON_EFFECT )
33+ else
34+ Duel .SendtoGrave (g ,REASON_EFFECT )
35+ end
36+ elseif op == 1 then
37+ Duel .ConfirmCards (1 - tp ,rcard )
38+ if rcard :IsMonster () and rcard :IsCanBeSpecialSummoned (e ,0 ,tp ,true ,false ) then
39+ Duel .BreakEffect ()
40+ Duel .SpecialSummon (rcard ,0 ,tp ,tp ,true ,false ,POS_FACEUP )
41+ Duel .SendtoGrave (lcard ,REASON_EFFECT )
42+ else
43+ Duel .SendtoGrave (g ,REASON_EFFECT )
44+ end
45+ end
3346 end
34- end
47+ end
0 commit comments