--Evil Vine Rusty Shield Brio function c16000245.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c16000245.spcon) e1:SetTarget(c16000245.sptg) e1:SetOperation(c16000245.spop) c:RegisterEffect(e1) --synchro custom local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetValue(c16000245.synlimit) c:RegisterEffect(e3) --effect local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) --e3:SetCost(c500311028.cost) e2:SetTarget(c16000245.sptg2) e2:SetOperation(c16000245.spop2) c:RegisterEffect(e2) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_BE_MATERIAL) e4:SetCondition(c16000245.immcon) e4:SetOperation(c16000245.immop) c:RegisterEffect(e4) --flip local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(16000245,0)) e5:SetCategory(CATEGORY_DESTROY) e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e5:SetTarget(c16000245.target) e5:SetOperation(c16000245.operation) c:RegisterEffect(e5) end function c16000245.spcon(e,tp,eg,ep,ev,re,r,rp) local ec=eg:GetFirst() return ec:IsType(TYPE_SYNCHRO) end function c16000245.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c16000245.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) c:CompleteProcedure() end end function c16000245.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL --and re==e:GetLabelObject() end function c16000245.filter(c,e,tp) return c:IsLevelBelow(4) and c:IsSetCard(0x485a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c16000245.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c16000245.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function c16000245.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c16000245.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(1,0) e3:SetTarget(c16000245.splimit) e3:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e3,tp) end end function c16000245.splimit(e,c) return not c:IsSetCard(0x485a) end function c16000245.synlimit(e,c) if not c then return false end return not c:IsSetCard(0x485a) and not c:IsRace(RACE_ZOMBIE) end function c16000245.immcon(e,tp,eg,ep,ev,re,r,rp) return r==REASON_SYNCHRO end function c16000245.immop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(16000245,0)) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetValue(aux.tgoval) e1:SetReset(RESET_EVENT+0x1fe0000) rc:RegisterEffect(e1) end function c16000245.efilter(e,te) return te:IsActiveType(TYPE_TRAP) end function c16000245.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function c16000245.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end