1+ -- マッシグ・ニャングラー
2+ -- Mässig Anglurr
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Send the top 2 cards of your Deck to the GY
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_DECKDES )
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+ return e :GetHandler ():IsStatus (STATUS_SUMMON_TURN )
20+ end
21+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
22+ if chk == 0 then return Duel .IsPlayerCanDiscardDeck (tp ,2 ) or Duel .IsPlayerCanDiscardDeck (1 - tp ,2 ) end
23+ Duel .SetOperationInfo (0 ,CATEGORY_DECKDES ,nil ,0 ,tp ,2 )
24+ end
25+ function s .spfilter (c ,e ,tp )
26+ if Duel .GetTurnCount ()~= 2 and c :IsLevelAbove (7 ) then return false end
27+ return c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ,POS_FACEUP_DEFENSE )
28+ end
29+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
30+ -- Effect
31+ local b1 = Duel .IsPlayerCanDiscardDeck (tp ,2 )
32+ local b2 = Duel .IsPlayerCanDiscardDeck (1 - tp ,2 )
33+ local op = Duel .SelectEffect (tp ,{b1 ,aux .Stringid (id ,0 )},{b2 ,aux .Stringid (id ,1 )})
34+ local ct = 0
35+ if op == 1 then ct = Duel .DiscardDeck (tp ,2 ,REASON_EFFECT ) elseif op == 2 then ct = Duel .DiscardDeck (1 - tp ,2 ,REASON_EFFECT ) end
36+ local g = Duel .GetMatchingGroup (aux .NecroValleyFilter (s .spfilter ),tp ,0 ,LOCATION_GRAVE ,nil ,e ,tp )
37+ if # g > 0 and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0 and Duel .SelectYesNo (tp ,aux .Stringid (id ,2 )) then
38+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
39+ local sg = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,0 ,LOCATION_GRAVE ,1 ,1 ,nil ,e ,tp )
40+ if # sg > 0 then
41+ Duel .BreakEffect ()
42+ Duel .SpecialSummon (sg ,0 ,tp ,tp ,false ,false ,POS_FACEUP_DEFENSE )
43+ end
44+ end
45+ end
0 commit comments