1- -- Doppel Shark
2- -- scripted by: UnknownGuest
1+ -- ッペル・シャーク
2+ -- Doppelganger Shark
3+ -- Scripted by: UnknownGuest
34local s ,id = GetID ()
45function s .initial_effect (c )
5- -- copy name
6+ -- This card's name becomes the name of 1 WATER monster you control
67 local e1 = Effect .CreateEffect (c )
78 e1 :SetDescription (aux .Stringid (id ,0 ))
89 e1 :SetType (EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F )
910 e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
1011 e1 :SetCode (EVENT_SUMMON_SUCCESS )
11- e1 :SetTarget (s .copytg )
12- e1 :SetOperation (s .copyop )
12+ e1 :SetTarget (s .copynametg )
13+ e1 :SetOperation (s .copynameop )
1314 c :RegisterEffect (e1 )
1415end
15- function s .filter (c )
16- return c :IsAttribute (ATTRIBUTE_WATER )
16+ function s .copynamefilter (c )
17+ return c :IsFaceup () and c : IsAttribute (ATTRIBUTE_WATER )
1718end
18- function s .copytg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
19- if chkc then return chkc :IsLocation (LOCATION_MZONE ) and chkc :IsControler (tp ) and s .filter (chkc ) end
20- if chk == 0 then return Duel .IsExistingTarget (s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) end
19+ function s .copynametg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
20+ if chkc then return chkc :IsLocation (LOCATION_MZONE ) and chkc :IsControler (tp ) and s .copynamefilter (chkc ) end
21+ if chk == 0 then return Duel .IsExistingTarget (s .copynamefilter ,tp ,LOCATION_MZONE ,0 ,1 ,nil ) end
2122 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TARGET )
22- local g = Duel .SelectTarget (tp ,s .filter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil )
23- Duel .SetTargetCard (g )
23+ Duel .SelectTarget (tp ,s .copynamefilter ,tp ,LOCATION_MZONE ,0 ,1 ,1 ,nil )
2424end
25- function s .copyop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
25+ function s .copynameop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
2626 local c = e :GetHandler ()
2727 local tc = Duel .GetFirstTarget ()
2828 if tc and tc :IsRelateToEffect (e ) and c :IsRelateToEffect (e ) and c :IsFaceup () then
2929 local code = tc :GetOriginalCode ()
3030 local e1 = Effect .CreateEffect (c )
3131 e1 :SetType (EFFECT_TYPE_SINGLE )
3232 e1 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE )
33- e1 :SetReset (RESET_EVENT + RESETS_STANDARD )
3433 e1 :SetCode (EFFECT_CHANGE_CODE )
3534 e1 :SetValue (code )
35+ e1 :SetReset (RESET_EVENT |RESETS_STANDARD )
3636 c :RegisterEffect (e1 )
3737 local e2 = Effect .CreateEffect (e :GetHandler ())
3838 e2 :SetType (EFFECT_TYPE_SINGLE )
3939 e2 :SetCode (EFFECT_DIRECT_ATTACK )
40- e2 :SetReset (RESET_EVENT + RESETS_STANDARD )
40+ e2 :SetReset (RESET_EVENT | RESETS_STANDARD )
4141 tc :RegisterEffect (e2 )
4242 end
43- end
43+ end
0 commit comments