--Fce-up "Magnificent Vine" Xyz Monsters you control gain 100 ATK x their own Rank. Once per turn, you can target 1 card your opponent controls, and detach 1 Xyz Material from this card; Send that target to the bottom of the Deck. If this card is targeted by a card effect controlled by your opponent that is not a "Vine" or "Rank-Up-Magic" Card, negate that effect, you cannot tribute this card except for the Tribute Summon of LIGHT Monsters. function c500313308.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x285a),3,2) c:EnableReviveLimit() --atk up local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x285a)) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(c500313308.val) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(500313308,1)) e2:SetCategory(CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetCost(c500313308.tdcost2) e2:SetTarget(c500313308.tdtg2) e2:SetOperation(c500313308.tdop2) c:RegisterEffect(e2) --cannot target local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetRange(LOCATION_MZONE) e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e4:SetValue(aux.tgoval) c:RegisterEffect(e4) end function c500313308.val(e,c) return e:GetHandler():GetOverlayCount()*200 end function c500313308.tdcost2(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 c500313308.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() and chkc~=c end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,c) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) end function c500313308.tdop2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) end end