1+ -- エクスキューティー・メイト
2+ -- Executie Mates
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Increase Level by 1
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetType (EFFECT_TYPE_IGNITION )
10+ e1 :SetRange (LOCATION_MZONE )
11+ e1 :SetCountLimit (1 )
12+ e1 :SetCost (s .cost )
13+ e1 :SetTarget (s .target )
14+ e1 :SetOperation (s .operation )
15+ c :RegisterEffect (e1 )
16+ aux .GlobalCheck (s ,function ()
17+ local ge1 = Effect .CreateEffect (c )
18+ ge1 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS )
19+ ge1 :SetCode (EVENT_DRAW )
20+ ge1 :SetOperation (s .checkop )
21+ Duel .RegisterEffect (ge1 ,0 )
22+ end )
23+ end
24+ function s .checkop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
25+ if Duel .IsMainPhase () then
26+ Duel .RegisterFlagEffect (rp ,id ,RESET_PHASE |PHASE_END ,0 ,1 )
27+ end
28+ end
29+ function s .cfilter (c )
30+ return c :IsMonster () and c :IsLevel (6 ) and c :IsDefense (500 ) and not c :IsPublic ()
31+ end
32+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
33+ if chk == 0 then return Duel .IsExistingMatchingCard (s .cfilter ,tp ,LOCATION_HAND ,0 ,1 ,nil ) end
34+ end
35+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
36+ if chk == 0 then return e :GetHandler ():HasLevel () end
37+ end
38+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
39+ -- Requirement
40+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_CONFIRM )
41+ local tc = Duel .SelectMatchingCard (tp ,s .cfilter ,tp ,LOCATION_HAND ,0 ,1 ,1 ,nil )
42+ Duel .ConfirmCards (1 - tp ,tc )
43+ Duel .ShuffleHand (tp )
44+ -- Effect
45+ local c = e :GetHandler ()
46+ c :UpdateLevel (2 ,RESETS_STANDARD_PHASE_END ,c )
47+ if Duel .GetFlagEffect (tp ,id )== 0 and Duel .IsPlayerCanDraw (tp ,1 ) and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
48+ Duel .BreakEffect ()
49+ Duel .Draw (tp ,1 ,REASON_EFFECT )
50+ end
51+ local e1 = Effect .CreateEffect (c )
52+ e1 :SetType (EFFECT_TYPE_FIELD )
53+ e1 :SetCode (EFFECT_CANNOT_ATTACK )
54+ e1 :SetProperty (EFFECT_FLAG_OATH )
55+ e1 :SetTargetRange (LOCATION_MZONE ,0 )
56+ e1 :SetTarget (s .ftarget )
57+ e1 :SetReset (RESET_PHASE |PHASE_END )
58+ Duel .RegisterEffect (e1 ,tp )
59+ end
60+ function s .ftarget (e ,c )
61+ return c :IsLevelAbove (7 )
62+ end
0 commit comments