--Neptune --coded by Concordia function c68709329.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(68709329,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCountLimit(1,68709329) e1:SetTarget(c68709329.sumtg) e1:SetOperation(c68709329.sumop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) --to grave local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(68709329,0)) e3:SetCategory(CATEGORY_TOGRAVE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DESTROYED) e3:SetCondition(c68709329.condition) e3:SetTarget(c68709329.target) e3:SetOperation(c68709329.operation) c:RegisterEffect(e3) end function c68709329.spfilter(c,e,tp) return c:IsSetCard(0xf08) and not c:IsCode(68709329) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function c68709329.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c68709329.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) end function c68709329.sumop(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(c68709329.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetReset(RESET_EVENT+0x47e0000) tc:RegisterEffect(e1,true) Duel.SpecialSummonComplete() local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetReset(RESET_PHASE+PHASE_END) e2:SetTargetRange(1,0) e2:SetTarget(c68709329.splimit) Duel.RegisterEffect(e2,tp) end end function c68709329.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not (c:IsSetCard(0xf08) or c:IsSetCard(0xf09)) end function c68709329.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) end function c68709329.filter(c) return c:IsSetCard(0xf08) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() end function c68709329.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function c68709329.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c68709329.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end