--Chimera Goat Champion function c11000526.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1FD),3,2) c:EnableReviveLimit() --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(11000526,0)) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c11000526.spcon) e1:SetTarget(c11000526.sptg) e1:SetOperation(c11000526.spop) c:RegisterEffect(e1) --indestructable local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(11000526,1)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1) e2:SetCost(c11000526.cost) e2:SetTarget(c11000526.target) e2:SetOperation(c11000526.activate) c:RegisterEffect(e2) end function c11000526.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ end function c11000526.spfilter(c,e,tp) return c:IsCode(11000523) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c11000526.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c11000526.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) end function c11000526.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c11000526.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function c11000526.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c11000526.filter(c) return c:IsFaceup() and (c:IsSetCard(0x1FD) or c:IsSetCard(0x1F3)) and c:IsType(TYPE_MONSTER) end function c11000526.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c11000526.filter,tp,LOCATION_MZONE,0,1,nil) end end function c11000526.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetMatchingGroup(c11000526.filter,tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() while tc do Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) tc:RegisterEffect(e1) tc=g:GetNext() end end