--Yakimoki @Ignister function c212920.initial_effect(c) --copy effect local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(212920,0)) e1:SetCategory(CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,212920) e1:SetTarget(c212920.cptg) e1:SetOperation(c212920.cpop) c:RegisterEffect(e1) --mill local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(212920,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_BE_MATERIAL) e2:SetCountLimit(1,212921) e2:SetCondition(c212920.thcon) e2:SetTarget(c212920.thtg) e2:SetOperation(c212920.thop) c:RegisterEffect(e2) end function c212920.cpfilter(c) return c:IsCode(22933016) and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil end function c212920.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then local te=e:GetLabelObject() local tg=te:GetTarget() return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end if chk==0 then return Duel.IsExistingTarget(c212920.cpfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,c212920.cpfilter,tp,LOCATION_GRAVE,0,1,1,nil) local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) Duel.ClearTargetCard() g:GetFirst():CreateEffectRelation(e) local tg=te:GetTarget() if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end te:SetLabelObject(e:GetLabelObject()) e:SetLabelObject(te) Duel.ClearOperationInfo(0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) end function c212920.cpop(e,tp,eg,ep,ev,re,r,rp) local te=e:GetLabelObject() if not te then return end if not te:GetHandler():IsRelateToEffect(e) then return end e:SetLabelObject(te:GetLabelObject()) local op=te:GetOperation() if op then op(e,tp,eg,ep,ev,re,r,rp) end Duel.BreakEffect() Duel.SendtoDeck(te:GetHandler(),nil,2,REASON_EFFECT) end function c212920.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:GetReasonCard():IsRace(RACE_CYBERSE) end function c212920.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) end function c212920.thfilter(c) return c:IsSetCard(0x135) or c:IsSetCard(0x136) and c:IsAbleToHand() end function c212920.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmDecktop(tp,3) local g=Duel.GetDecktopGroup(tp,3) if g:GetCount()>0 then if g:IsExists(c212920.thfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(212920,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:FilterSelect(tp,c212920.thfilter,1,1,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) Duel.ShuffleHand(tp) end Duel.ShuffleDeck(tp) end end