1+ -- 帝王の采配
2+ -- By Order of the Monarch
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Add 1 LIGHT/DARK Effect monster with 800 ATK and 1000 DEF
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_TOHAND )
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+ function s .thfilter (c )
17+ return c :IsMonster () and c :IsType (TYPE_EFFECT ) and c :IsAttribute (ATTRIBUTE_LIGHT |ATTRIBUTE_DARK ) and c :IsAttack (800 ) and c :IsDefense (1000 ) and c :IsAbleToHand ()
18+ end
19+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
20+ if chk == 0 then return Duel .IsExistingMatchingCard (s .thfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ) end
21+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,LOCATION_GRAVE )
22+ end
23+ function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
24+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
25+ local g = Duel .SelectMatchingCard (tp ,s .thfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil )
26+ if # g > 0 then
27+ Duel .SendtoHand (g ,nil ,REASON_EFFECT )
28+ Duel .ConfirmCards (1 - tp ,g )
29+ end
30+ end
0 commit comments