1+ -- 幻遭のキメラスネーク
2+ -- Mythical Chimera Snake
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ local e1 = Effect .CreateEffect (c )
7+ e1 :SetDescription (aux .Stringid (id ,0 ))
8+ e1 :SetCategory (CATEGORY_TODECK + CATEGORY_DRAW )
9+ e1 :SetType (EFFECT_TYPE_IGNITION )
10+ e1 :SetRange (LOCATION_MZONE )
11+ e1 :SetCountLimit (1 )
12+ e1 :SetCondition (s .condition )
13+ e1 :SetCost (s .cost )
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 .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
22+ if chk == 0 then return Duel .IsPlayerCanDiscardDeckAsCost (tp ,2 ) end
23+ end
24+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
25+ if chk == 0 then return Duel .IsExistingMatchingCard (Card .IsAbleToDeck ,tp ,0 ,LOCATION_GRAVE ,1 ,nil ) end
26+ Duel .SetOperationInfo (0 ,CATEGORY_TODECK ,nil ,2 ,1 - tp ,LOCATION_GRAVE )
27+ end
28+ function s .cfilter (c )
29+ return c :IsLocation (LOCATION_GRAVE ) and c :IsAttribute (ATTRIBUTE_WIND ) and c :IsMonster ()
30+ end
31+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
32+ -- Requirement
33+ if Duel .DiscardDeck (tp ,2 ,REASON_COST )< 0 then return end
34+ local og = Duel .GetOperatedGroup ()
35+ -- Effect
36+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TODECK )
37+ local g = Duel .SelectMatchingCard (tp ,aux .NecroValleyFilter (Card .IsAbleToDeck ),tp ,0 ,LOCATION_GRAVE ,1 ,2 ,nil )
38+ Duel .HintSelection (g )
39+ if # g == 0 then return end
40+ local ct = og :FilterCount (s .cfilter ,nil )
41+ if Duel .SendtoDeck (g ,nil ,SEQ_DECKSHUFFLE ,REASON_EFFECT )> 0 and ct > 0 and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
42+ Duel .BreakEffect ()
43+ Duel .Damage (1 - tp ,400 ,REASON_EFFECT )
44+ end
45+ end
0 commit comments