33local s ,id = GetID ()
44function s .initial_effect (c )
55 aux .AddEquipProcedure (c )
6- -- pos
6+ -- Change the position of the equipped monster
7+ local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
9+ e1 :SetCategory (CATEGORY_POSITION )
10+ e1 :SetType (EFFECT_TYPE_IGNITION )
11+ e1 :SetRange (LOCATION_SZONE )
12+ e1 :SetCountLimit (1 )
13+ e1 :SetTarget (s .postg )
14+ e1 :SetOperation (s .posop )
15+ c :RegisterEffect (e1 )
16+ -- When the equipped monster is returned from the field to the hand and this card is sent to the GY, inflict 600 damage to your opponent
17+ local e2 = Effect .CreateEffect (c )
18+ e2 :SetDescription (aux .Stringid (id ,1 ))
19+ e2 :SetCategory (CATEGORY_DAMAGE )
20+ e2 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F )
21+ e2 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
22+ e2 :SetCode (EVENT_TO_GRAVE )
23+ e2 :SetCondition (s .damcon )
24+ e2 :SetTarget (s .damtg )
25+ e2 :SetOperation (s .damop )
26+ c :RegisterEffect (e2 )
27+ -- Add this card to your hand instead of conducting your normal draw
728 local e3 = Effect .CreateEffect (c )
8- e3 :SetDescription (aux .Stringid (id ,0 ))
9- e3 :SetCategory (CATEGORY_POSITION )
10- e3 :SetType (EFFECT_TYPE_IGNITION )
11- e3 :SetRange (LOCATION_SZONE )
12- e3 :SetCountLimit (1 )
13- e3 :SetTarget (s .postg )
14- e3 :SetOperation (s .posop )
29+ e3 :SetDescription (aux .Stringid (id ,2 ))
30+ e3 :SetCategory (CATEGORY_TOHAND )
31+ e3 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O )
32+ e3 :SetCode (EVENT_PREDRAW )
33+ e3 :SetRange (LOCATION_GRAVE )
34+ e3 :SetCondition (s .retcon )
35+ e3 :SetTarget (s .rettg )
36+ e3 :SetOperation (s .retop )
1537 c :RegisterEffect (e3 )
16- -- damage
17- local e4 = Effect .CreateEffect (c )
18- e4 :SetDescription (aux .Stringid (id ,1 ))
19- e4 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F )
20- e4 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
21- e4 :SetCategory (CATEGORY_DAMAGE )
22- e4 :SetCode (EVENT_TO_GRAVE )
23- e4 :SetCondition (s .damcon )
24- e4 :SetTarget (s .damtg )
25- e4 :SetOperation (s .damop )
26- c :RegisterEffect (e4 )
27- --
28- local e5 = Effect .CreateEffect (c )
29- e5 :SetDescription (aux .Stringid (id ,2 ))
30- e5 :SetCategory (CATEGORY_TOHAND )
31- e5 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O )
32- e5 :SetCode (EVENT_PREDRAW )
33- e5 :SetRange (LOCATION_GRAVE )
34- e5 :SetCondition (s .retcon )
35- e5 :SetTarget (s .rettg )
36- e5 :SetOperation (s .retop )
37- c :RegisterEffect (e5 )
3838end
3939function s .postg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
4040 local ec = e :GetHandler ():GetEquipTarget ()
4141 if chk == 0 then return ec and ec :IsAttackPos () and ec :IsCanChangePosition () end
4242end
4343function s .posop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
44- if not e :GetHandler ():IsRelateToEffect (e ) then return end
45- Duel .ChangePosition (e :GetHandler ():GetEquipTarget (),POS_FACEUP_DEFENSE )
44+ local c = e :GetHandler ()
45+ if not c :IsRelateToEffect (e ) then return end
46+ Duel .ChangePosition (c :GetEquipTarget (),POS_FACEUP_DEFENSE )
4647end
4748function s .damcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
4849 local c = e :GetHandler ()
4950 local ec = c :GetPreviousEquipTarget ()
50- return c :IsReason (REASON_LOST_TARGET ) and ec :IsLocation (LOCATION_HAND )
51+ return c :IsReason (REASON_LOST_TARGET ) and ec and ec : IsPreviousLocation ( LOCATION_MZONE ) and ec :IsLocation (LOCATION_HAND )
5152end
5253function s .damtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
5354 if chk == 0 then return true end
@@ -64,12 +65,13 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp)
6465 and Duel .GetDrawCount (tp )> 0
6566end
6667function s .rettg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
67- if chk == 0 then return e :GetHandler ():IsAbleToHand () end
68+ local c = e :GetHandler ()
69+ if chk == 0 then return c :IsAbleToHand () end
6870 local dt = Duel .GetDrawCount (tp )
6971 if dt ~= 0 then
7072 _replace_count = 0
7173 _replace_max = dt
72- local e1 = Effect .CreateEffect (e : GetHandler () )
74+ local e1 = Effect .CreateEffect (c )
7375 e1 :SetType (EFFECT_TYPE_FIELD )
7476 e1 :SetProperty (EFFECT_FLAG_PLAYER_TARGET )
7577 e1 :SetCode (EFFECT_DRAW_COUNT )
@@ -78,7 +80,7 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
7880 e1 :SetValue (0 )
7981 Duel .RegisterEffect (e1 ,tp )
8082 end
81- Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,e : GetHandler () ,1 ,0 ,0 )
83+ Duel .SetOperationInfo (0 ,CATEGORY_TOHAND ,c ,1 ,0 ,0 )
8284end
8385function s .retop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
8486 local c = e :GetHandler ()
@@ -87,4 +89,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
8789 Duel .SendtoHand (c ,nil ,REASON_EFFECT )
8890 Duel .ConfirmCards (1 - tp ,c )
8991 end
90- end
92+ end
0 commit comments