1+ -- 閃刀姫=ゼロ
2+ -- Sky Striker Ace - Zero
3+ -- scripted by pyrQ
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ c :EnableReviveLimit ()
7+ -- Link Summon procedure: 2 "Sky Striker Ace" monsters
8+ Link .AddProcedure (c ,aux .FilterBoolFunctionEx (Card .IsSetCard ,SET_SKY_STRIKER_ACE ),2 )
9+ -- You can only Special Summon "Sky Striker Ace - Zero(s)" once per turn
10+ c :SetSPSummonOnce (id )
11+ -- Cannot be used as Link Material
12+ local e0 = Effect .CreateEffect (c )
13+ e0 :SetType (EFFECT_TYPE_SINGLE )
14+ e0 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE )
15+ e0 :SetCode (EFFECT_CANNOT_BE_LINK_MATERIAL )
16+ e0 :SetValue (1 )
17+ c :RegisterEffect (e0 )
18+ -- Add 1 "Sky Striker" Spell from your Deck or GY to your hand
19+ local e1 = Effect .CreateEffect (c )
20+ e1 :SetDescription (aux .Stringid (id ,0 ))
21+ e1 :SetCategory (CATEGORY_TOHAND + CATEGORY_SEARCH )
22+ e1 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
23+ e1 :SetProperty (EFFECT_FLAG_DELAY )
24+ e1 :SetCode (EVENT_SPSUMMON_SUCCESS )
25+ e1 :SetCountLimit (1 ,id )
26+ e1 :SetTarget (s .thtg )
27+ e1 :SetOperation (s .thop )
28+ c :RegisterEffect (e1 )
29+ -- Special Summon both 1 "Sky Striker Ace - Raye" and 1 "Sky Striker Ace - Roze" from your Deck and/or GY, then you can destroy 1 card on the field
30+ local e2 = Effect .CreateEffect (c )
31+ e2 :SetDescription (aux .Stringid (id ,1 ))
32+ e2 :SetCategory (CATEGORY_SPECIAL_SUMMON + CATEGORY_DESTROY )
33+ e2 :SetType (EFFECT_TYPE_QUICK_O )
34+ e2 :SetCode (EVENT_FREE_CHAIN )
35+ e2 :SetRange (LOCATION_MZONE )
36+ e2 :SetHintTiming (0 ,TIMING_STANDBY_PHASE |TIMING_MAIN_END |TIMINGS_CHECK_MONSTER_E )
37+ e2 :SetCountLimit (1 ,id )
38+ e2 :SetCost (Cost .SelfTribute )
39+ e2 :SetTarget (s .sptg )
40+ e2 :SetOperation (s .spop )
41+ c :RegisterEffect (e2 )
42+ end
43+ s .listed_series = {SET_SKY_STRIKER_ACE ,SET_SKY_STRIKER }
44+ s .listed_names = {id ,26077387 ,37351133 } -- "Sky Striker Ace - Raye", "Sky Striker Ace - Roze"
45+ function s .thfilter (c )
46+ return c :IsSetCard (SET_SKY_STRIKER ) and c :IsSpell () and c :IsAbleToHand ()
47+ end
48+ function s .thtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
49+ if chk == 0 then return Duel .IsExistingMatchingCard (s .thfilter ,tp ,LOCATION_DECK |LOCATION_GRAVE ,0 ,1 ,nil ) end
50+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,LOCATION_DECK |LOCATION_GRAVE )
51+ end
52+ function s .thop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
53+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
54+ local g = Duel .SelectMatchingCard (tp ,aux .NecroValleyFilter (s .thfilter ),tp ,LOCATION_DECK |LOCATION_GRAVE ,0 ,1 ,1 ,nil )
55+ if # g > 0 then
56+ Duel .SendtoHand (g ,nil ,REASON_EFFECT )
57+ Duel .ConfirmCards (1 - tp ,g )
58+ end
59+ end
60+ function s .spfilter (c ,e ,tp )
61+ return c :IsCode (26077387 ,37351133 ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
62+ end
63+ function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
64+ if chk == 0 then
65+ local g = Duel .GetMatchingGroup (s .spfilter ,tp ,LOCATION_DECK |LOCATION_GRAVE ,0 ,nil ,e ,tp )
66+ return Duel .GetMZoneCount (tp ,e :GetHandler ())>= 2
67+ and not Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT )
68+ and aux .SelectUnselectGroup (g ,e ,tp ,2 ,2 ,aux .dncheck ,0 )
69+ end
70+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,2 ,tp ,LOCATION_DECK |LOCATION_GRAVE )
71+ Duel .SetPossibleOperationInfo (0 ,CATEGORY_DESTROY ,nil ,1 ,PLAYER_EITHER ,LOCATION_ONFIELD )
72+ end
73+ function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
74+ if Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT )
75+ or Duel .GetLocationCount (tp ,LOCATION_MZONE )< 2 then return end
76+ local g = Duel .GetMatchingGroup (aux .NecroValleyFilter (s .spfilter ),tp ,LOCATION_DECK |LOCATION_GRAVE ,0 ,nil ,e ,tp )
77+ if # g < 2 then return end
78+ local sg = aux .SelectUnselectGroup (g ,e ,tp ,2 ,2 ,aux .dncheck ,1 ,tp ,HINTMSG_SPSUMMON )
79+ if # sg == 2 and Duel .SpecialSummon (sg ,0 ,tp ,tp ,false ,false ,POS_FACEUP )== 2
80+ and Duel .GetFieldGroupCount (tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD )> 0
81+ and Duel .SelectYesNo (tp ,aux .Stringid (id ,2 )) then
82+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
83+ local dg = Duel .SelectMatchingCard (tp ,nil ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,1 ,nil )
84+ if # dg > 0 then
85+ Duel .HintSelection (dg )
86+ Duel .BreakEffect ()
87+ Duel .Destroy (dg ,REASON_EFFECT )
88+ end
89+ end
90+ end
0 commit comments