1+ -- 夢中の甘言
2+ -- Delirium Honeyed Words
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_ACTIVATE )
11+ e1 :SetCode (EVENT_FREE_CHAIN )
12+ e1 :SetTarget (s .target )
13+ e1 :SetOperation (s .activate )
14+ c :RegisterEffect (e1 )
15+ end
16+ s .listed_names = {160213065 ,160213067 } -- Delirium Embrace / Delirium Rebirth
17+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
18+ if chk == 0 then return Duel .IsPlayerCanDiscardDeck (tp ,2 ) end
19+ Duel .SetOperationInfo (0 ,CATEGORY_DECKDES ,nil ,0 ,tp ,2 )
20+ end
21+ function s .thfilter (c )
22+ return ((c :IsRace (RACE_INSECT ) and c :IsAttribute (ATTRIBUTE_LIGHT )) or c :IsCode (160213065 ,160213067 )) and c :IsLocation (LOCATION_GRAVE ) and c :IsAbleToHand ()
23+ end
24+ function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
25+ -- Effect
26+ Duel .DiscardDeck (tp ,2 ,REASON_EFFECT )
27+ local g = Duel .GetOperatedGroup ()
28+ if g :FilterCount (s .thfilter ,nil )> 0 and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
29+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
30+ local sg = g :FilterSelect (tp ,s .thfilter ,1 ,1 ,nil )
31+ if # sg > 0 then
32+ Duel .SendtoHand (sg ,nil ,REASON_EFFECT )
33+ Duel .ConfirmCards (1 - tp ,sg )
34+ end
35+ end
36+ end
0 commit comments