--Black Rose Ivy of the Signer Dragon local cid,id=GetID() function cid.initial_effect(c) --salvage local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EXTRA) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(cid.thtg) e1:SetOperation(cid.thop) e1:SetCountLimit(1,id) c:RegisterEffect(e1) local e3=e1:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) --change level local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetTarget(cid.target) e4:SetOperation(cid.operation) e4:SetCountLimit(1,id+100) c:RegisterEffect(e4) end --SALVAGE function cid.filter(c) return (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_MONSTER) and c:IsAbleToExtra() end function cid.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ct=Duel.GetMatchingGroupCount(function(c) return c:IsFaceup() and c:IsSetCard(0xcd01) end,tp,LOCATION_MZONE,0,nil) if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and cid.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(cid.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) and ct>0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,aux.NecroValleyFilter(cid.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function cid.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if #g<=0 then return end Duel.SendtoDeck(g,nil,2,REASON_EFFECT) end --CHANGE LEVEL function cid.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsLevel(4) end end function cid.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) c:RegisterEffect(e1) end