--.LiveVTuber Mokota Mememe function c33701103.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,nil,4,3) c:EnableReviveLimit() --extra material local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(33701103,0)) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetRange(LOCATION_EXTRA) e2:SetLabelObject(c) e2:SetCondition(c33701103.xyzcon) e2:SetOperation(c33701103.xyzop) e2:SetValue(SUMMON_TYPE_XYZ) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_EXTRA,0) e3:SetTarget(c33701103.mattg) e3:SetLabelObject(e2) c:RegisterEffect(e3) --immune local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(c33701103.efilter) e1:SetCondition(c33701103.imcon) c:RegisterEffect(e1) --dis local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(33701103,1)) e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCost(c33701103.discost1) e1:SetTarget(c33701103.distg1) e1:SetOperation(c33701103.disop1) c:RegisterEffect(e1) end function c33701103.mattg(e,c) return c:IsSetCard(0x1445) and c:IsType(TYPE_XYZ) and c:IsRank(5,3) end function c33701103.xyzcon(e,c,og,lmat,min,max) if c==nil then return true end local tp=c:GetControler() local xc=e:GetLabelObject() return Duel.GetLocationCountFromEx(tp,tp,xc,e:GetHandler())>0 and xc:IsCanBeXyzMaterial(nil) end function c33701103.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max) local xc=e:GetLabelObject() local mg=xc:GetOverlayGroup() if mg:GetCount()~=0 then Duel.Overlay(e:GetHandler(),mg) end e:GetHandler():SetMaterial(Group.FromCards(xc)) Duel.Overlay(e:GetHandler(),Group.FromCards(xc)) -- local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetReset(RESET_PHASE+PHASE_END) e3:SetTargetRange(1,0) e3:SetTarget(c33701103.splimit) Duel.RegisterEffect(e3,tp) end function c33701103.splimit(e,c,tp,sumtp,sumpos) return bit.band(sumtp,SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ end function c33701103.efilter(e,te) return te:GetOwner()~=e:GetOwner() end function c33701103.imfil(c) return not c:IsType(TYPE_EFFECT) end function c33701103.imcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.IsExistingMatchingCard(c33701103.imfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function c33701103.discost1(e,tp,eg,ep,ev,re,r,rp,chk) local zx=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and zx>0 end local x=e:GetHandler():RemoveOverlayCard(tp,1,zx,REASON_COST) e:SetLabel(x) end function c33701103.distg1(e,tp,eg,ep,ev,re,r,rp,chk) local x=e:GetLabel() if chk==0 then return true end local x=e:GetLabel() local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,x,x,nil) Duel.SetTargetCard(g) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) end function c33701103.disop1(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc=g:GetFirst() while tc do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetCode(EFFECT_DISABLE) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) tc:RegisterEffect(e2) tc=g:GetNext() end end