1+ -- ラヴ・ラビット
2+ -- Lovely Rabbit
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Draw and send 1 card from hand to GY
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetCategory (CATEGORY_DRAW + CATEGORY_HANDES )
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 Duel .GetFieldGroupCount (tp ,LOCATION_DECK ,0 )>= 10
20+ end
21+ function s .cfilter (c )
22+ return c :IsMonster () and c :IsRace (RACE_FAIRY ) and c :IsAttack (0 ) and not c :IsPublic ()
23+ end
24+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
25+ if chk == 0 then return Duel .IsExistingMatchingCard (s .cfilter ,tp ,LOCATION_HAND ,0 ,1 ,nil ) end
26+ end
27+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
28+ if chk == 0 then return Duel .IsPlayerCanDraw (tp ,1 ) end
29+ Duel .SetTargetPlayer (tp )
30+ Duel .SetTargetParam (1 )
31+ Duel .SetOperationInfo (0 ,CATEGORY_DRAW ,nil ,0 ,tp ,1 )
32+ Duel .SetOperationInfo (0 ,CATEGORY_HANDES ,nil ,0 ,tp ,1 )
33+ end
34+ function s .filter (c )
35+ return c :IsFaceup () and c :IsRace (RACE_FAIRY ) and c :IsAttribute (ATTRIBUTE_DARK ) and c :GetBaseAttack ()== 0
36+ end
37+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
38+ -- Requirement
39+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_CONFIRM )
40+ local tc = Duel .SelectMatchingCard (tp ,s .cfilter ,tp ,LOCATION_HAND ,0 ,1 ,1 ,nil )
41+ Duel .ConfirmCards (1 - tp ,tc )
42+ Duel .ShuffleHand (tp )
43+ -- Effect
44+ local p ,d = Duel .GetChainInfo (0 ,CHAININFO_TARGET_PLAYER ,CHAININFO_TARGET_PARAM )
45+ if Duel .Draw (p ,d ,REASON_EFFECT )< 1 then return end
46+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
47+ local g = Duel .SelectMatchingCard (tp ,Card .IsAbleToGrave ,tp ,LOCATION_HAND ,0 ,1 ,1 ,nil )
48+ if # g > 0 then
49+ Duel .BreakEffect ()
50+ Duel .SendtoGrave (g ,REASON_EFFECT )
51+ end
52+ if Duel .IsExistingMatchingCard (s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) and Duel .IsExistingMatchingCard (Card .IsFaceup ,tp ,0 ,LOCATION_MZONE ,1 ,nil ) and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
53+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATKDEF )
54+ local dg = Duel .SelectMatchingCard (tp ,aux .FilterMaximumSideFunctionEx (Card .IsFaceup ),tp ,0 ,LOCATION_MZONE ,1 ,1 ,nil )
55+ Duel .HintSelection (dg )
56+ local e1 = Effect .CreateEffect (e :GetHandler ())
57+ e1 :SetType (EFFECT_TYPE_SINGLE )
58+ e1 :SetCode (EFFECT_UPDATE_ATTACK )
59+ e1 :SetValue (- 1000 )
60+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
61+ dg :GetFirst ():RegisterEffect (e1 )
62+ end
63+ end
0 commit comments