--Chimera Goat function c11000523.initial_effect(c) --pendulum summon aux.EnablePendulumAttribute(c) --tohand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(11000523,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) e2:SetCost(c11000523.thcost) e2:SetTarget(c11000523.thtg) e2:SetOperation(c11000523.thop) c:RegisterEffect(e2) --pos local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(11000523,1)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) e3:SetTarget(c11000523.postg) e3:SetOperation(c11000523.posop) c:RegisterEffect(e3) end function c11000523.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,800) end Duel.PayLPCost(tp,800) end function c11000523.thfilter(c) return c:IsSetCard(0x1FD) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() end function c11000523.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c11000523.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end function c11000523.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c11000523.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function c11000523.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) end function c11000523.tgfilter(c) return c:IsSetCard(0x1FD) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() end function c11000523.posop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_STOGRAVE) local g=Duel.SelectMatchingCard(tp,c11000523.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end end