--Light called to the Star Bearers local m=888730 local cm=_G["c"..m] function cm.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(cm.target) e1:SetOperation(cm.activate) c:RegisterEffect(e1) local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(23064604,2)) e4:SetCategory(CATEGORY_TOHAND) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCode(EVENT_FREE_CHAIN) e4:SetCountLimit(1,8887301) e4:SetCost(cm.thcost) e4:SetTarget(cm.thtg) e4:SetOperation(cm.thop) c:RegisterEffect(e4) end function cm.filter(c) return c:IsFaceup() and c:IsSetCard(0xff1) and not c:IsType(TYPE_FUSION) end function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil) end function cm.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(cm.efilter) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) end end function cm.efilter(e,re) return e:GetHandler()~=re:GetOwner() end function cm.filter(c) return c:IsSetCard(0xff1) end function cm.cfilter(c) return c:IsDiscardable() end function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD) end function cm.thfilter(c) return c:IsSetCard(0xff1) end function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function cm.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end