1+ -- セレブローズ・リッチ・マジシャンズ
2+ -- Celeb Rose Rich Magicians
3+ -- scripted by YoshiDuels
4+ local s ,id = GetID ()
5+ function s .initial_effect (c )
6+ -- Fusion Materials
7+ c :EnableReviveLimit ()
8+ Fusion .AddProcMix (c ,true ,true ,160013009 ,160013010 )
9+ -- Set
10+ local e1 = Effect .CreateEffect (c )
11+ e1 :SetDescription (aux .Stringid (id ,0 ))
12+ e1 :SetCategory (CATEGORY_LEAVE_GRAVE )
13+ e1 :SetType (EFFECT_TYPE_IGNITION )
14+ e1 :SetRange (LOCATION_MZONE )
15+ e1 :SetCountLimit (1 )
16+ e1 :SetCondition (s .condition )
17+ e1 :SetTarget (s .target )
18+ e1 :SetOperation (s .operation )
19+ c :RegisterEffect (e1 )
20+ end
21+ s .listed_names = {CARD_FUSION ,160210022 }
22+ function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
23+ return e :GetHandler ():IsStatus (STATUS_SPSUMMON_TURN )
24+ end
25+ function s .ssfilter (c )
26+ return (c :IsCode (CARD_FUSION ,160210022 ) or c :IsEquipSpell ()) and c :IsSpellTrap () and c :IsSSetable () and not c :IsType (TYPE_FIELD )
27+ end
28+ function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
29+ if chk == 0 then return Duel .IsExistingMatchingCard (s .ssfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ) end
30+ Duel .SetOperationInfo (0 ,CATEGORY_LEAVE_GRAVE ,nil ,1 ,tp ,0 )
31+ end
32+ function s .operation (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
33+ local ft = Duel .GetLocationCount (tp ,LOCATION_SZONE )
34+ if ft > 2 then ft = 2 end
35+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SET )
36+ local g = Duel .SelectMatchingCard (tp ,s .ssfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,ft ,nil )
37+ if # g == 0 then return end
38+ if Duel .SSet (tp ,g )> 0 and Duel .IsExistingMatchingCard (Card .IsSpellTrap ,tp ,0 ,LOCATION_ONFIELD ,1 ,nil ) and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
39+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
40+ local g = Duel .SelectMatchingCard (tp ,Card .IsSpellTrap ,tp ,0 ,LOCATION_ONFIELD ,1 ,1 ,nil )
41+ Duel .HintSelection (g )
42+ Duel .BreakEffect ()
43+ Duel .Destroy (g ,REASON_EFFECT )
44+ end
45+ -- Cannot activate
46+ local e1 = Effect .CreateEffect (e :GetHandler ())
47+ e1 :SetDescription (aux .Stringid (id ,1 ))
48+ e1 :SetType (EFFECT_TYPE_FIELD )
49+ e1 :SetCode (EFFECT_CANNOT_ACTIVATE )
50+ e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT )
51+ e1 :SetTargetRange (1 ,0 )
52+ e1 :SetValue (s .aclimit )
53+ e1 :SetReset (RESET_PHASE |PHASE_END )
54+ Duel .RegisterEffect (e1 ,tp )
55+ end
56+ function s .aclimit (e ,re ,tp )
57+ local c = re :GetHandler ()
58+ return c :IsType (TYPE_FUSION ) and c :IsLevel (7 )
59+ end
0 commit comments