@@ -4,55 +4,46 @@ local s,id=GetID()
44function s .initial_effect (c )
55 aux .AddSkillProcedure (c ,1 ,false ,s .flipcon ,s .flipop )
66end
7- s .listed_names = {46821314 ,73216412 ,5600127 }
7+ s .listed_names = {46821314 ,73216412 ,5600127 } -- "Humanoid Slime","Worm Drake", "Humanoid Worm Drake"
88function s .flipcon (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
9- -- condition for the first effect:
10- local b1 = Duel .GetFlagEffect (tp ,id )== 0
11- and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
12- and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp )
13- -- condition for the second effect:
14- local params = {fusfilter = s .fusmonfilter ,
15- matfilter = Fusion .OnFieldMat ,
16- extrafil = s .extrafusmat ,
17- extratg = s .extratarget }
18- local b2 = Duel .GetFlagEffect (tp ,id + 100 )== 0 and Fusion .SummonEffTG (params )(e ,tp ,eg ,ep ,ev ,re ,r ,rp ,0 )
9+ -- Special Summon from GY condition:
10+ local b1 = Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0 and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp ) and not Duel .HasFlagEffect (tp ,id )
11+ -- Fusion Summon condition:
12+ local params = {fusfilter = aux .FilterBoolFunction (Card .IsCode ,5600127 ),
13+ matfilter = Fusion .OnFieldMat ,
14+ extrafil = s .extrafusmat ,
15+ extratg = s .extratarget }
16+ local b2 = Fusion .SummonEffTG (params )(e ,tp ,eg ,ep ,ev ,re ,r ,rp ,0 ) and not Duel .HasFlagEffect (tp ,id + 100 )
1917 return aux .CanActivateSkill (tp ) and (b1 or b2 )
2018end
2119-- Special Summon Function
2220function s .spfilter (c ,e ,tp )
2321 return c :IsCode (46821314 ,73216412 ) and c :IsCanBeSpecialSummoned (e ,0 ,tp ,false ,false ,POS_FACEUP_ATTACK )
2422end
2523-- Fusion Summon functions
26- function s .fusmonfilter ( c )
27- return c : IsCode ( 5600127 )
24+ function s .extrafusmat ( e , tp , mg )
25+ return Duel . GetMatchingGroup ( Card . IsAbleToGrave , tp , LOCATION_DECK , 0 , nil ), s . specialcheck
2826end
2927function s .specialcheck (tp ,sg ,fc )
3028 return sg :GetClassCount (Card .GetLocation ,nil )==# sg
3129end
32- function s .extrafusmat (e ,tp ,mg )
33- return Duel .GetMatchingGroup (Card .IsAbleToGrave ,tp ,LOCATION_DECK ,0 ,nil ),s .specialcheck
34- end
3530function s .extratarget (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
3631 if chk == 0 then return Duel .IsExistingMatchingCard (Card .IsDiscardable ,tp ,LOCATION_HAND ,0 ,1 ,nil ) end
37- Duel .DiscardHand (tp ,Card .IsDiscardable ,1 ,1 ,REASON_COST + REASON_DISCARD )
32+ Duel .DiscardHand (tp ,Card .IsDiscardable ,1 ,1 ,REASON_COST | REASON_DISCARD )
3833 Duel .SetOperationInfo (0 ,CATEGORY_TOGRAVE ,nil ,0 ,tp ,LOCATION_DECK )
3934end
4035function s .flipop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
4136 Duel .Hint (HINT_SKILL_FLIP ,tp ,id |(1 << 32 ))
4237 Duel .Hint (HINT_CARD ,tp ,id )
4338 -- For the Special Summon
44- local b1 = Duel .GetFlagEffect (tp ,id )== 0
45- and Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0
46- and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp )
39+ local b1 = Duel .GetLocationCount (tp ,LOCATION_MZONE )> 0 and Duel .IsExistingMatchingCard (s .spfilter ,tp ,LOCATION_GRAVE ,0 ,1 ,nil ,e ,tp ) and not Duel .HasFlagEffect (tp ,id )
4740 -- For the Fusion Summon
48- local params = {fusfilter = s .fusmonfilter ,
49- matfilter = Fusion .OnFieldMat ,
50- extrafil = s .extrafusmat ,
51- extratg = s .extratarget }
52- local b2 = Duel .GetFlagEffect (tp ,id + 100 )== 0 and Fusion .SummonEffTG (params )(e ,tp ,eg ,ep ,ev ,re ,r ,rp ,0 )
53- local op = Duel .SelectEffect (tp ,
54- {b1 ,aux .Stringid (id ,0 )},
55- {b2 ,aux .Stringid (id ,1 )})
41+ local params = {fusfilter = aux .FilterBoolFunction (Card .IsCode ,5600127 ),
42+ matfilter = Fusion .OnFieldMat ,
43+ extrafil = s .extrafusmat ,
44+ extratg = s .extratarget }
45+ local b2 = Fusion .SummonEffTG (params )(e ,tp ,eg ,ep ,ev ,re ,r ,rp ,0 ) and not Duel .HasFlagEffect (tp ,id + 100 )
46+ local op = Duel .SelectEffect (tp ,{b1 ,aux .Stringid (id ,0 )},{b2 ,aux .Stringid (id ,1 )})
5647 if op == 1 then
5748 -- OPT Register (Special Summon from GY)
5849 Duel .RegisterFlagEffect (tp ,id ,RESET_PHASE |PHASE_END ,0 ,1 )
@@ -75,10 +66,10 @@ function s.flipop(e,tp,eg,ep,ev,re,r,rp)
7566 sc :RegisterEffect (e2 )
7667 end
7768 else
78- -- Fusion Summon "Humanoid Worm Drake"
79- Duel .RegisterFlagEffect (tp ,id + 100 ,RESET_PHASE |PHASE_END ,0 ,1 )
8069 -- OPT Register (Fusion Summon)
70+ Duel .RegisterFlagEffect (tp ,id + 100 ,RESET_PHASE |PHASE_END ,0 ,1 )
71+ -- Fusion Summon "Humanoid Worm Drake"
8172 Fusion .SummonEffTG (params )(e ,tp ,eg ,ep ,ev ,re ,r ,rp ,1 )
8273 Fusion .SummonEffOP (params )(e ,tp ,eg ,ep ,ev ,re ,r ,rp ,1 )
8374 end
84- end
75+ end
0 commit comments