1+ -- 竹林のキラーパンダ
2+ -- Frenzied Panda of the Bamboo Forest
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 :SetCost (s .cost )
14+ e1 :SetTarget (s .target )
15+ e1 :SetOperation (s .operation )
16+ c :RegisterEffect (e1 )
17+ end
18+ function s .cfilter (c )
19+ return c :IsFaceup () and c :IsRace (RACE_BEAST ) and c :IsType (TYPE_EFFECT ) and c :IsAbleToGraveAsCost ()
20+ end
21+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
22+ if chk == 0 then return Duel .IsExistingMatchingCard (s .cfilter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) end
23+ end
24+ function s .spfilter (c ,e ,tp )
25+ return c :IsRace (RACE_BEAST ) and not c :IsType (TYPE_EFFECT ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
26+ end
27+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
28+ if chk == 0 then return Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp ) end
29+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,0 ,tp ,LOCATION_GRAVE )
30+ end
31+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
32+ -- Requirement
33+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
34+ local g = Duel .SelectMatchingCard (tp ,s .cfilter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil )
35+ if Duel .SendtoGrave (g ,REASON_COST )< 1 then return end
36+ -- Effect
37+ if Duel .GetLocationCount (tp ,LOCATION_MZONE )< 1 then return end
38+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
39+ local g = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil ,e ,tp )
40+ Duel .SpecialSummon (g ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
41+ local g2 = Duel .GetMatchingGroup (Card .IsNotMaximumModeSide ,tp ,0 ,LOCATION_MZONE ,nil )
42+ if g :GetFirst ():IsCode (33951077 ) and # g2 > 0 and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
43+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
44+ local sg = g2 :Select (tp ,1 ,1 ,nil )
45+ if # sg == 0 then return end
46+ local sg2 = sg :AddMaximumCheck ()
47+ Duel .HintSelection (sg2 )
48+ Duel .BreakEffect ()
49+ Duel .Destroy (sg ,REASON_EFFECT )
50+ end
51+ end
0 commit comments