1+ -- トリプル・ヴァイパー
2+ -- Hydra Viper
3+ -- Scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Increase ATK
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_ATKCHANGE )
10+ e1 :SetType (EFFECT_TYPE_IGNITION )
11+ e1 :SetRange (LOCATION_MZONE )
12+ e1 :SetCountLimit (1 )
13+ e1 :SetCost (s .cost )
14+ e1 :SetTarget (s .target )
15+ e1 :SetOperation (s .operation )
16+ c :RegisterEffect (e1 )
17+ end
18+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
19+ if chk == 0 then return Duel .IsExistingMatchingCard (nil ,tp ,LOCATION_MZONE ,0 ,1 ,e :GetHandler ()) end
20+ end
21+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
22+ if chk == 0 then return e :GetHandler ():GetEffectCount (EFFECT_EXTRA_ATTACK )== 0 end
23+ end
24+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
25+ local c = e :GetHandler ()
26+ -- Requirement
27+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
28+ local g = Duel .SelectMatchingCard (tp ,nil ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,c )
29+ if Duel .SendtoGrave (g ,REASON_COST )== 0 then return end
30+ -- Effect
31+ local e1 = Effect .CreateEffect (c )
32+ e1 :SetDescription (aux .Stringid (id ,1 ))
33+ e1 :SetType (EFFECT_TYPE_SINGLE )
34+ e1 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_CLIENT_HINT )
35+ e1 :SetCode (EFFECT_EXTRA_ATTACK )
36+ e1 :SetValue (2 )
37+ e1 :SetReset (RESETS_STANDARD_PHASE_END )
38+ c :RegisterEffect (e1 )
39+ end
0 commit comments