1+ -- いとをかしとり
2+ -- Grace Bird
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Draw
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_DRAW )
10+ e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
11+ e1 :SetType (EFFECT_TYPE_IGNITION )
12+ e1 :SetRange (LOCATION_MZONE )
13+ e1 :SetCountLimit (1 )
14+ e1 :SetCondition (s .condition )
15+ e1 :SetCost (s .cost )
16+ e1 :SetTarget (s .target )
17+ e1 :SetOperation (s .operation )
18+ c :RegisterEffect (e1 )
19+ end
20+ s .listed_names = {160004013 }
21+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
22+ return Duel .GetFieldGroupCount (tp ,LOCATION_DECK ,0 )>= 10
23+ end
24+ function s .costfilter (c )
25+ return c :IsMonster () and c :IsRace (RACE_AQUA ) and c :IsAttribute (ATTRIBUTE_LIGHT ) and c :IsAbleToGraveAsCost ()
26+ end
27+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
28+ if chk == 0 then return Duel .IsExistingMatchingCard (s .costfilter ,tp ,LOCATION_HAND ,0 ,1 ,nil ) end
29+ end
30+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
31+ if chk == 0 then return Duel .IsPlayerCanDraw (tp ,1 ) end
32+ Duel .SetTargetPlayer (tp )
33+ Duel .SetTargetParam (1 )
34+ Duel .SetOperationInfo (0 ,CATEGORY_DRAW ,nil ,0 ,tp ,1 )
35+ end
36+ function s .thfilter (c )
37+ return c :IsCode (160004013 ) and c :IsAbleToHand ()
38+ end
39+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
40+ -- Requirement
41+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
42+ local g = Duel .SelectMatchingCard (tp ,s .costfilter ,tp ,LOCATION_HAND ,0 ,1 ,1 ,nil )
43+ if Duel .SendtoGrave (g ,REASON_COST )< 1 then return end
44+ -- Effect
45+ local p ,d = Duel .GetChainInfo (0 ,CHAININFO_TARGET_PLAYER ,CHAININFO_TARGET_PARAM )
46+ if Duel .Draw (p ,d ,REASON_EFFECT )> 0 and Duel .IsExistingMatchingCard (aux .NecroValleyFilter (s .thfilter ),tp ,LOCATION_GRAVE ,0 ,1 ,nil )
47+ and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
48+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
49+ local g2 = Duel .SelectMatchingCard (tp ,aux .NecroValleyFilter (s .thfilter ),tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil )
50+ if # g2 > 0 then
51+ Duel .BreakEffect ()
52+ Duel .SendtoHand (g2 ,nil ,REASON_EFFECT )
53+ Duel .ConfirmCards (1 - tp ,g2 )
54+ end
55+ end
56+ end
0 commit comments