1+ -- アニマジカ・トレーダー
2+ -- Animagica Gardna
3+ -- Scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Mill and add to hand
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_DECKDES + CATEGORY_TOHAND )
10+ e1 :SetType (EFFECT_TYPE_IGNITION )
11+ e1 :SetRange (LOCATION_MZONE )
12+ e1 :SetCountLimit (1 )
13+ e1 :SetCondition (s .condition )
14+ e1 :SetCost (s .cost )
15+ e1 :SetTarget (s .target )
16+ e1 :SetOperation (s .operation )
17+ c :RegisterEffect (e1 )
18+ end
19+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
20+ return e :GetHandler ():IsStatus (STATUS_SUMMON_TURN |STATUS_SPSUMMON_TURN )
21+ end
22+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
23+ if chk == 0 then return Duel .IsExistingMatchingCard (Card .IsAbleToGraveAsCost ,tp ,LOCATION_HAND ,0 ,1 ,nil ) end
24+ end
25+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
26+ if chk == 0 then return Duel .IsPlayerCanDiscardDeck (tp ,3 ) end
27+ Duel .SetOperationInfo (0 ,CATEGORY_DECKDES ,nil ,0 ,tp ,3 )
28+ Duel .SetPossibleOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,LOCATION_GRAVE )
29+ end
30+ function s .thfilter (c )
31+ return c :IsAttribute (ATTRIBUTE_LIGHT ) and c :IsRace (RACE_BEAST ) and c :IsLevel (7 ,8 ) and c :IsDefenseAbove (1500 ) and c :IsAbleToHand ()
32+ end
33+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
34+ -- Requirement
35+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
36+ local g = Duel .SelectMatchingCard (tp ,Card .IsAbleToGraveAsCost ,tp ,LOCATION_HAND ,0 ,1 ,1 ,nil )
37+ Duel .SendtoGrave (g ,REASON_COST )
38+ -- Effect
39+ if Duel .DiscardDeck (tp ,3 ,REASON_EFFECT )< 1 then return end
40+ if Duel .IsExistingMatchingCard (aux .NecroValleyFilter (s .thfilter ),tp ,LOCATION_GRAVE ,0 ,1 ,nil ) and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
41+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
42+ local g = Duel .SelectMatchingCard (tp ,aux .NecroValleyFilter (s .thfilter ),tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil )
43+ if # g > 0 then
44+ Duel .BreakEffect ()
45+ Duel .SendtoHand (g ,nil ,REASON_EFFECT )
46+ Duel .ConfirmCards (1 - tp ,g )
47+ end
48+ end
49+ end
0 commit comments