1+ -- 髑巌騎士モルドルネ
2+ -- Mordorne the Skullcrag Knight
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 .cfilter )
8+ -- Make 1 of your monsters gain ATK
9+ local e2 = Effect .CreateEffect (c )
10+ e2 :SetDescription (aux .Stringid (id ,0 ))
11+ e2 :SetType (CATEGORY_ATKCHANGE )
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 .cfilter (c )
21+ return c :IsRace (RACE_ZOMBIE )
22+ end
23+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
24+ if chk == 0 then return Duel .IsPlayerCanDiscardDeckAsCost (tp ,1 ) end
25+ end
26+ function s .filter (c )
27+ return c :IsFaceup () and c :IsRace (RACE_ZOMBIE )
28+ end
29+ function s .filter2 (c )
30+ return s .filter (c ) and c :IsAttribute (ATTRIBUTE_WIND )
31+ end
32+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
33+ if chk == 0 then return Duel .IsExistingMatchingCard (s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,nil )
34+ and Duel .IsExistingMatchingCard (s .filter2 ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) end
35+ local ct = Duel .GetMatchingGroupCount (s .filter ,tp ,LOCATION_MZONE ,0 ,nil )
36+ Duel .SetOperationInfo (0 ,CATEGORY_ATKCHANGE ,nil ,1 ,tp ,ct * 400 )
37+ end
38+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
39+ -- Requirement
40+ if Duel .DiscardDeck (tp ,1 ,REASON_COST )< 1 then return end
41+ -- Effect
42+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_FACEUP )
43+ local ct = Duel .GetMatchingGroupCount (s .filter ,tp ,LOCATION_MZONE ,0 ,nil )
44+ local g = Duel .SelectMatchingCard (tp ,s .filter2 ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil )
45+ if # g > 0 and ct > 0 then
46+ Duel .HintSelection (g )
47+ local tc = g :GetFirst ()
48+ -- Gains ATK
49+ local e1 = Effect .CreateEffect (e :GetHandler ())
50+ e1 :SetType (EFFECT_TYPE_SINGLE )
51+ e1 :SetCode (EFFECT_UPDATE_ATTACK )
52+ e1 :SetValue (ct * 400 )
53+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
54+ tc :RegisterEffect (e1 )
55+ end
56+ end
0 commit comments