--created by LeonDuvall, coded by Lyris, fixed by XGlitchy30 --Cosmic Conversion local s,id,o=GetID() function s.initial_effect(c) aux.AddCodeList(c,id,CARD_HELIOS_THE_PRIMORDIAL_SUN,CARD_MACRO_COSMOS) --If you control "Macro Cosmos" or "Helios - The Primordial Sun": Target 1 card your opponent controls; banish it. local e1=Effect.CreateEffect(c) e1:Desc(0) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:HOPT(true) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_REMOVE) e1:SetRelevantTimings() e1:SetLabel(CARD_HELIOS_THE_PRIMORDIAL_SUN,CARD_MACRO_COSMOS) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:Desc(1) e2:SetType(EFFECT_TYPE_SINGLE|EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_REMOVE) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCategory(CATEGORY_SEARCH|CATEGORY_TOHAND) e2:SetLabel(CARD_HELIOS_THE_PRIMORDIAL_SUN) e2:SetCondition(s.condition) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end --E1 function s.cfilter(c,...) return c:IsFaceup() and ... and c:IsCode(...) end function s.condition(e,tp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil,e:GetLabel()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetCardOperationInfo(g,CATEGORY_REMOVE) end function s.activate(e,tp) local tc=Duel.GetFirstTarget() if tc:IsRelateToChain() then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end --E2 function s.filter(c) return c:IsCodeOrMentions(CARD_HELIOS_THE_PRIMORDIAL_SUN) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thop(e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.Search(g,tp) end end