--created by Neo, coded by Lyris local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.target) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) aux.PerformFusionSummon(s.filter,e,tp) end) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCost(s.cost) e2:SetTarget(s.sptg) e2:SetOperation(s.operation) c:RegisterEffect(e2) end function s.filter(c,e,tp,m,f,chkf,gc) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x88f) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.IsCanFusionSummon(s.filter,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,TOKEN_NEBULA) end local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,TOKEN_NEBULA) Duel.Release(g,REASON_COST) Duel.Remove(c,POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) return c:IsSetCard(0x88f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.operation(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,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0x100,tp,tp,false,false,POS_FACEUP) end end