1+ -- マグマ・ドラゴン
2+ -- Magma Dragon
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Special Summon 1 monster from the hand
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 :SetCondition (s .condition )
14+ e1 :SetTarget (s .target )
15+ e1 :SetOperation (s .operation )
16+ c :RegisterEffect (e1 )
17+ end
18+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
19+ local c = e :GetHandler ()
20+ return c :IsSummonPhaseMain () and c :IsStatus (STATUS_SUMMON_TURN + STATUS_SPSUMMON_TURN )
21+ end
22+ function s .spfilter (c ,e ,tp )
23+ return c :IsRace (RACE_WYRM ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ,POS_FACEUP_DEFENSE )
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 ,0 ,tp ,LOCATION_GRAVE )
28+ end
29+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
30+ -- Effect
31+ if Duel .GetLocationCount (tp ,LOCATION_MZONE )< 1 then return end
32+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
33+ local g = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil ,e ,tp )
34+ Duel .SpecialSummon (g ,0 ,tp ,tp ,false ,false ,POS_FACEUP_DEFENSE )
35+ -- Cannot activate its effects
36+ local e1 = Effect .CreateEffect (e :GetHandler ())
37+ e1 :SetDescription (3302 )
38+ e1 :SetProperty (EFFECT_FLAG_CLIENT_HINT )
39+ e1 :SetType (EFFECT_TYPE_SINGLE )
40+ e1 :SetCode (EFFECT_CANNOT_TRIGGER )
41+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
42+ g :GetFirst ():RegisterEffect (e1 )
43+ end
0 commit comments