--Zodiakieri Equinox function c9945535.initial_effect(c) --Cannot Trigger local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCondition(c9945535.condition) c:RegisterEffect(e1) --Activate local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetOperation(c9945535.operation) c:RegisterEffect(e2) --Set local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(9945535,0)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_DESTROYED) e3:SetTarget(c9945535.settg) e3:SetOperation(c9945535.setop) c:RegisterEffect(e3) end function c9945535.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 c9945535.filter(c) return c:IsFaceup() and c:IsSetCard(0x12D7) end function c9945535.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c9945535.filter,tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() while tc do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetValue(c9945535.efilter) tc:RegisterEffect(e1) tc=g:GetNext() end end function c9945535.efilter(e,re) return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) end function c9945535.setfilter(c) return c:IsSetCard(0x12D7) and not c:IsCode(9945535) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() end function c9945535.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(c9945535.setfilter,tp,LOCATION_DECK,0,1,nil) end end function c9945535.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local g=Duel.SelectMatchingCard(tp,c9945535.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