1+ -- 燿ける聖詩の獄神精
2+ -- Elvennotes Power Patron
3+ -- scripted by pyrQ
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- You cannot Special Summon from the Extra Deck, except Synchro Monsters
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetType (EFFECT_TYPE_FIELD )
9+ e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
10+ e1 :SetCode (EFFECT_CANNOT_SPECIAL_SUMMON )
11+ e1 :SetRange (LOCATION_MZONE )
12+ e1 :SetTargetRange (1 ,0 )
13+ e1 :SetTarget (function (e ,c ) return c :IsLocation (LOCATION_EXTRA ) and not c :IsSynchroMonster () end )
14+ c :RegisterEffect (e1 )
15+ aux .addContinuousLizardCheck (c ,LOCATION_MZONE ,function (e ,c ) return not c :IsOriginalType (TYPE_SYNCHRO ) end )
16+ -- Increase the Level of the monster in your center Main Monster Zone by 3 (until the end of this turn), then immediately after this effect resolves, you can Synchro Summon 1 "Elvennotes" monster or "Junora the Power Patron of Tuning"
17+ local e2 = Effect .CreateEffect (c )
18+ e2 :SetDescription (aux .Stringid (id ,0 ))
19+ e2 :SetCategory (CATEGORY_LVCHANGE + CATEGORY_SPECIAL_SUMMON )
20+ e2 :SetType (EFFECT_TYPE_QUICK_O )
21+ e2 :SetProperty (EFFECT_FLAG_CARD_TARGET )
22+ e2 :SetCode (EVENT_FREE_CHAIN )
23+ e2 :SetRange (LOCATION_MZONE )
24+ e2 :SetCountLimit (1 ,id )
25+ e2 :SetCondition (function () return Duel .IsMainPhase () end )
26+ e2 :SetTarget (s .lvtg )
27+ e2 :SetOperation (s .lvop )
28+ e2 :SetHintTiming (0 ,TIMING_MAIN_END |TIMINGS_CHECK_MONSTER )
29+ c :RegisterEffect (e2 )
30+ -- Add 1 "Elvennotes" card from your Deck to your hand
31+ local e3 = Effect .CreateEffect (c )
32+ e3 :SetDescription (aux .Stringid (id ,1 ))
33+ e3 :SetCategory (CATEGORY_TOHAND + CATEGORY_SEARCH )
34+ e3 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
35+ e3 :SetProperty (EFFECT_FLAG_DELAY )
36+ e3 :SetCode (EVENT_BE_MATERIAL )
37+ e3 :SetCountLimit (1 ,{id ,1 })
38+ e3 :SetCondition (function (e ,tp ,eg ,ep ,ev ,re ,r ,rp ) return e :GetHandler ():IsLocation (LOCATION_GRAVE ) and r == REASON_SYNCHRO end )
39+ e3 :SetTarget (s .thtg )
40+ e3 :SetOperation (s .thop )
41+ c :RegisterEffect (e3 )
42+ end
43+ s .listed_series = {SET_ELVENNOTES }
44+ s .listed_names = {101303039 } -- "Junora the Power Patron of Tuning"
45+ function s .lvfilter (c )
46+ return c :IsSequence (2 ) and c :HasLevel () and c :IsFaceup ()
47+ end
48+ function s .lvtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
49+ if chkc then return chkc :IsControler (tp ) and chkc :IsLocation (LOCATION_MMZONE ) and s .lvfilter (chkc ) end
50+ if chk == 0 then return Duel .IsExistingTarget (s .lvfilter ,tp ,LOCATION_MMZONE ,0 ,1 ,nil ) end
51+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TARGET )
52+ local g = Duel .SelectTarget (tp ,s .lvfilter ,tp ,LOCATION_MMZONE ,0 ,1 ,1 ,nil )
53+ Duel .SetOperationInfo (0 ,CATEGORY_LVCHANGE ,g ,1 ,tp ,3 )
54+ Duel .SetPossibleOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_EXTRA )
55+ end
56+ function s .synchrofilter (c )
57+ return (c :IsSetCard (SET_ELVENNOTES ) or c :IsCode (101303039 )) and c :IsSynchroSummonable ()
58+ end
59+ function s .lvop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
60+ local tc = Duel .GetFirstTarget ()
61+ if tc :IsRelateToEffect (e ) and tc :IsFaceup () then
62+ local prev_lv = tc :GetLevel ()
63+ -- Increase its Level by 3
64+ local e1 = Effect .CreateEffect (e :GetHandler ())
65+ e1 :SetType (EFFECT_TYPE_SINGLE )
66+ e1 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE )
67+ e1 :SetCode (EFFECT_UPDATE_LEVEL )
68+ e1 :SetValue (3 )
69+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
70+ tc :RegisterEffect (e1 )
71+ Duel .AdjustInstantly (tc )
72+ if not tc :IsLevel (prev_lv + 3 ) then return end
73+ local g = Duel .GetMatchingGroup (s .synchrofilter ,tp ,LOCATION_EXTRA ,0 ,1 ,nil )
74+ if # g > 0 and Duel .SelectYesNo (tp ,aux .Stringid (id ,2 )) then
75+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
76+ local sc = g :Select (tp ,1 ,1 ,nil ):GetFirst ()
77+ Duel .SynchroSummon (tp ,sc )
78+ end
79+ end
80+ end
81+ function s .thfilter (c )
82+ return c :IsSetCard (SET_ELVENNOTES ) and c :IsAbleToHand ()
83+ end
84+ function s .thtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
85+ if chk == 0 then return Duel .IsExistingMatchingCard (s .thfilter ,tp ,LOCATION_DECK ,0 ,1 ,nil ) end
86+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,LOCATION_DECK )
87+ end
88+ function s .thop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
89+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
90+ local g = Duel .SelectMatchingCard (tp ,s .thfilter ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil )
91+ if # g > 0 then
92+ Duel .SendtoHand (g ,nil ,REASON_EFFECT )
93+ Duel .ConfirmCards (1 - tp ,g )
94+ end
95+ end
0 commit comments