44local s ,id = GetID ()
55function s .initial_effect (c )
66 c :EnableReviveLimit ()
7+ -- Xyz Summon procedure: 2 Level 3 monsters
78 Xyz .AddProcedure (c ,nil ,3 ,2 )
8- Duel .AddCustomActivityCounter (id ,ACTIVITY_SPSUMMON ,s .counterfilter )
9- -- salvage
9+ -- Add 1 "Cynet" Spell/Trap from your GY to your hand
1010 local e1 = Effect .CreateEffect (c )
1111 e1 :SetDescription (aux .Stringid (id ,0 ))
1212 e1 :SetCategory (CATEGORY_TOHAND )
1313 e1 :SetType (EFFECT_TYPE_IGNITION )
14- e1 :SetRange (LOCATION_MZONE )
1514 e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
15+ e1 :SetRange (LOCATION_MZONE )
1616 e1 :SetCountLimit (1 ,id )
17- e1 :SetCost (s . thcost )
17+ e1 :SetCost (Cost . AND ( Cost . Detach ( 1 ), s . cost ) )
1818 e1 :SetTarget (s .thtg )
1919 e1 :SetOperation (s .thop )
2020 c :RegisterEffect (e1 )
21- -- spsummon
21+ -- Special Summon 2 Level 4 Cyberse monsters with different names from your Deck, but their effects are negated
2222 local e2 = Effect .CreateEffect (c )
2323 e2 :SetDescription (aux .Stringid (id ,1 ))
24- e2 :SetCategory (CATEGORY_SPECIAL_SUMMON )
24+ e2 :SetCategory (CATEGORY_SPECIAL_SUMMON + CATEGORY_DISABLE )
2525 e2 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O )
26- e2 :SetCode (EVENT_DESTROYED )
2726 e2 :SetProperty (EFFECT_FLAG_DELAY )
27+ e2 :SetCode (EVENT_DESTROYED )
2828 e2 :SetCountLimit (1 ,{id ,1 })
2929 e2 :SetCondition (s .spcon )
3030 e2 :SetCost (s .cost )
3131 e2 :SetTarget (s .sptg )
3232 e2 :SetOperation (s .spop )
3333 c :RegisterEffect (e2 )
34+ Duel .AddCustomActivityCounter (id ,ACTIVITY_SPSUMMON ,function (c ) return not c :IsSummonLocation (LOCATION_EXTRA ) or c :IsRace (RACE_CYBERSE ) end )
3435end
3536s .listed_series = {SET_CYNET }
36- function s .counterfilter (c )
37- return not c :IsSummonLocation (LOCATION_EXTRA ) or c :IsRace (RACE_CYBERSE )
38- end
3937function s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
4038 if chk == 0 then return Duel .GetCustomActivityCount (id ,tp ,ACTIVITY_SPSUMMON )== 0 end
41- local e1 = Effect .CreateEffect (e :GetHandler ())
39+ local c = e :GetHandler ()
40+ -- You cannot Special Summon monsters from the Extra Deck the turn you activate either of this card's effects, except Cyberse monsters
41+ local e1 = Effect .CreateEffect (c )
4242 e1 :SetDescription (aux .Stringid (id ,2 ))
4343 e1 :SetType (EFFECT_TYPE_FIELD )
4444 e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_OATH + EFFECT_FLAG_CLIENT_HINT )
4545 e1 :SetCode (EFFECT_CANNOT_SPECIAL_SUMMON )
4646 e1 :SetTargetRange (1 ,0 )
47- e1 :SetTarget (s . splimit )
47+ e1 :SetTarget (function ( e , c ) return c : IsLocation ( LOCATION_EXTRA ) and not c : IsRace ( RACE_CYBERSE ) end )
4848 e1 :SetReset (RESET_PHASE |PHASE_END )
4949 Duel .RegisterEffect (e1 ,tp )
50- -- lizard check
51- aux .addTempLizardCheck (e :GetHandler (),tp ,s .lizfilter )
52- end
53- function s .splimit (e ,c ,sump ,sumtype ,sumpos ,targetp ,se )
54- return not c :IsRace (RACE_CYBERSE ) and c :IsLocation (LOCATION_EXTRA )
55- end
56- function s .lizfilter (e ,c )
57- return not c :IsOriginalRace (RACE_CYBERSE )
58- end
59- function s .thcost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
60- if chk == 0 then return e :GetHandler ():CheckRemoveOverlayCard (tp ,1 ,REASON_COST )
61- and s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,0 ) end
62- e :GetHandler ():RemoveOverlayCard (tp ,1 ,1 ,REASON_COST )
63- s .cost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,1 )
50+ -- "Clock Lizard" check
51+ aux .addTempLizardCheck (c ,tp ,function (e ,c ) return not c :IsOriginalRace (RACE_CYBERSE ) end )
6452end
6553function s .thfilter (c )
66- return c :IsSpellTrap ( ) and c :IsSetCard ( SET_CYNET ) and c :IsAbleToHand ()
54+ return c :IsSetCard ( SET_CYNET ) and c :IsSpellTrap ( ) and c :IsAbleToHand ()
6755end
6856function s .thtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
6957 if chkc then return chkc :IsLocation (LOCATION_GRAVE ) and chkc :IsControler (tp ) and s .thfilter (chkc ) end
7058 if chk == 0 then return Duel .IsExistingTarget (s .thfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ) end
7159 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
7260 local g = Duel .SelectTarget (tp ,s .thfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil )
73- Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,g ,1 ,0 ,0 )
61+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,g ,1 ,tp ,0 )
7462end
7563function s .thop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
7664 local tc = Duel .GetFirstTarget ()
@@ -80,11 +68,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
8068end
8169function s .spcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
8270 local c = e :GetHandler ()
83- return ( c :IsReason (REASON_BATTLE ) or (rp ~= tp and c :IsReason (REASON_EFFECT ) and c :IsPreviousControler (tp )))
84- and c :IsPreviousLocation (LOCATION_MZONE ) and c : IsXyzSummoned ()
71+ return c : IsXyzSummoned () and ( c :IsReason (REASON_BATTLE ) or (rp == 1 - tp and c :IsReason (REASON_EFFECT ) and c :IsPreviousControler (tp )))
72+ and c :IsPreviousLocation (LOCATION_MZONE )
8573end
8674function s .spfilter (c ,e ,tp )
87- return c :IsRace ( RACE_CYBERSE ) and c :IsLevel ( 4 ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
75+ return c :IsLevel ( 4 ) and c :IsRace ( RACE_CYBERSE ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
8876end
8977function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
9078 local g = Duel .GetMatchingGroup (s .spfilter ,tp ,LOCATION_DECK ,0 ,nil ,e ,tp )
@@ -97,21 +85,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
9785 if Duel .GetLocationCount (tp ,LOCATION_MZONE )< 2 or Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT ) then return end
9886 local g = Duel .GetMatchingGroup (s .spfilter ,tp ,LOCATION_DECK ,0 ,nil ,e ,tp )
9987 local sg = aux .SelectUnselectGroup (g ,e ,tp ,2 ,2 ,aux .dncheck ,1 ,tp ,HINTMSG_SPSUMMON )
100- if # sg == 2 then
101- local tc = sg :GetFirst ()
102- for tc in aux .Next (sg ) do
103- Duel .SpecialSummonStep (tc ,0 ,tp ,tp ,false ,false ,POS_FACEUP )
104- local e1 = Effect .CreateEffect (e :GetHandler ())
105- e1 :SetType (EFFECT_TYPE_SINGLE )
106- e1 :SetCode (EFFECT_DISABLE )
107- e1 :SetReset (RESET_EVENT |RESETS_STANDARD )
108- tc :RegisterEffect (e1 ,true )
109- local e2 = Effect .CreateEffect (e :GetHandler ())
110- e2 :SetType (EFFECT_TYPE_SINGLE )
111- e2 :SetCode (EFFECT_DISABLE_EFFECT )
112- e2 :SetReset (RESET_EVENT |RESETS_STANDARD )
113- tc :RegisterEffect (e2 ,true )
88+ if # sg ~= 2 then return end
89+ local c = e :GetHandler ()
90+ for sc in sg :Iter () do
91+ if Duel .SpecialSummonStep (sc ,0 ,tp ,tp ,false ,false ,POS_FACEUP ) then
92+ -- Their effects are negated
93+ sc :NegateEffects (c )
11494 end
115- Duel .SpecialSummonComplete ()
11695 end
117- end
96+ Duel .SpecialSummonComplete ()
97+ end
0 commit comments