--Nour, the Luminous local id,cod=23251019,c23251019 function cod.initial_effect(c) --Fusion Material c:EnableReviveLimit() aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xd3e),3,true) --Special Summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_EXTRA) e1:SetCondition(cod.sprcon) e1:SetOperation(cod.sprop) c:RegisterEffect(e1) --Gain ATK local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_MZONE) e2:SetValue(cod.val) c:RegisterEffect(e2) --Special Summon 2 local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_LEAVE_FIELD) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e3:SetCondition(cod.spcon) e3:SetTarget(cod.sptg) e3:SetOperation(cod.spop) c:RegisterEffect(e3) end function cod.spfilter(c) return c:IsFusionSetCard(0xd3e) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemoveAsCost() end function cod.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and Duel.IsExistingMatchingCard(cod.spfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,3,nil) end function cod.sprop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,cod.spfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,3,3,nil) local cg=g:Filter(Card.IsFacedown,nil) if cg:GetCount()>0 then Duel.ConfirmCards(1-tp,cg) end Duel.Remove(g,POS_FACEUP,REASON_COST) end function cod.val(e,c) return Duel.GetMatchingGroupCount(cod.afilter,c:GetControler(),LOCATION_GRAVE,0,nil)*400 end function cod.afilter(c) return c:IsSetCard(0xd3e) and c:IsType(TYPE_MONSTER) end function cod.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK end function cod.filter(c,e,tp) return c:IsSetCard(0xd3e) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function cod.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cod.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function cod.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cod.filter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.BreakEffect() Duel.Damage(tp,g:GetFirst():GetBaseAttack(),REASON_EFFECT) end end