function c210216011.initial_effect(c) --Activate local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(19186123,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetTarget(c210216011.target) e2:SetOperation(c210216011.operation) c:RegisterEffect(e2) --activate Nether Spirit Empire local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(66570171,0)) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetRange(LOCATION_GRAVE) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCost(aux.bfgcost) e3:SetTarget(c210216011.actg) e3:SetOperation(c210216011.acop) c:RegisterEffect(e3) end function c210216011.fieldfilter(c,tp) return c:IsCode(210216004) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) end function c210216011.actg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c210216011.fieldfilter,tp,LOCATION_DECK,0,1,nil,tp) end if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c210216011.acop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local tc=Duel.SelectMatchingCard(tp,c210216011.fieldfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst() if tc then local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) if fc then Duel.SendtoGrave(fc,REASON_RULE) Duel.BreakEffect() end Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) local te=tc:GetActivateEffect() te:UseCountLimit(tp,1,true) local tep=tc:GetControler() local cost=te:GetCost() if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end Duel.RaiseEvent(tc,210216004,te,0,tp,tp,Duel.GetCurrentChain()) end end function c210216011.filter(c) return c:IsSetCard(0x216) and c:IsAbleToHand() end function c210216011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c210216011.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c210216011.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=Duel.SelectTarget(tp,c210216011.filter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) end function c210216011.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.Remove(c,POS_FACEUP,REASON_EFFECT) end end