--Woodland Citruserker local cid,id=GetID() function cid.initial_effect(c) aux.AddOrigEvoluteType(c) aux.AddEvoluteProc(c,nil,6,aux.FilterBoolFunction(Card.IsRace,RACE_PLANT),2) c:EnableReviveLimit() --destroy local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) e1:SetCondition(cid.descon) e1:SetTarget(cid.destg) e1:SetOperation(cid.desop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_MATERIAL_CHECK) e2:SetValue(cid.valcheck) e2:SetLabelObject(e1) c:RegisterEffect(e2) --negate local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) --e1:SetCategory(CATEGORY_DISABLE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCost(cid.cost) e3:SetTarget(cid.target) e3:SetOperation(cid.operation) c:RegisterEffect(e3) end function cid.valcheck(e,c) local ct=e:GetHandler():GetMaterial():FilterCount(Card.IsRace,nil,RACE_PLANT) and e:GetHandler():GetMaterial():GetClassCount(Card.GetAttribute) e:GetLabelObject():SetLabel(ct) end function cid.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+388) end function cid.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end local ct=e:GetLabel() if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function cid.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if g:GetCount()>0 then Duel.Destroy(g,REASON_EFFECT) end end function cid.filter(c) return c:IsFaceup() and c:GetAttack()>0 end function cid.xxfilter(c) return c:IsRace(RACE_PLANT) end function cid.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanRemoveEC(tp,3,REASON_COST) end c:RemoveEC(tp,3,REASON_COST) end function cid.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and cid.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(cid.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) and Duel.IsExistingMatchingCard(cid.xxfilter,tp,LOCATION_HAND,0,1,nil)end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,cid.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) end function cid.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) -- local e2=Effect.CreateEffect(c) -- e2:SetType(EFFECT_TYPE_SINGLE) -- e2:SetCode(EFFECT_DISABLE) -- e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) -- tc:RegisterEffect(e2) -- local e3=Effect.CreateEffect(c) -- e3:SetType(EFFECT_TYPE_SINGLE) -- e3:SetCode(EFFECT_DISABLE_EFFECT) -- e3:SetValue(RESET_TURN_SET) -- e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) -- tc:RegisterEffect(e3) local g=Duel.SelectMatchingCard(tp,cid.xxfilter,tp,LOCATION_HAND,0,1,1,nil) if g:GetCount()>0 then Duel.BreakEffect() Duel.SendtoGrave(g,REASON_EFFECT) end end end