1+ -- ジャイアント・カオス・バルジ
2+ -- Galactic Chaos Enforcer
3+ -- Scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Special Summon
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_SPECIAL_SUMMON )
10+ e1 :SetType (EFFECT_TYPE_IGNITION )
11+ e1 :SetRange (LOCATION_MZONE )
12+ e1 :SetCountLimit (1 )
13+ e1 :SetTarget (s .target )
14+ e1 :SetOperation (s .operation )
15+ c :RegisterEffect (e1 )
16+ end
17+ s .listed_names = {CARD_GALACTICA_OBLIVION ,160010025 }
18+ function s .cfilter (c )
19+ return c :IsAttribute (ATTRIBUTE_LIGHT |ATTRIBUTE_DARK ) and c :IsRace (RACE_GALAXY ) and c :IsAbleToDeckOrExtraAsCost ()
20+ end
21+ function s .spfilter (c ,e ,tp )
22+ return c :IsCode (CARD_GALACTICA_OBLIVION ,160010025 ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ,POS_FACEDOWN_DEFENSE )
23+ and Duel .IsExistingMatchingCard (s .cfilter ,tp ,LOCATION_GRAVE ,0 ,2 ,c )
24+ end
25+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
26+ if chk == 0 then return Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0 and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp ) end
27+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_GRAVE )
28+ end
29+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
30+ -- Requirement
31+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TODECK )
32+ local g = Duel .GetMatchingGroup (s .cfilter ,tp ,LOCATION_GRAVE ,0 ,nil )
33+ local td = aux .SelectUnselectGroup (g ,e ,tp ,2 ,2 ,s .rescon ,1 ,tp ,HINTMSG_TODECK )
34+ Duel .HintSelection (td )
35+ if Duel .SendtoDeck (td ,nil ,SEQ_DECKBOTTOM ,REASON_COST )<= 0 then return end
36+ Duel .SortDeckbottom (tp ,tp ,# td )
37+ -- Effect
38+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
39+ local g = Duel .SelectMatchingCard (tp ,s .spfilter2 ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil ,e ,tp )
40+ if # g > 0 then
41+ Duel .SpecialSummon (g ,0 ,tp ,tp ,false ,false ,POS_FACEDOWN_DEFENSE )
42+ end
43+ end
44+ function s .spfilter2 (c ,e ,tp )
45+ return c :IsCode (CARD_GALACTICA_OBLIVION ,160010025 ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ,POS_FACEDOWN_DEFENSE )
46+ end
47+ function s .rescon (sg ,e ,tp ,mg )
48+ return Duel .IsExistingMatchingCard (s .spfilter2 ,tp ,LOCATION_GRAVE ,0 ,1 ,sg ,e ,tp )
49+ end
0 commit comments