--created by Seth, coded by Lyris --Mextro Citizen local s,id,o=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:HOPT() e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCondition(aux.exccon) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_BE_MATERIAL) e2:SetCondition(s.gcon) e2:SetOperation(s.gop) c:RegisterEffect(e2) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToDeckAsCost() end Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST) end function s.filter(c,e,tp) return c:IsLevelAbove(5) and c:IsSetCard(0xee5) 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.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp),0,tp,tp,false,false,POS_FACEUP) end function s.gcon(e,tp,eg,ep,ev,re,r) return r==REASON_LINK and e:GetHandler():GetReasonCard():IsSetCard(0xee5) end function s.gop(e) local c=e:GetHandler() local rc=c:GetReasonCard() local e1=Effect.CreateEffect(rc) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(1) rc:RegisterEffect(e1) if not rc:IsType(TYPE_EFFECT) then local e2=e1:Clone() e2:SetOwner(c) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) rc:RegisterEffect(e2) end end