function c100000737.initial_effect(c) --summon with no tribute local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(100000737,0)) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SUMMON_PROC) e2:SetCondition(c100000737.ntcon) c:RegisterEffect(e2) --copy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(100000737,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetTarget(c100000737.cptg) e1:SetOperation(c100000737.cpop) c:RegisterEffect(e1) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(100000737,0)) e3:SetCategory(CATEGORY_TODECK) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCost(c100000737.ctcost) e3:SetTarget(c100000737.cttg) e3:SetOperation(c100000737.ctop) c:RegisterEffect(e3) end function c100000737.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function c100000737.filtershu(c) return c:IsSetCard(0x763) and c:IsAbleToDeck() and c:GetType()==0x82 end function c100000737.filter(c) return c:IsSetCard(0x763) and c:IsType(TYPE_MONSTER) end function c100000737.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100000737.filtershu(chkc) end if chk==0 then return Duel.IsExistingTarget(c100000737.filtershu,tp,LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,c100000737.filtershu,tp,LOCATION_REMOVED,0,1,7,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) end function c100000737.tgfilter(c,e) return not c:IsRelateToEffect(e) end function c100000737.ctop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if tg:IsExists(c100000737.tgfilter,1,nil,e) then return end Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) Duel.ShuffleDeck(tp) end function c100000737.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function c100000737.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c100000737.filter end if chk==0 then return Duel.IsExistingTarget(c100000737.filter,tp,LOCATION_GRAVE,0,1,nil,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,c100000737.filter,tp,LOCATION_GRAVE,0,1,1,nil,nil) end function c100000737.cpop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsType(TYPE_TOKEN) then end local code=tc:GetCode() local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_CODE) e2:SetValue(code) e2:SetReset(RESET_EVENT+0x1fe0000) c:RegisterEffect(e2) c:CopyEffect(code,RESET_EVENT+0x1fe0000,1) end