1+ -- ドラグニティロード-ゲオルギアス
2+ -- Dragunity Lord - Georgius
3+ local s ,id = GetID ()
4+ function s .initial_effect (c )
5+ c :EnableReviveLimit ()
6+ -- Link Summon procedure: 2+ monsters, including a Tuner
7+ Link .AddProcedure (c ,nil ,2 ,4 ,s .tunermatcheck )
8+ -- Your opponent cannot activate the effects of monsters in the GY while this card is equipped with a "Dragunity" card
9+ local e1 = Effect .CreateEffect (c )
10+ e1 :SetType (EFFECT_TYPE_FIELD )
11+ e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
12+ e1 :SetCode (EFFECT_CANNOT_ACTIVATE )
13+ e1 :SetRange (LOCATION_MZONE )
14+ e1 :SetTargetRange (0 ,1 )
15+ e1 :SetCondition (function (e ) return e :GetHandler ():GetEquipGroup ():IsExists (Card .IsSetCard ,1 ,nil ,SET_DRAGUNITY ) end )
16+ e1 :SetValue (function (e ,re ,tp ) return re :IsMonsterEffect () and re :GetHandler ():IsLocation (LOCATION_GRAVE ) end )
17+ c :RegisterEffect (e1 )
18+ -- Special Summon 1 Level 5 or higher "Dragunity" monster from your Extra Deck or GY
19+ local e2a = Effect .CreateEffect (c )
20+ e2a :SetDescription (aux .Stringid (id ,0 ))
21+ e2a :SetCategory (CATEGORY_SPECIAL_SUMMON )
22+ e2a :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
23+ e2a :SetProperty (EFFECT_FLAG_DELAY )
24+ e2a :SetCode (EVENT_SPSUMMON_SUCCESS )
25+ e2a :SetCountLimit (1 ,id )
26+ e2a :SetCondition (function (e ) return e :GetHandler ():IsLinkSummoned () end )
27+ e2a :SetTarget (s .sptg )
28+ e2a :SetOperation (s .spop )
29+ c :RegisterEffect (e2a )
30+ local e2b = e2a :Clone ()
31+ e2b :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O )
32+ e2b :SetRange (LOCATION_MZONE )
33+ e2b :SetCondition (function (e ,tp ,eg ,ep ,ev ,re ,r ,rp ) return not eg :IsContains (e :GetHandler ()) and eg :IsExists (Card .IsSummonPlayer ,1 ,nil ,1 - tp ) end )
34+ c :RegisterEffect (e2b )
35+ -- Negate an opponent's activated Spell/Trap Card or effect
36+ local e3 = Effect .CreateEffect (c )
37+ e3 :SetDescription (aux .Stringid (id ,1 ))
38+ e3 :SetCategory (CATEGORY_DISABLE )
39+ e3 :SetType (EFFECT_TYPE_QUICK_O )
40+ e3 :SetCode (EVENT_CHAINING )
41+ e3 :SetRange (LOCATION_MZONE )
42+ e3 :SetCountLimit (1 ,{id ,1 })
43+ e3 :SetCondition (function (e ,tp ,eg ,ep ,ev ,re ,r ,rp ) return ep == 1 - tp and re :IsSpellTrapEffect () and Duel .IsChainDisablable (ev ) end )
44+ e3 :SetCost (s .discost )
45+ e3 :SetTarget (function (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ) if chk == 0 then return true end Duel .SetOperationInfo (0 ,CATEGORY_DISABLE ,eg ,1 ,tp ,0 ) end )
46+ e3 :SetOperation (function (e ,tp ,eg ,ep ,ev ,re ,r ,rp ) Duel .NegateEffect (ev ) end )
47+ c :RegisterEffect (e3 )
48+ aux .DoubleSnareValidity (c ,LOCATION_MZONE )
49+ end
50+ s .listed_series = {SET_DRAGUNITY }
51+ function s .tunermatcheck (g ,lc ,sumtype ,tp )
52+ return g :IsExists (Card .IsType ,1 ,nil ,TYPE_TUNER ,lc ,sumtype ,tp )
53+ end
54+ function s .spfilter (c ,e ,tp ,mmz_chk )
55+ if not (c :IsLevelAbove (5 ) and c :IsSetCard (SET_DRAGUNITY ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )) then return false end
56+ if c :IsLocation (LOCATION_EXTRA ) then
57+ return Duel .GetLocationCountFromEx (tp ,tp ,nil ,c )> 0
58+ else
59+ return mmz_chk
60+ end
61+ end
62+ function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
63+ if chk == 0 then return Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_EXTRA |LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp ,Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0 ) end
64+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_EXTRA |LOCATION_GRAVE )
65+ end
66+ function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
67+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
68+ local g = Duel .SelectMatchingCard (tp ,aux .NecroValleyFilter (s .spfilter ),tp ,LOCATION_EXTRA |LOCATION_GRAVE ,0 ,1 ,1 ,nil ,e ,tp ,Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0 )
69+ if # g > 0 then
70+ Duel .SpecialSummon (g ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
71+ end
72+ end
73+ function s .discost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
74+ if chk == 0 then return Duel .IsExistingMatchingCard (aux .AND (Card .IsEquipCard ,Card .IsAbleToGraveAsCost ),tp ,LOCATION_ONFIELD ,0 ,1 ,nil ) end
75+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
76+ local g = Duel .SelectMatchingCard (tp ,aux .AND (Card .IsEquipCard ,Card .IsAbleToGraveAsCost ),tp ,LOCATION_ONFIELD ,0 ,1 ,1 ,nil )
77+ Duel .SendtoGrave (g ,REASON_COST )
78+ end
0 commit comments