--Massive Corruption --scripted by Rawstone local s,id=GetID() function s.initial_effect(c) --Target S/T local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN+CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.strg) e1:SetOperation(s.reop) c:RegisterEffect(e1) --protect F Spell local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCost(aux.bfgcost) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end c40007.toss_coin=true function s.tfilter(c) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck() end function s.tfilter2(c) return c:IsType(TYPE_SPELL+TYPE_TRAP) end function s.strg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(s.tfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.IsExistingTarget(s.tfilter2,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g1=Duel.SelectTarget(tp,s.tfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g2=Duel.SelectTarget(tp,s.tfilter2,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1+g2,2,0,0) Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0) end function s.reop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc1=g:Filter(Card.IsControler,nil,tp):GetFirst() local tc2=g:Filter(Card.IsControler,nil,1-tp):GetFirst() local c1,c2=Duel.TossCoin(tp,2) if c1+c2==1 then Duel.Destroy(tc1,REASON_EFFECT) elseif c1+c2==2 then Duel.Destroy(tc2,REASON_EFFECT) else Duel.SendtoDeck(tc1,nil,2,REASON_EFFECT) if c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then c:CancelToGrave() Duel.SendtoDeck(c,nil,2,REASON_EFFECT) end end end function s.filter(c) return c:IsCode(03113667) and c:IsFaceup() end function s.tdtg(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_FZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_FZONE,0,1,1,nil) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_FZONE) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(1,aux.tgoval) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetValue(aux.indoval) tc:RegisterEffect(e2) end end