@@ -29,10 +29,20 @@ function s.initial_effect(c)
2929 e3 :SetCode (EVENT_PHASE + PHASE_STANDBY )
3030 e3 :SetRange (LOCATION_MZONE )
3131 e3 :SetCountLimit (1 )
32- e3 :SetCondition (function (e ,tp ) return Duel .GetTurnPlayer ()~= tp end )
3332 e3 :SetTarget (s .rmtg )
3433 e3 :SetOperation (s .rmop )
3534 c :RegisterEffect (e3 )
35+ -- Register cards placed on your opponent's the field
36+ aux .GlobalCheck (s ,function ()
37+ local ge1 = Effect .CreateEffect (c )
38+ ge1 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS )
39+ ge1 :SetProperty (EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_CANNOT_DISABLE )
40+ ge1 :SetCode (EVENT_MOVE )
41+ ge1 :SetRange (LOCATION_MZONE )
42+ ge1 :SetCondition (s .chkcon )
43+ ge1 :SetOperation (s .chkop )
44+ Duel .RegisterEffect (ge1 ,0 )
45+ end )
3646 -- Battle damage from battles involving this card becomes 0
3747 local e4 = Effect .CreateEffect (c )
3848 e4 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS )
@@ -97,16 +107,28 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp)
97107 end
98108 end
99109end
110+ function s .chkfilter (c ,tp )
111+ return c :IsControler (tp ) and c :IsLocation (LOCATION_ONFIELD )
112+ end
113+ function s .chkcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
114+ return e :GetHandler ():IsSpecialSummoned () and eg :IsExists (s .chkfilter ,1 ,nil ,1 - tp )
115+ end
116+ function s .chkop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
117+ local g = eg :Filter (s .chkfilter ,nil ,1 - tp )
118+ for tc in g :Iter () do
119+ tc :RegisterFlagEffect (id ,RESET_EVENT |RESETS_STANDARD &~RESET_TOFIELD ,0 ,1 )
120+ end
121+ end
100122function s .rmfilter (c ,turn )
101- return c :IsAbleToRemove () and c :GetTurnID () ~= turn
123+ return c :IsAbleToRemove () and c :HasFlagEffect ( id , 1 )
102124end
103125function s .rmtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
104- if chk == 0 then return Duel .IsExistingMatchingCard (s .rmfilter ,tp ,0 ,LOCATION_ONFIELD ,1 ,nil , Duel . GetTurnCount () ) end
105- local g = Duel .GetMatchingGroup (s .rmfilter ,tp ,0 ,LOCATION_ONFIELD ,nil , Duel . GetTurnCount () )
126+ if chk == 0 then return Duel .IsExistingMatchingCard (s .rmfilter ,tp ,0 ,LOCATION_ONFIELD ,1 ,nil ) end
127+ local g = Duel .GetMatchingGroup (s .rmfilter ,tp ,0 ,LOCATION_ONFIELD ,nil )
106128 Duel .SetOperationInfo (0 ,CATEGORY_REMOVE ,g ,# g ,0 ,0 )
107129end
108130function s .rmop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
109- local g = Duel .GetMatchingGroup (s .rmfilter ,tp ,0 ,LOCATION_ONFIELD ,nil , Duel . GetTurnCount () )
131+ local g = Duel .GetMatchingGroup (s .rmfilter ,tp ,0 ,LOCATION_ONFIELD ,nil )
110132 if # g > 0 then
111133 Duel .Remove (g ,POS_FACEUP ,REASON_EFFECT )
112134 end
0 commit comments