1+ -- モーム
2+ -- Mormolith
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Destroy 1 EARTH monster
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_DESTROY )
10+ e1 :SetType (EFFECT_TYPE_IGNITION )
11+ e1 :SetRange (LOCATION_MZONE )
12+ e1 :SetCountLimit (1 )
13+ e1 :SetTarget (s .target )
14+ e1 :SetOperation (s .operation )
15+ c :RegisterEffect (e1 )
16+ end
17+ function s .filter (c )
18+ return c :IsFaceup () and c :IsAttribute (ATTRIBUTE_EARTH ) and not c :IsMaximumModeSide ()
19+ end
20+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
21+ if chk == 0 then return Duel .IsExistingMatchingCard (s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) end
22+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,1 ,tp ,0 )
23+ end
24+ function s .desfilter (c ,atk )
25+ return c :IsFaceup () and c :IsDefenseBelow (atk ) and not c :IsMaximumMode ()
26+ end
27+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
28+ -- Effect
29+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
30+ local g = Duel .SelectMatchingCard (tp ,s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil )
31+ if # g == 0 then return end
32+ Duel .HintSelection (g )
33+ local g2 = Duel .GetMatchingGroup (s .desfilter ,0 ,LOCATION_MZONE ,LOCATION_MZONE ,nil ,g :GetFirst ():GetAttack ())
34+ g :Merge (g2 )
35+ Duel .Destroy (g ,REASON_EFFECT )
36+ end
0 commit comments