Commit 8050051e authored by mercury233's avatar mercury233 Committed by GitHub

update synchro summon with group effects (#3129)

parent 0881385c
......@@ -71,14 +71,18 @@ function s.mfilter(c)
return c:IsSetCard(0x1ca) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function s.syncheck(g,tp,syncard)
return g:IsExists(s.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
and aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL)
return g:IsExists(s.mfilter,1,nil) and aux.SynMixHandCheck(g,tp,syncard) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1)
end
function s.scfilter(c,tp,mg)
return mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
if not c:IsType(TYPE_SYNCHRO) then return false end
aux.GCheckAdditional=aux.SynGroupCheckLevelAddition(c)
local res=mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
aux.GCheckAdditional=nil
return res
end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummon(tp) then return false end
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
......
......@@ -49,13 +49,18 @@ function c34813545.mfilter(c)
return c:IsSetCard(0x2a) and c:IsType(TYPE_MONSTER)
end
function c34813545.syncheck(g,tp,syncard)
return g:IsExists(c34813545.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
return g:IsExists(c34813545.mfilter,1,nil) and aux.SynMixHandCheck(g,tp,syncard) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1)
end
function c34813545.scfilter(c,tp,mg)
return mg:CheckSubGroup(c34813545.syncheck,2,#mg,tp,c)
if not c:IsType(TYPE_SYNCHRO) then return false end
aux.GCheckAdditional=aux.SynGroupCheckLevelAddition(c)
local res=mg:CheckSubGroup(c34813545.syncheck,2,#mg,tp,c)
aux.GCheckAdditional=nil
return res
end
function c34813545.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummon(tp) then return false end
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
......
......@@ -74,14 +74,18 @@ function s.mfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx()
end
function s.syncheck(g,tp,syncard)
return g:IsExists(s.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
and aux.MustMaterialCheck(g,tp,EFFECT_MUST_BE_SMATERIAL)
return g:IsExists(s.mfilter,1,nil) and aux.SynMixHandCheck(g,tp,syncard) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1)
end
function s.scfilter(c,tp,mg)
return mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
if not c:IsType(TYPE_SYNCHRO) then return false end
aux.GCheckAdditional=aux.SynGroupCheckLevelAddition(c)
local res=mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
aux.GCheckAdditional=nil
return res
end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummon(tp) then return false end
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
......
......@@ -93,13 +93,18 @@ function s.mfilter(c)
return c:IsSetCard(0x1a2) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function s.syncheck(g,tp,syncard)
return g:IsExists(s.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
return g:IsExists(s.mfilter,1,nil) and aux.SynMixHandCheck(g,tp,syncard) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1)
end
function s.scfilter(c,tp,mg)
return mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
if not c:IsType(TYPE_SYNCHRO) then return false end
aux.GCheckAdditional=aux.SynGroupCheckLevelAddition(c)
local res=mg:CheckSubGroup(s.syncheck,2,#mg,tp,c)
aux.GCheckAdditional=nil
return res
end
function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummon(tp) then return false end
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
......
......@@ -33,10 +33,14 @@ function c77783947.mfilter(c)
return c:IsSetCard(0x9e) and c:IsType(TYPE_MONSTER)
end
function c77783947.syncheck(g,tp,syncard)
return g:IsExists(c77783947.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
return g:IsExists(c77783947.mfilter,1,nil) and aux.SynMixHandCheck(g,tp,syncard) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1)
end
function c77783947.spfilter(c,tp,mg)
return mg:CheckSubGroup(c77783947.syncheck,2,#mg,tp,c)
if not c:IsType(TYPE_SYNCHRO) then return false end
aux.GCheckAdditional=aux.SynGroupCheckLevelAddition(c)
local res=mg:CheckSubGroup(c77783947.syncheck,2,#mg,tp,c)
aux.GCheckAdditional=nil
return res
end
function c77783947.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......@@ -44,6 +48,7 @@ function c77783947.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c77783947.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummon(tp) then return false end
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
......
......@@ -62,13 +62,18 @@ function c85704698.mfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER)
end
function c85704698.syncheck(g,tp,syncard)
return g:IsExists(c85704698.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
return g:IsExists(c85704698.mfilter,1,nil) and aux.SynMixHandCheck(g,tp,syncard) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1)
end
function c85704698.spfilter(c,tp,mg)
return c:IsAttribute(ATTRIBUTE_WIND) and mg:CheckSubGroup(c85704698.syncheck,2,#mg,tp,c)
if not (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_WIND)) then return false end
aux.GCheckAdditional=aux.SynGroupCheckLevelAddition(c)
local res=mg:CheckSubGroup(c85704698.syncheck,2,#mg,tp,c)
aux.GCheckAdditional=nil
return res
end
function c85704698.syntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsPlayerCanSpecialSummon(tp) then return false end
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment