11-- ナンバーズ・エヴァイユ
2- -- Numbers Evaille
2+ -- Numbers Eveil (Manga)
33-- Rescripted by edo9300
44local s ,id = GetID ()
55function s .initial_effect (c )
@@ -16,20 +16,20 @@ s.listed_series={0x48}
1616function s .spfilter (c ,e ,p ,mg )
1717 return Duel .GetLocationCountFromEx (p ,p ,mg ,c )> 0 and c :IsCanBeSpecialSummoned (e ,SUMMON_TYPE_XYZ ,p ,false ,false )
1818end
19- function s .filter (c ,mg ,p ,e )
19+ function s .filter (c ,mg ,mg0 , p ,e )
2020 if not c :IsSetCard (SET_NUMBER ) or not c :IsType (TYPE_XYZ ) or type (c .xyz_number )~= " number" or not s .spfilter (c ,e ,p ,mg - c ) then return false end
21- if c .xyz_number == 0 then
22- return mg : IsExists ( function ( c ) return c . xyz_number == 0 end , 1 , c )
21+ if c .xyz_number == 0 then
22+ return # mg0 > 0
2323 else
24- return (mg - c ):CheckWithSumEqual (function (c )return c .xyz_number end ,c .xyz_number ,1 ,99999 )
24+ return (mg - c ):CheckWithSumEqual (function (c )return c .xyz_number end ,c .xyz_number ,1 ,# mg )
2525 end
2626end
2727function s .target (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
2828 if chk == 0 then
2929 local pg = aux .GetMustBeMaterialGroup (tp ,Group .CreateGroup (),tp ,nil ,nil ,REASON_XYZ )
30- local mg = Duel .GetMatchingGroup (function (c ) return type (c .xyz_number )== " number" end ,tp ,LOCATION_EXTRA ,0 ,nil )
31- if # ( pg - mg )> 0 then return false end
32- return Duel .IsExistingMatchingCard (s .filter ,tp ,LOCATION_EXTRA ,0 ,1 ,nil ,mg ,tp ,e )
30+ local mg , mg0 = Duel .GetMatchingGroup (function (c ) return type (c .xyz_number )== " number" end ,tp ,LOCATION_EXTRA ,0 , nil ): Split ( function ( c ) return c . xyz_number > 0 end ,nil )
31+ if ( # pg - ( # mg +# mg0 ) )> 0 then return false end
32+ return Duel .IsExistingMatchingCard (s .filter ,tp ,LOCATION_EXTRA ,0 ,1 ,nil ,mg ,mg0 , tp ,e )
3333 end
3434 Duel .SetOperationInfo (0 ,CATEGORY_SPECIAL_SUMMON ,nil ,1 ,0 ,LOCATION_EXTRA )
3535end
4343function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
4444 local pg = aux .GetMustBeMaterialGroup (tp ,Group .CreateGroup (),tp ,nil ,nil ,REASON_XYZ )
4545 local mg ,mg0 = Duel .GetMatchingGroup (function (c ) return type (c .xyz_number )== " number" end ,tp ,LOCATION_EXTRA ,0 ,nil ):Split (function (c )return c .xyz_number > 0 end ,nil )
46- if # ( pg - (mg + mg0 ))> 0 then return false end
46+ if ( # pg - (# mg +# mg0 ))> 0 then return false end
4747 local mat = Group .CreateGroup ()
4848 if # mg == 0 and # mg0 > 1 then
4949 mat = aux .SelectUnselectGroup (mg0 ,e ,tp ,1 ,# mg0 - 1 ,s .rescon ,1 ,tp ,HINTMSG_XMATERIAL )
@@ -80,4 +80,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
8080 Duel .Overlay (spc ,mat )
8181 spc :CompleteProcedure ()
8282 end
83- end
83+ end
0 commit comments