--Metalurgos Harvesting --Raccolto Metalurgo --Scripted by: XGlitchy30 local s,id,o=GetID() function s.initial_effect(c) --[[Target 1 "Metalurgos" Continuous Spell you control and 1 card your opponent controls; destroy them.]] local e1=Effect.CreateEffect(c) e1:Desc(0) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:HOPT() e1:SetHintTiming(0,RELEVANT_TIMINGS) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) --[[If this card is destroyed by a card effect: You can Set this card.]] local e2=Effect.CreateEffect(c) e2:Desc(1) e2:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_DESTROYED) e2:HOPT() e2:SetCondition(s.setcon) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) end --FILTERS E1 function s.filter(c) return c:IsFaceup() and c:IsSpell(TYPE_CONTINUOUS) and c:IsSetCard(ARCHE_METALURGOS) end --E1 function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g1=Duel.SelectTarget(tp,s.filter,tp,LOCATION_ONFIELD,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,g1) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,#g1,PLAYER_ALL,LOCATION_ONFIELD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards() if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end end --E2 function s.setcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_EFFECT) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsSSetable() end if c:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0) end end function s.setop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToChain() and c:IsSSetable() then Duel.SSet(tp,c) end end