end
function c2038.zfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb) and c:IsType(TYPE_SYNCHRO) and c:IsLevelAbove(8)
end
function c2038.mfilter(c)
return c:IsSetCard(0xb) and c:IsReleasableByEffect()
end
function c2038.cfilter(c,tp)
return c:GetSummonPlayer()~=tp
end
function c2038.syncon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c2038.cfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c2038.zfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c2038.syncost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c2038.mfilter,2,nil) end
local g=Duel.SelectReleaseGroup(tp,c2038.mfilter,2,2,nil)
Duel.Release(g,REASON_COST)
end
function c2038.syntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c2038.synop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c and Duel.CheckReleaseGroup(tp,c2038.mfilter,2,nil) then
local g=Duel.SelectReleaseGroup(tp,c2038.mfilter,2,2,nil)
if g:GetCount()>1 then
Duel.Release(g,REASON_EFFECT)
Duel.SpecialSummon(c,SUMMON_TYPE_SYNCHRO,tp,tp,true,true,POS_FACEUP)
c:CompleteProcedure()
end
end
end