@@ -14,7 +14,7 @@ function s.initial_effect(c)
1414 c :RegisterEffect (e1 )
1515 Duel .AddCustomActivityCounter (id ,ACTIVITY_SPSUMMON ,s .counterfilter )
1616end
17- s .listed_names = {16178681 ,id + 1 }
17+ s .listed_names = {16178681 ,id + 1 } -- "Odd-Eyes Pendulum Dragon", "Odd-Eyes Synchrogate"
1818function s .counterfilter (c )
1919 return not c :IsPendulumSummoned ()
2020end
@@ -27,38 +27,38 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
2727 e1 :SetType (EFFECT_TYPE_FIELD )
2828 e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_OATH )
2929 e1 :SetCode (EFFECT_CANNOT_SPECIAL_SUMMON )
30- e1 :SetReset (RESET_PHASE + PHASE_END )
3130 e1 :SetTargetRange (1 ,0 )
3231 e1 :SetTarget (s .splimit )
32+ e1 :SetReset (RESET_PHASE |PHASE_END )
3333 Duel .RegisterEffect (e1 ,tp )
3434 if e :IsHasType (EFFECT_TYPE_ACTIVATE ) then
3535 aux .RemainFieldCost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,1 )
3636 end
3737end
38- function s .filter1 (c ,e ,tp )
38+ function s .oddeyesspfilter (c ,e ,tp )
3939 return c :IsCode (16178681 ) and c :IsFaceup () and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
4040 and Duel .GetLocationCountFromEx (tp ,tp ,nil ,c )> 0
41- and Duel .IsExistingTarget (s .filter2 ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp ,c )
41+ and Duel .IsExistingTarget (s .fmgyspfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp ,c )
4242end
43- function s .filter2 (c ,e ,tp ,mc )
44- return c :IsType ( TYPE_FUSION ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
45- and Duel .IsExistingMatchingCard (s .filter3 ,tp ,LOCATION_EXTRA ,0 ,1 ,nil ,e ,tp ,Group .FromCards (c ,mc ))
43+ function s .fusgyspfilter (c ,e ,tp ,mc )
44+ return c :IsFusionMonster ( ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
45+ and Duel .IsExistingMatchingCard (s .fusedfilter ,tp ,LOCATION_EXTRA ,0 ,1 ,nil ,e ,tp ,Group .FromCards (c ,mc ))
4646end
47- function s .filter3 (c ,e ,tp ,m )
48- return c :IsType ( TYPE_FUSION ) and c :IsType (TYPE_PENDULUM ) and c :IsCanBeSpecialSummoned (e ,SUMMON_TYPE_FUSION ,tp ,false ,false )
47+ function s .fusedspfilter (c ,e ,tp ,m )
48+ return c :IsFusionMonster ( ) and c :IsType (TYPE_PENDULUM ) and c :IsCanBeSpecialSummoned (e ,SUMMON_TYPE_FUSION ,tp ,false ,false )
4949 and c :CheckFusionMaterial (m )
5050end
5151function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
5252 if chkc then return false end
5353 if chk == 0 then
5454 return not Duel .IsPlayerAffectedByEffect (tp ,CARD_BLUEEYES_SPIRIT ) and Duel .IsPlayerCanSpecialSummonCount (tp ,2 )
5555 and aux .CheckSummonGate (tp ,2 ) and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
56- and Duel .GetUsableMZoneCount (tp )> 1 and Duel .IsExistingMatchingCard (s .filter1 ,tp ,LOCATION_EXTRA ,0 ,1 ,nil ,e ,tp )
56+ and Duel .GetUsableMZoneCount (tp )> 1 and Duel .IsExistingMatchingCard (s .oddeyesspfilter ,tp ,LOCATION_EXTRA ,0 ,1 ,nil ,e ,tp )
5757 end
5858 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
59- local g1 = Duel .SelectMatchingCard (tp ,s .filter1 ,tp ,LOCATION_EXTRA ,0 ,1 ,1 ,nil ,e ,tp )
59+ local g1 = Duel .SelectMatchingCard (tp ,s .oddeyesspfilter ,tp ,LOCATION_EXTRA ,0 ,1 ,1 ,nil ,e ,tp )
6060 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
61- local g2 = Duel .SelectTarget (tp ,s .filter2 ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil ,e ,tp ,g1 :GetFirst ())
61+ local g2 = Duel .SelectTarget (tp ,s .fusgyspfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,1 ,nil ,e ,tp ,g1 :GetFirst ())
6262 g1 :Merge (g2 )
6363 Duel .SetTargetCard (g1 )
6464 Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,g1 ,2 ,0 ,0 )
@@ -68,20 +68,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
6868 or Duel .GetLocationCountFromEx (tp ,tp ,nil ,TYPE_PENDULUM )<= 0 or Duel .GetUsableMZoneCount (tp )<= 1 then return false end
6969 local g = Duel .GetChainInfo (0 ,CHAININFO_TARGET_CARDS )
7070 local sg = g :Filter (Card .IsRelateToEffect ,nil ,e )
71- if Duel .SpecialSummon (sg ,0 ,tp ,tp ,false ,false ,POS_FACEUP ) > 0 then
72- for tc in aux . Next ( sg ) do
71+ if Duel .SpecialSummon (sg ,0 ,tp ,tp ,false ,false ,POS_FACEUP )> 0 then
72+ for tc in sg : Iter ( ) do
7373 if tc :IsLocation (LOCATION_MZONE ) then
74- s . disop ( tc , e :GetHandler ())
74+ tc : NegateEffects ( e :GetHandler ())
7575 end
7676 end
7777 else
7878 return
7979 end
8080 Duel .BreakEffect ()
81- local sc = Duel .SelectMatchingCard (tp ,s .filter3 ,tp ,LOCATION_EXTRA ,0 ,1 ,1 ,nil ,e ,tp ,sg ,nil ):GetFirst ()
81+ local sc = Duel .SelectMatchingCard (tp ,s .fusedspfilter ,tp ,LOCATION_EXTRA ,0 ,1 ,1 ,nil ,e ,tp ,sg ,nil ):GetFirst ()
8282 if sc then
8383 sc :SetMaterial (sg )
84- Duel .SendtoGrave (sg ,REASON_EFFECT + REASON_MATERIAL + REASON_FUSION )
84+ Duel .SendtoGrave (sg ,REASON_EFFECT | REASON_MATERIAL | REASON_FUSION )
8585 Duel .BreakEffect ()
8686 Duel .SpecialSummon (sc ,SUMMON_TYPE_FUSION ,tp ,tp ,false ,false ,POS_FACEUP )
8787 sc :CompleteProcedure ()
@@ -96,21 +96,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
9696 e1 :SetCondition (s .descon )
9797 e1 :SetTarget (s .destg )
9898 e1 :SetOperation (s .desop )
99- e1 :SetReset (RESET_EVENT + RESETS_STANDARD )
99+ e1 :SetReset (RESET_EVENT | RESETS_STANDARD )
100100 e1 :SetLabelObject (sc )
101101 c :RegisterEffect (e1 )
102102 end
103103end
104- function s .disop (tc ,c )
105- local e1 = Effect .CreateEffect (c )
106- e1 :SetType (EFFECT_TYPE_SINGLE )
107- e1 :SetCode (EFFECT_DISABLE )
108- e1 :SetReset (RESET_EVENT + RESETS_STANDARD )
109- tc :RegisterEffect (e1 )
110- local e2 = e1 :Clone ()
111- e2 :SetCode (EFFECT_DISABLE_EFFECT )
112- tc :RegisterEffect (e2 )
113- end
114104function s .descon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
115105 local tc = e :GetLabelObject ()
116106 return tc and eg :IsContains (tc ) and tc :IsReason (REASON_DESTROY )
@@ -119,19 +109,19 @@ function s.thfilter(c)
119109 return c :IsAbleToHand () and c :IsCode (id + 1 )
120110end
121111function s .destg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
122- if chk == 0 then return e :GetHandler ():IsAbleToGrave ()
112+ if chk == 0 then return e :GetHandler ():IsDestructable ()
123113 and Duel .IsExistingMatchingCard (s .thfilter ,tp ,LOCATION_DECK ,0 ,1 ,nil ) end
124114 Duel .SetOperationInfo (0 ,CATEGORY_TOGRAVE ,e :GetHandler (),1 ,0 ,0 )
125115 Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,nil ,1 ,tp ,LOCATION_DECK )
126116end
127117function s .desop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
128118 local c = e :GetHandler ()
129- if c :IsRelateToEffect (e ) and Duel .SendtoGrave (c ,REASON_EFFECT )~= 0 and c : IsLocation ( LOCATION_GRAVE ) then
119+ if c :IsRelateToEffect (e ) and Duel .Destroy (c ,REASON_EFFECT )> 0 then
130120 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_ATOHAND )
131121 local g = Duel .SelectMatchingCard (tp ,s .thfilter ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil )
132122 if # g > 0 then
133123 Duel .SendtoHand (g ,nil ,REASON_EFFECT )
134124 Duel .ConfirmCards (1 - tp ,g )
135125 end
136126 end
137- end
127+ end
0 commit comments