22-- Super Quantal Mech King Great Magnus
33local s ,id = GetID ()
44function s .initial_effect (c )
5- -- Xyz summon procedure
6- Xyz .AddProcedure (c ,nil ,12 ,3 )
75 c :EnableReviveLimit ()
8- -- Shuffle card into the deck
6+ -- Xyz Summon procedure: 3 Level 12 monsters
7+ Xyz .AddProcedure (c ,nil ,12 ,3 )
8+ -- If this card is sent to the GY: You can Special Summon 3 "Super Quantal Mech Beast" Xyz Monsters with different names from your GY
99 local e1 = Effect .CreateEffect (c )
1010 e1 :SetDescription (aux .Stringid (id ,0 ))
11- e1 :SetCategory (CATEGORY_TODECK )
12- e1 :SetType (EFFECT_TYPE_QUICK_O )
13- e1 :SetCode (EVENT_FREE_CHAIN )
14- e1 :SetHintTiming (0 ,TIMINGS_CHECK_MONSTER |TIMING_MAIN_END )
15- e1 :SetRange (LOCATION_MZONE )
16- e1 :SetCountLimit (1 )
17- e1 :SetCondition (s .tdcon )
18- e1 :SetCost (Cost .DetachFromSelf (1 ))
19- e1 :SetTarget (s .tdtg )
20- e1 :SetOperation (s .tdop )
11+ e1 :SetCategory (CATEGORY_SPECIAL_SUMMON )
12+ e1 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
13+ e1 :SetProperty (EFFECT_FLAG_DELAY )
14+ e1 :SetCode (EVENT_TO_GRAVE )
15+ e1 :SetTarget (s .sptg )
16+ e1 :SetOperation (s .spop )
2117 c :RegisterEffect (e1 )
22- -- Unaffected by other effects
18+ -- This card gains these effects, based on the number of materials with different names attached to it
19+ -- ● 2+: Once per turn, during the Main Phase (Quick Effect): You can detach 1 material from this card; shuffle 1 card on the field into the Deck
2320 local e2 = Effect .CreateEffect (c )
24- e2 :SetType (EFFECT_TYPE_SINGLE )
25- e2 :SetCode (EFFECT_IMMUNE_EFFECT )
26- e2 :SetProperty (EFFECT_FLAG_SINGLE_RANGE )
21+ e2 :SetDescription (aux .Stringid (id ,1 ))
22+ e2 :SetCategory (CATEGORY_TODECK )
23+ e2 :SetType (EFFECT_TYPE_QUICK_O )
24+ e2 :SetCode (EVENT_FREE_CHAIN )
2725 e2 :SetRange (LOCATION_MZONE )
28- e2 :SetCondition (s .imcon )
29- e2 :SetValue (s .efilter )
26+ e2 :SetCountLimit (1 )
27+ e2 :SetCondition (aux .AND (
28+ function ()
29+ return Duel .IsMainPhase ()
30+ end ,
31+ s .effcon (2 ))
32+ )
33+ e2 :SetCost (Cost .DetachFromSelf (1 ))
34+ e2 :SetTarget (s .tdtg )
35+ e2 :SetOperation (s .tdop )
36+ e2 :SetHintTiming (0 ,TIMING_MAIN_END |TIMINGS_CHECK_MONSTER )
3037 c :RegisterEffect (e2 )
31- -- Prevents adding cards to the hand
38+ -- ● 4+: It is unaffected by card effects, except "Super Quant" cards
3239 local e3 = Effect .CreateEffect (c )
33- e3 :SetType (EFFECT_TYPE_FIELD )
34- e3 :SetCode (EFFECT_CANNOT_TO_HAND )
40+ e3 :SetType (EFFECT_TYPE_SINGLE )
41+ e3 :SetProperty (EFFECT_FLAG_SINGLE_RANGE )
42+ e3 :SetCode (EFFECT_IMMUNE_EFFECT )
3543 e3 :SetRange (LOCATION_MZONE )
36- e3 :SetTargetRange (0 ,LOCATION_DECK )
37- e3 :SetCondition (s .drcon )
44+ e3 :SetCondition (s .effcon (4 ))
45+ e3 :SetValue (function (e ,te )
46+ return not te :IsCardSetcode (SET_SUPER_QUANT )
47+ end )
3848 c :RegisterEffect (e3 )
39- local e4 = Effect .CreateEffect (c )
40- e4 :SetType (EFFECT_TYPE_FIELD )
41- e4 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
42- e4 :SetRange (LOCATION_MZONE )
43- e4 :SetCode (EFFECT_CANNOT_DRAW )
44- e4 :SetCondition (s .drcon )
45- e4 :SetTargetRange (0 ,1 )
46- c :RegisterEffect (e4 )
47- -- Special Summon when sent to the GY
48- local e5 = Effect .CreateEffect (c )
49- e5 :SetCategory (CATEGORY_SPECIAL_SUMMON )
50- e5 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
51- e5 :SetProperty (EFFECT_FLAG_DELAY )
52- e5 :SetCode (EVENT_TO_GRAVE )
53- e5 :SetTarget (s .sptg )
54- e5 :SetOperation (s .spop )
55- c :RegisterEffect (e5 )
49+ -- ● 6+: Your opponent cannot add cards from the Deck to the hand by card effects
50+ local e4a = Effect .CreateEffect (c )
51+ e4a :SetType (EFFECT_TYPE_FIELD )
52+ e4a :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
53+ e4a :SetCode (EFFECT_CANNOT_TO_HAND )
54+ e4a :SetRange (LOCATION_MZONE )
55+ e4a :SetTargetRange (0 ,1 )
56+ e4a :SetCondition (s .effcon (6 ))
57+ e4a :SetTarget (function (e ,c ,rp ,re )
58+ return c :IsLocation (LOCATION_DECK )
59+ end )
60+ c :RegisterEffect (e4a )
61+ local e4b = e4a :Clone ()
62+ e4b :SetCode (EFFECT_CANNOT_DRAW )
63+ c :RegisterEffect (e4b )
5664end
5765s .listed_series = {SET_SUPER_QUANT ,SET_SUPER_QUANTAL_MECH_BEAST }
58- function s .tdcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
59- return e :GetHandler ():GetOverlayGroup ():GetClassCount (Card .GetCode )>= 2 and Duel .IsMainPhase ()
60- end
61- function s .tdtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
62- if chk == 0 then return Duel .IsExistingMatchingCard (Card .IsAbleToDeck ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,nil ) end
63- local g = Duel .GetMatchingGroup (Card .IsAbleToDeck ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,nil )
64- Duel .SetOperationInfo (0 ,CATEGORY_TODECK ,g ,1 ,0 ,0 )
65- end
66- function s .tdop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
67- Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TODECK )
68- local sg = Duel .SelectMatchingCard (tp ,Card .IsAbleToDeck ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,1 ,nil )
69- if # sg > 0 then
70- Duel .HintSelection (sg )
71- Duel .SendtoDeck (sg ,nil ,SEQ_DECKSHUFFLE ,REASON_EFFECT )
72- end
73- end
74- function s .imcon (e )
75- return e :GetHandler ():GetOverlayGroup ():GetClassCount (Card .GetCode )>= 4
76- end
77- function s .efilter (e ,te )
78- return not te :GetOwner ():IsSetCard (SET_SUPER_QUANT )
79- end
80- function s .drcon (e )
81- return e :GetHandler ():GetOverlayGroup ():GetClassCount (Card .GetCode )>= 6
82- end
8366function s .spfilter (c ,e ,tp )
84- return c :IsSetCard (SET_SUPER_QUANTAL_MECH_BEAST ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
67+ return c :IsSetCard (SET_SUPER_QUANTAL_MECH_BEAST ) and c :IsXyzMonster () and c : IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
8568end
8669function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
8770 if chk == 0 then
71+ if Duel .GetLocationCount (tp ,LOCATION_MZONE )< 3 or Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT ) then return false end
8872 local g = Duel .GetMatchingGroup (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,nil ,e ,tp )
89- return not Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT )
90- and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 2 and g :GetClassCount (Card .GetCode )> 2
73+ return # g >= 3 and g :GetClassCount (Card .GetCode )>= 3
9174 end
9275 Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,3 ,tp ,LOCATION_GRAVE )
9376end
9477function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
95- if Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT ) then return end
96- local ft = Duel .GetLocationCount (tp ,LOCATION_MZONE )
78+ if Duel .GetLocationCount (tp ,LOCATION_MZONE )< 3 or Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT ) then return end
9779 local g = Duel .GetMatchingGroup (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,nil ,e ,tp )
98- if ft > 2 and g :GetClassCount (Card .GetCode )> 2 then
99- local tg = aux .SelectUnselectGroup (g ,e ,tp ,3 ,3 ,aux .dncheck ,1 ,tp ,HINTMSG_SPSUMMON )
100- Duel .SpecialSummon (tg ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
80+ if # g >= 3 and g :GetClassCount (Card .GetCode )>= 3 then
81+ local sg = aux .SelectUnselectGroup (g ,e ,tp ,3 ,3 ,aux .dncheck ,1 ,tp ,HINTMSG_SPSUMMON )
82+ if # sg == 3 then
83+ Duel .SpecialSummon (sg ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
84+ end
10185 end
10286end
87+ function s .effcon (material_count )
88+ return function (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
89+ return e :GetHandler ():GetOverlayGroup ():GetClassCount (Card .GetCode )>= material_count
90+ end
91+ end
92+ function s .tdtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
93+ if chk == 0 then return Duel .IsExistingMatchingCard (Card .IsAbleToDeck ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,nil ) end
94+ Duel .SetOperationInfo (0 ,CATEGORY_TODECK ,nil ,1 ,PLAYER_EITHER ,LOCATION_ONFIELD )
95+ end
96+ function s .tdop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
97+ Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TODECK )
98+ local g = Duel .SelectMatchingCard (tp ,Card .IsAbleToDeck ,tp ,LOCATION_ONFIELD ,LOCATION_ONFIELD ,1 ,1 ,nil )
99+ if # g > 0 then
100+ Duel .HintSelection (g )
101+ Duel .SendtoDeck (g ,nil ,SEQ_DECKSHUFFLE ,REASON_EFFECT )
102+ end
103+ end
0 commit comments