1+ -- 代打バッター
2+ -- Pinch Hopper
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 :SetCategory (CATEGORY_SPECIAL_SUMMON + CATEGORY_TOHAND )
9+ e1 :SetType (EFFECT_TYPE_IGNITION )
10+ e1 :SetRange (LOCATION_MZONE )
11+ e1 :SetCountLimit (1 )
12+ e1 :SetCost (s .spcost )
13+ e1 :SetTarget (s .sptg )
14+ e1 :SetOperation (s .spop )
15+ c :RegisterEffect (e1 )
16+ end
17+ function s .spcost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
18+ if chk == 0 then return e :GetHandler ():IsAbleToGraveAsCost () end
19+ end
20+ function s .spfilter (c ,e ,tp )
21+ return c :IsRace (RACE_INSECT ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
22+ end
23+ function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
24+ if chk == 0 then return Duel .GetMZoneCount (tp ,e :GetHandler ())> 0
25+ and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_HAND ,0 ,1 ,nil ,e ,tp ) end
26+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_HAND )
27+ end
28+ function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
29+ local c = e :GetHandler ()
30+ if Duel .SendtoGrave (c ,REASON_COST )< 1 then return end
31+ -- Effect
32+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
33+ local g = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_HAND ,0 ,1 ,1 ,nil ,e ,tp )
34+ if # g > 0 then
35+ Duel .SpecialSummon (g ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
36+ end
37+ end
0 commit comments