@@ -9,74 +9,71 @@ function s.initial_effect(c)
99 e1 :SetCountLimit (1 )
1010 e1 :SetRange (0x5f )
1111 e1 :SetLabel (0 )
12- e1 :SetOperation (s .flipop2 )
12+ e1 :SetOperation (s .op )
1313 c :RegisterEffect (e1 )
1414end
15- function s .flipop2 (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
16- -- immune
17- local e1 = Effect .CreateEffect (e :GetHandler ())
15+ s .listed_names = {3643300 }
16+ function s .op (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
17+ local c = e :GetHandler ()
18+ -- Check for "The Legendary Fisherman" to have destroyed a monster or inflicted battle damage
19+ local ge1 = Effect .CreateEffect (e :GetHandler ())
20+ ge1 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS )
21+ ge1 :SetCode (EVENT_BATTLE_DAMAGE )
22+ ge1 :SetCondition (function (e ,tp ,eg ,ep ,ev ,re ,r ,rp ) return eg :IsExists (s .lffilter ,1 ,nil ,tp ) end )
23+ ge1 :SetOperation (function (e ) Duel .RegisterFlagEffect (e :GetHandlerPlayer (),id + 100 ,RESET_PHASE |PHASE_END ,0 ,1 ) end )
24+ Duel .RegisterEffect (ge1 ,tp )
25+ local ge2 = ge1 :Clone ()
26+ ge2 :SetCode (EVENT_BATTLE_DESTROYING )
27+ Duel .RegisterEffect (ge2 ,tp )
28+ -- Special Summon 1 Level 4 or lower WATER monster from your Deck
29+ local e1 = Effect .CreateEffect (c )
1830 e1 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS )
19- e1 :SetCode (EVENT_BATTLE_DAMAGE )
31+ e1 :SetProperty (EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE )
32+ e1 :SetCode (EVENT_PHASE |PHASE_BATTLE )
33+ e1 :SetRange (0x5f )
34+ e1 :SetCountLimit (1 )
2035 e1 :SetCondition (s .spcon )
2136 e1 :SetOperation (s .spop )
2237 Duel .RegisterEffect (e1 ,tp )
23- local e1 = Effect .CreateEffect (e :GetHandler ())
24- e1 :SetType (EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS )
25- e1 :SetCode (EVENT_BATTLE_DESTROYING )
26- e1 :SetCondition (s .spcon2 )
27- e1 :SetOperation (s .spop )
28- Duel .RegisterEffect (e1 ,tp )
38+ end
39+ function s .lffilter (c ,tp )
40+ return c :IsControler (tp ) and c :IsCode (3643300 )
2941end
3042function s .flipcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
31- -- opd check
32- if Duel .GetFlagEffect (ep ,id )> 0 then return end
33- local g = Duel .GetMatchingGroup (aux .NecroValleyFilter (s .ffilter ),tp ,LOCATION_DECK + LOCATION_GRAVE ,0 ,nil ,tp )
43+ -- OPD check
44+ if Duel .GetFlagEffect (tp ,id )> 0 then return end
45+ local g = Duel .GetMatchingGroup (aux .NecroValleyFilter (s .umifilter ),tp ,LOCATION_DECK | LOCATION_GRAVE ,0 ,nil ,tp )
3446 -- condition
35- return aux .CanActivateSkill (tp )
36- and Duel .IsExistingMatchingCard (s .cfilter ,tp ,LOCATION_ONFIELD ,0 ,1 ,nil )
37- and # g > 0
38- end
39- function s .cfilter (c )
40- return c :IsCode (3643300 ) and c :IsFaceup ()
47+ return aux .CanActivateSkill (tp ) and Duel .IsExistingMatchingCard (aux .FaceupFilter (Card .IsCode ,3643300 ),tp ,LOCATION_ONFIELD ,0 ,1 ,nil ) and # g > 0
4148end
42- function s .ffilter (c ,tp )
49+ function s .umifilter (c ,tp )
4350 return c :IsCode (CARD_UMI ) and c :GetActivateEffect () and c :GetActivateEffect ():IsActivatable (tp ,true )
4451end
4552function s .flipop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
4653 Duel .Hint (HINT_SKILL_FLIP ,tp ,id |(1 << 32 ))
4754 Duel .Hint (HINT_CARD ,tp ,id )
48- -- opd register
49- Duel .RegisterFlagEffect (ep ,id ,0 ,0 ,0 )
50- local g = Duel .GetMatchingGroup (aux .NecroValleyFilter (s .ffilter ),tp ,LOCATION_DECK + LOCATION_GRAVE ,0 ,nil ,tp )
51- if Duel .IsExistingMatchingCard (Card .IsCode ,tp ,LOCATION_ONFIELD ,0 ,1 ,nil ,3643300 )and # g > 0 and Duel .SelectYesNo (tp ,aux .Stringid (id ,0 )) then
55+ local g = Duel .GetMatchingGroup (aux .NecroValleyFilter (s .umifilter ),tp ,LOCATION_DECK |LOCATION_GRAVE ,0 ,nil ,tp )
56+ if Duel .IsExistingMatchingCard (aux .FaceupFilter (Card .IsCode ,3643300 ),tp ,LOCATION_ONFIELD ,0 ,1 ,nil ) and # g > 0 and Duel .SelectYesNo (tp ,aux .Stringid (id ,0 )) then
57+ -- OPD register
58+ Duel .RegisterFlagEffect (tp ,id ,0 ,0 ,0 )
59+ -- Activate 1 "Umi" from your Deck or GY
5260 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOFIELD )
5361 local tc = g :Select (tp ,1 ,1 ,nil ):GetFirst ()
5462 Duel .ActivateFieldSpell (tc ,e ,tp ,eg ,ep ,ev ,re ,r ,rp )
5563 end
5664end
57- function s .spcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
58- local tc = eg :GetFirst ()
59- if Duel .GetFlagEffect (ep ,id + 1 )> 0 then return end
60- return ep ~= tp and tc :IsControler (tp ) and tc :IsCode (3643300 )
61- and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_DECK ,0 ,1 ,nil ,e ,tp )
62- end
63- function s .afilter (c ,tp )
64- return c :IsControler (tp ) and c :IsCode (3643300 )
65- end
66- function s .spcon2 (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
67- return eg :IsExists (s .afilter ,1 ,nil ,tp )
68- and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_DECK ,0 ,1 ,nil ,e ,tp )
69- end
7065function s .spfilter (c ,e ,tp )
71- return c :IsAttribute (ATTRIBUTE_WATER ) and c :GetLevel ()<= 4 and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
66+ return c :IsLevelBelow (4 ) and c :IsAttribute (ATTRIBUTE_WATER ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false )
67+ end
68+ function s .spcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
69+ return Duel .GetFlagEffect (tp ,id + 100 )> 0 and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
70+ and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_DECK ,0 ,1 ,nil ,e ,tp )
7271end
7372function s .spop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
7473 if not Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then return end
7574 Duel .Hint (HINT_SKILL_FLIP ,tp ,id |(1 << 32 ))
7675 Duel .Hint (HINT_CARD ,tp ,id )
77- -- opt register
78- Duel .RegisterFlagEffect (tp ,id + 1 ,RESET_PHASE + PHASE_END ,0 ,0 )
79-
76+ -- Special Summon 1 Level 4 or lower WATER monster from your Deck
8077 if Duel .GetLocationCount (tp ,LOCATION_MZONE )<= 0 then return end
8178 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_SPSUMMON )
8279 local g = Duel .SelectMatchingCard (tp ,s .spfilter ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil ,e ,tp )
0 commit comments