1+ -- 洗礼の暗黒騎士ガイア
2+ -- Dedicated Gaia the Fierce Knight
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Name becomes "Gaia the Fierce Knight" in the hand or Graveyard
7+ local e0 = Effect .CreateEffect (c )
8+ e0 :SetType (EFFECT_TYPE_SINGLE )
9+ e0 :SetCode (EFFECT_CHANGE_CODE )
10+ e0 :SetProperty (EFFECT_FLAG_SINGLE_RANGE )
11+ e0 :SetRange (LOCATION_HAND |LOCATION_GRAVE )
12+ e0 :SetValue (6368038 )
13+ c :RegisterEffect (e0 )
14+ -- Add 1 card from the GY
15+ local e1 = Effect .CreateEffect (c )
16+ e1 :SetDescription (aux .Stringid (id ,0 ))
17+ e1 :SetCategory (CATEGORY_TOHAND )
18+ e1 :SetType (EFFECT_TYPE_IGNITION )
19+ e1 :SetRange (LOCATION_MZONE )
20+ e1 :SetCountLimit (1 )
21+ e1 :SetCondition (s .condition )
22+ e1 :SetTarget (s .target )
23+ e1 :SetOperation (s .operation )
24+ c :RegisterEffect (e1 )
25+ end
26+ s .listed_names = {55761792 }
27+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
28+ local c = e :GetHandler ()
29+ return c :IsSummonPhaseMain () and c :IsStatus (STATUS_SUMMON_TURN + STATUS_SPSUMMON_TURN )
30+ end
31+ function s .thfilter (c )
32+ return c :IsCode (55761792 ) and c :IsAbleToHand ()
33+ end
34+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
35+ if chk == 0 then return Duel .IsExistingMatchingCard (s .thfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ) end
36+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,LOCATION_GRAVE )
37+ end
38+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
39+ local c = e :GetHandler ()
40+ -- Effect
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 .SendtoHand (g ,nil ,REASON_EFFECT )
45+ Duel .ConfirmCards (1 - tp ,g )
46+ if c :HasLevel () and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
47+ c :UpdateLevel (1 ,RESETS_STANDARD_PHASE_END ,c )
48+ end
49+ end
50+ end
0 commit comments