1+ -- ジュークジョイント“Killer Tune”
2+ -- Juke Joint "Killer Tune"
3+ -- scripted by Naim
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Activate
7+ local e0 = Effect .CreateEffect (c )
8+ e0 :SetType (EFFECT_TYPE_ACTIVATE )
9+ e0 :SetCode (EVENT_FREE_CHAIN )
10+ c :RegisterEffect (e0 )
11+ -- You can Normal Summon 1 Tuner in addition to your Normal Summon/Set
12+ local e1 = Effect .CreateEffect (c )
13+ e1 :SetDescription (aux .Stringid (id ,0 ))
14+ e1 :SetType (EFFECT_TYPE_FIELD )
15+ e1 :SetRange (LOCATION_FZONE )
16+ e1 :SetTargetRange (LOCATION_HAND |LOCATION_MZONE ,0 )
17+ e1 :SetCode (EFFECT_EXTRA_SUMMON_COUNT )
18+ e1 :SetTarget (aux .TargetBoolFunction (Card .IsType ,TYPE_TUNER ))
19+ c :RegisterEffect (e1 )
20+ -- "Killer Tune Loudness War" you control gains 3300 ATK while your opponent has a Tuner in their field or GY
21+ local e2 = Effect .CreateEffect (c )
22+ e2 :SetType (EFFECT_TYPE_FIELD )
23+ e2 :SetCode (EFFECT_UPDATE_ATTACK )
24+ e2 :SetRange (LOCATION_FZONE )
25+ e2 :SetTargetRange (LOCATION_MZONE ,0 )
26+ e2 :SetTarget (aux .TargetBoolFunction (Card .IsCode ,41069676 ))
27+ e2 :SetValue (3300 )
28+ e2 :SetCondition (function (e ) return Duel .IsExistingMatchingCard (aux .FaceupFilter (Card .IsType ,TYPE_TUNER ),e :GetHandlerPlayer (),0 ,LOCATION_MZONE |LOCATION_GRAVE ,1 ,nil ) end )
29+ c :RegisterEffect (e2 )
30+ -- Add to your hand, or Special Summon, 1 "Killer Tune" monster from your Deck
31+ local e3 = Effect .CreateEffect (c )
32+ e3 :SetDescription (aux .Stringid (id ,1 ))
33+ e3 :SetCategory (CATEGORY_TOHAND + CATEGORY_SEARCH + CATEGORY_SPECIAL_SUMMON )
34+ e3 :SetType (EFFECT_TYPE_IGNITION )
35+ e3 :SetRange (LOCATION_FZONE )
36+ e3 :SetCountLimit (1 ,id )
37+ e3 :SetCost (s .thspcost )
38+ e3 :SetTarget (s .thsptg )
39+ e3 :SetOperation (s .thspop )
40+ c :RegisterEffect (e3 )
41+ end
42+ s .listed_names = {41069676 } -- "Killer Tune Loudness War"
43+ s .listed_series = {SET_KILLER_TUNE }
44+ function s .costfilter (c ,e ,tp )
45+ return c :IsType (TYPE_TUNER ) and Duel .IsExistingMatchingCard (s .thspfilter ,tp ,LOCATION_DECK ,0 ,1 ,nil ,e ,tp ,Duel .GetMZoneCount (tp ,c )> 0 )
46+ end
47+ function s .thspfilter (c ,e ,tp ,mmz_chk )
48+ return c :IsSetCard (SET_KILLER_TUNE ) and c :IsMonster ()
49+ and (c :IsAbleToHand () or (mmz_chk and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )))
50+ end
51+ function s .thspcost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
52+ if chk == 0 then return Duel .CheckReleaseGroupCost (tp ,s .costfilter ,1 ,false ,nil ,nil ,e ,tp ) end
53+ local g = Duel .SelectReleaseGroupCost (tp ,s .costfilter ,1 ,1 ,false ,nil ,nil ,e ,tp )
54+ Duel .Release (g ,REASON_COST )
55+ end
56+ function s .thsptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
57+ if chk == 0 then return true end
58+ Duel .SetPossibleOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,LOCATION_DECK )
59+ Duel .SetPossibleOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_DECK )
60+ end
61+ function s .thspop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
62+ local mmz_chk = Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
63+ Duel .Hint (HINT_SELECTMSG ,tp ,aux .Stringid (id ,2 ))
64+ local sc = Duel .SelectMatchingCard (tp ,s .thspfilter ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil ,e ,tp ,mmz_chk ):GetFirst ()
65+ if sc then
66+ aux .ToHandOrElse (sc ,tp ,
67+ function ()
68+ return mmz_chk and sc :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
69+ end ,
70+ function ()
71+ Duel .SpecialSummon (sc ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
72+ end ,
73+ aux .Stringid (id ,3 )
74+ )
75+ end
76+ -- You cannot Special Summon for the rest of this turn, except Tuners
77+ local e1 = Effect .CreateEffect (e :GetHandler ())
78+ e1 :SetDescription (aux .Stringid (id ,4 ))
79+ e1 :SetType (EFFECT_TYPE_FIELD )
80+ e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT )
81+ e1 :SetCode (EFFECT_CANNOT_SPECIAL_SUMMON )
82+ e1 :SetTargetRange (1 ,0 )
83+ e1 :SetTarget (s .splimit )
84+ e1 :SetReset (RESET_PHASE |PHASE_END )
85+ Duel .RegisterEffect (e1 ,tp )
86+ end
87+ function s .splimit (e ,c )
88+ if c :IsMonster () then
89+ return not c :IsType (TYPE_TUNER )
90+ elseif c :IsMonsterCard () then
91+ return not c :IsOriginalType (TYPE_TUNER )
92+ end
93+ end
0 commit comments