@@ -52,7 +52,7 @@ function s.initial_effect(c)
5252 e9 :SetCategory (CATEGORY_SPECIAL_SUMMON )
5353 e9 :SetType (EFFECT_TYPE_IGNITION )
5454 e9 :SetRange (LOCATION_MZONE )
55- e9 :SetCost (s . spcost )
55+ e9 :SetCost (Cost . SelfTribute )
5656 e9 :SetTarget (s .sptg )
5757 e9 :SetOperation (s .spop )
5858 c :RegisterEffect (e9 )
@@ -66,7 +66,7 @@ function s.ttcon2(e,c,minc,zone,relzone,exeff)
6666 if type (ret )== " function" then
6767 ret = {ret (exeff ,c )}
6868 if # ret > 1 then
69- zone = (ret [2 ]>> 16 )&0x7f
69+ zone = (ret [2 ]>> 16 )&( ZONES_EMZ | ZONES_MMZ )
7070 end
7171 end
7272 end
@@ -80,7 +80,7 @@ function s.tttg2(e,tp,eg,ep,ev,re,r,rp,chk,c,minc,zone,relzone,exeff)
8080 if type (ret )== " function" then
8181 ret = {ret (exeff ,c )}
8282 if # ret > 1 then
83- zone = (ret [2 ]>> 16 )&0x7f
83+ zone = (ret [2 ]>> 16 )&( ZONES_EMZ | ZONES_MMZ )
8484 end
8585 end
8686 end
9696function s .ttop2 (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,c ,minc ,zone ,relzone ,exeff )
9797 local g = e :GetLabelObject ()
9898 c :SetMaterial (g )
99- Duel .Release (g ,REASON_SUMMON + REASON_MATERIAL )
99+ Duel .Release (g ,REASON_SUMMON | REASON_MATERIAL )
100100 g :DeleteGroup ()
101101end
102102function s .retreg (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
103103 local c = e :GetHandler ()
104- c :RegisterFlagEffect (id ,RESET_EVENT + RESETS_STANDARD - RESET_TURN_SET + RESET_PHASE + PHASE_END ,0 ,2 )
104+ c :RegisterFlagEffect (id ,RESET_EVENT | RESETS_STANDARD - RESET_TURN_SET | RESET_PHASE | PHASE_END ,0 ,2 )
105105 local e1 = Effect .CreateEffect (c )
106106 e1 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS )
107107 e1 :SetCode (EVENT_PHASE + PHASE_END )
@@ -110,7 +110,7 @@ function s.retreg(e,tp,eg,ep,ev,re,r,rp)
110110 e1 :SetCountLimit (1 )
111111 e1 :SetCondition (s .retcon )
112112 e1 :SetOperation (s .retop )
113- e1 :SetReset (RESET_PHASE + PHASE_END ,2 )
113+ e1 :SetReset (RESET_PHASE | PHASE_END ,2 )
114114 Duel .RegisterEffect (e1 ,tp )
115115end
116116function s .retcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
@@ -123,37 +123,33 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
123123 e1 :SetType (EFFECT_TYPE_SINGLE )
124124 e1 :SetCode (EFFECT_SET_CONTROL )
125125 e1 :SetValue (c :GetOwner ())
126- e1 :SetReset (RESET_EVENT + RESETS_STANDARD - (RESET_TOFIELD + RESET_TEMP_REMOVE + RESET_TURN_SET ))
126+ e1 :SetReset (RESET_EVENT | RESETS_STANDARD - (RESET_TOFIELD | RESET_TEMP_REMOVE | RESET_TURN_SET ))
127127 c :RegisterEffect (e1 )
128128end
129- function s .spcost (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
130- if chk == 0 then return e :GetHandler ():IsReleasable () end
131- Duel .Release (e :GetHandler (),REASON_COST )
132- end
133129function s .filter (c ,e ,tp )
134130 return c :IsCode (CARD_RA ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,true ,false )
135131end
136132function s .sptg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
137133 local ft = Duel .GetLocationCount (tp ,LOCATION_MZONE )
138134 if e :GetHandler ():GetSequence ()< 5 then ft = ft + 1 end
139- if chk == 0 then return ft > 0 and Duel .IsExistingMatchingCard (s .filter ,tp ,LOCATION_HAND + LOCATION_DECK ,0 ,1 ,nil ,e ,tp ) end
140- Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_HAND + LOCATION_DECK )
135+ if chk == 0 then return ft > 0 and Duel .IsExistingMatchingCard (s .filter ,tp ,LOCATION_HAND | LOCATION_DECK ,0 ,1 ,nil ,e ,tp ) end
136+ Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,tp ,LOCATION_HAND | LOCATION_DECK )
141137end
142138function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
143139 if Duel .GetLocationCount (tp ,LOCATION_MZONE )<= 0 then return end
144140 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
145- local g = Duel .SelectMatchingCard (tp ,s .filter ,tp ,LOCATION_HAND + LOCATION_DECK ,0 ,1 ,1 ,nil ,e ,tp )
141+ local g = Duel .SelectMatchingCard (tp ,s .filter ,tp ,LOCATION_HAND | LOCATION_DECK ,0 ,1 ,1 ,nil ,e ,tp )
146142 local tc = g :GetFirst ()
147143 if tc and Duel .SpecialSummonStep (tc ,0 ,tp ,tp ,true ,false ,POS_FACEUP ) then
148144 local e1 = Effect .CreateEffect (e :GetHandler ())
149145 e1 :SetType (EFFECT_TYPE_SINGLE )
150146 e1 :SetCode (EFFECT_SET_ATTACK )
151147 e1 :SetValue (4000 )
152- e1 :SetReset (RESET_EVENT + RESETS_STANDARD )
148+ e1 :SetReset (RESET_EVENT | RESETS_STANDARD )
153149 tc :RegisterEffect (e1 )
154150 local e2 = e1 :Clone ()
155151 e2 :SetCode (EFFECT_SET_DEFENSE )
156152 tc :RegisterEffect (e2 )
157153 end
158154 Duel .SpecialSummonComplete ()
159- end
155+ end
0 commit comments