1+ -- T・K・G
2+ -- Tamabot King Golem
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Fusion Procedure
7+ c :EnableReviveLimit ()
8+ local e0 = Fusion .AddProcMixN (c ,true ,true ,CARD_TAMABOT ,3 )[1 ]
9+ e0 :SetDescription (aux .Stringid (id ,2 ))
10+ local e1 = Fusion .AddProcMix (c ,true ,true ,CARD_TAMABOT ,s .ffilter )[1 ]
11+ e1 :SetDescription (aux .Stringid (id ,3 ))
12+ -- Make 1 monster lose 600 ATK
13+ local e2 = Effect .CreateEffect (c )
14+ e2 :SetDescription (aux .Stringid (id ,0 ))
15+ e2 :SetCategory (CATEGORY_ATKCHANGE )
16+ e2 :SetType (EFFECT_TYPE_IGNITION )
17+ e2 :SetRange (LOCATION_MZONE )
18+ e2 :SetCountLimit (1 )
19+ e2 :SetCost (s .cost )
20+ e2 :SetTarget (s .target )
21+ e2 :SetOperation (s .operation )
22+ c :RegisterEffect (e2 )
23+ end
24+ s .listed_names = {CARD_TAMABOT }
25+ function s .ffilter (c ,fc ,sumtype ,tp )
26+ return c :IsCode (CARD_TAMABOT ) and c :IsHasEffect (160021007 )
27+ end
28+ function s .tdfilter (c )
29+ return c :IsMonster () and c :IsCode (CARD_TAMABOT ) and c :IsAbleToDeckAsCost ()
30+ end
31+ function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
32+ return Duel .IsExistingMatchingCard (s .tdfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil )
33+ end
34+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
35+ if chk == 0 then return Duel .IsExistingMatchingCard (Card .IsNotMaximumModeSide ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) end
36+ end
37+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
38+ local c = e :GetHandler ()
39+ -- Requirement
40+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TODECK )
41+ local tg = Duel .SelectMatchingCard (tp ,s .tdfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil )
42+ Duel .HintSelection (tg )
43+ if Duel .SendtoDeck (tg ,nil ,SEQ_DECKTOP ,REASON_COST )< 1 then return end
44+ -- Effect
45+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_FACEUP )
46+ local g = Duel .SelectMatchingCard (tp ,Card .IsNotMaximumModeSide ,tp ,LOCATION_MZONE ,0 ,1 ,3 ,nil )
47+ Duel .HintSelection (g )
48+ for tc in g :Iter () do
49+ local e1 = Effect .CreateEffect (c )
50+ e1 :SetType (EFFECT_TYPE_SINGLE )
51+ e1 :SetCode (EFFECT_INDESTRUCTABLE_EFFECT )
52+ e1 :SetDescription (3001 )
53+ e1 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE |EFFECT_FLAG_CLIENT_HINT |EFFECT_FLAG_SET_AVAILABLE )
54+ e1 :SetRange (LOCATION_MZONE )
55+ e1 :SetReset (RESETS_STANDARD_PHASE_END ,2 )
56+ e1 :SetValue (1 )
57+ tc :RegisterEffect (e1 )
58+ end
59+ if c :IsStatus (STATUS_SPSUMMON_TURN ) and c :IsSummonType (SUMMON_TYPE_FUSION ) and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
60+ Duel .Recover (tp ,2000 ,REASON_EFFECT )
61+ end
62+ end
0 commit comments