1+ -- P・M ツールキート
2+ -- Plasmatic Model Tool Ceto
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Summon with 1 tribute
7+ local e1 = aux .AddNormalSummonProcedure (c ,true ,true ,1 ,1 ,SUMMON_TYPE_TRIBUTE ,aux .Stringid (id ,0 ),s .otfilter )
8+ -- Special Summon
9+ local e2 = Effect .CreateEffect (c )
10+ e2 :SetDescription (aux .Stringid (id ,1 ))
11+ e2 :SetCategory (CATEGORY_SPECIAL_SUMMON )
12+ e2 :SetType (EFFECT_TYPE_IGNITION )
13+ e2 :SetRange (LOCATION_MZONE )
14+ e2 :SetCountLimit (1 )
15+ e2 :SetCost (s .cost )
16+ e2 :SetTarget (s .target )
17+ e2 :SetOperation (s .operation )
18+ c :RegisterEffect (e2 )
19+ end
20+ function s .otfilter (c )
21+ return c :IsLevelAbove (8 )
22+ end
23+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
24+ if chk == 0 then return e :GetHandler ():IsAbleToGraveAsCost () end
25+ end
26+ function s .spfilter (c ,e ,tp )
27+ return c :IsRace (RACE_THUNDER ) and c :IsLevelBelow (4 ) and c :IsDefense (800 ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ,POS_FACEUP_DEFENSE )
28+ end
29+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
30+ if chk == 0 then return not Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT )
31+ and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
32+ and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,2 ,nil ,e ,tp ) end
33+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,2 ,tp ,LOCATION_GRAVE )
34+ end
35+ function s .thfilter (c )
36+ return c :IsCode (160021055 ) and c :IsAbleToHand ()
37+ end
38+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
39+ -- Requirement
40+ local c = e :GetHandler ()
41+ if Duel .SendtoGrave (c ,REASON_COST )< 1 then return end
42+ -- Effect
43+ if Duel .GetLocationCount (tp ,LOCATION_MZONE )< 2 or Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT ) then return end
44+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
45+ local g = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_GRAVE ,0 ,2 ,2 ,nil ,e ,tp )
46+ if # g > 0 and Duel .SpecialSummon (g ,0 ,tp ,tp ,false ,false ,POS_FACEUP_DEFENSE )
47+ and Duel .IsExistingMatchingCard (aux .NecroValleyFilter (s .thfilter ),tp ,LOCATION_GRAVE ,0 ,1 ,nil )
48+ and Duel .SelectYesNo (tp ,aux .Stringid (id ,2 )) then
49+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
50+ local g = Duel .SelectMatchingCard (tp ,s .thfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil )
51+ if # g > 0 then
52+ Duel .SendtoHand (g ,nil ,REASON_EFFECT )
53+ Duel .ConfirmCards (1 - tp ,g )
54+ end
55+ end
56+ end
0 commit comments