1+ -- スレット・アームド・ドラゴン
2+ -- Threat Armed Dragon
3+ -- scripted by pyrQ
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Destroy 1 Dragon monster you control, and if you do, Special Summon this card
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_DESTROY + CATEGORY_SPECIAL_SUMMON )
10+ e1 :SetType (EFFECT_TYPE_IGNITION )
11+ e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
12+ e1 :SetRange (LOCATION_GRAVE )
13+ e1 :SetCountLimit (1 ,id )
14+ e1 :SetTarget (s .sptg )
15+ e1 :SetOperation (s .spop )
16+ c :RegisterEffect (e1 )
17+ -- Destroy 1 monster on the field with 2400 or less ATK, then if you destroyed a monster you control, you can Special Summon 1 Dragon monster from your hand or Deck whose original Level is 2 higher than the destroyed monster
18+ local e2 = Effect .CreateEffect (c )
19+ e2 :SetDescription (aux .Stringid (id ,1 ))
20+ e2 :SetCategory (CATEGORY_DESTROY + CATEGORY_SPECIAL_SUMMON )
21+ e2 :SetType (EFFECT_TYPE_IGNITION )
22+ e2 :SetProperty (EFFECT_FLAG_CARD_TARGET )
23+ e2 :SetRange (LOCATION_MZONE )
24+ e2 :SetCountLimit (1 ,{id ,1 })
25+ e2 :SetCost (Cost .Discard ())
26+ e2 :SetTarget (s .destg )
27+ e2 :SetOperation (s .desop )
28+ c :RegisterEffect (e2 )
29+ end
30+ function s .sptgdesfilter (c ,tp )
31+ return c :IsRace (RACE_DRAGON ) and c :IsFaceup () and Duel .GetMZoneCount (tp ,c )> 0
32+ end
33+ function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
34+ if chkc then return chkc :IsControler (tp ) and chkc :IsLocation (LOCATION_MZONE ) and s .sptgdesfilter (chkc ,tp ) end
35+ local c = e :GetHandler ()
36+ if chk == 0 then return Duel .IsExistingTarget (s .sptgdesfilter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ,tp )
37+ and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ) end
38+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
39+ local g = Duel .SelectTarget (tp ,s .sptgdesfilter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil ,tp )
40+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,1 ,tp ,0 )
41+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,c ,1 ,tp ,0 )
42+ end
43+ function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
44+ local c = e :GetHandler ()
45+ local tc = Duel .GetFirstTarget ()
46+ if tc :IsRelateToEffect (e ) and tc :IsMonster () and Duel .Destroy (tc ,REASON_EFFECT )> 0
47+ and c :IsRelateToEffect (e ) then
48+ Duel .SpecialSummon (c ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
49+ end
50+ end
51+ function s .spfilter (c ,e ,tp ,lv )
52+ return c :IsRace (RACE_DRAGON ) and c :IsOriginalLevel (lv ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
53+ end
54+ function s .destg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
55+ if chkc then return chkc :IsLocation (LOCATION_MZONE ) and chkc :IsAttackBelow (2400 ) and chkc :IsFaceup () end
56+ if chk == 0 then return Duel .IsExistingTarget (aux .FaceupFilter (Card .IsAttackBelow ,2400 ),tp ,LOCATION_MZONE ,LOCATION_MZONE ,1 ,nil ) end
57+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
58+ local g = Duel .SelectTarget (tp ,aux .FaceupFilter (Card .IsAttackBelow ,2400 ),tp ,LOCATION_MZONE ,LOCATION_MZONE ,1 ,1 ,nil )
59+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,1 ,tp ,0 )
60+ Duel .SetPossibleOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_HAND |LOCATION_DECK )
61+ end
62+ function s .desop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
63+ local tc = Duel .GetFirstTarget ()
64+ if tc :IsRelateToEffect (e ) and tc :IsMonster () and Duel .Destroy (tc ,REASON_EFFECT )> 0 and tc :IsPreviousControler (tp ) and tc :HasLevel ()
65+ and Duel .GetMZoneCount (tp )> 0 then
66+ local lv = tc :GetOriginalLevel ()+ 2
67+ if Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_HAND |LOCATION_DECK ,0 ,1 ,nil ,e ,tp ,lv )
68+ and Duel .SelectYesNo (tp ,aux .Stringid (id ,2 )) then
69+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
70+ local g = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_HAND |LOCATION_DECK ,0 ,1 ,1 ,nil ,e ,tp ,lv )
71+ if # g > 0 then
72+ Duel .BreakEffect ()
73+ Duel .SpecialSummon (g ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
74+ end
75+ end
76+ end
77+ end
0 commit comments