--Zodiakieri Solstice function c9945595.initial_effect(c) --Cannot Trigger local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCondition(c9945595.condition) c:RegisterEffect(e1) --Activate local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(9945595,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,9945595+EFFECT_COUNT_CODE_OATH) e2:SetTarget(c9945595.sptg) e2:SetOperation(c9945595.spop) c:RegisterEffect(e2) --Set local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(9945595,0)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_DESTROYED) e3:SetTarget(c9945595.settg) e3:SetCountLimit(1,9945596) e3:SetOperation(c9945595.setop) c:RegisterEffect(e3) end function c9945595.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return not (c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY)) end function c9945595.spfilter(c,e,tp) return c:IsSetCard(0x12D7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c9945595.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c9945595.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 c9945595.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(c9945595.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function c9945595.setfilter(c) return c:IsSetCard(0x12D7) and not c:IsCode(9945595) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() end function c9945595.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c9945595.setfilter,tp,LOCATION_DECK,0,1,nil) end end function c9945595.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local g=Duel.SelectMatchingCard(tp,c9945595.setfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SSet(tp,g:GetFirst()) Duel.ConfirmCards(1-tp,g) end end