--System Reverser function c213215.initial_effect(c) aux.AddCodeList(c,213200) --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(213215,0)) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetTarget(c213215.eqtg) e1:SetOperation(c213215.eqop) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(213215,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1,213215) e2:SetRange(LOCATION_SZONE) e2:SetCondition(c213215.spcon) e2:SetTarget(c213215.sptg) e2:SetOperation(c213215.spop) c:RegisterEffect(e2) --draw local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(213215,2)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE+LOCATION_SZONE) e3:SetTarget(c213215.drtg) e3:SetOperation(c213215.drop) e3:SetCountLimit(1,213216) c:RegisterEffect(e3) end function c213215.filter(c) return c:IsFaceup() and c:IsRace(RACE_CYBERSE) end function c213215.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c213215.filter(chkc) and chkc~=c end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingTarget(c213215.filter,tp,LOCATION_MZONE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.SelectTarget(tp,c213215.filter,tp,LOCATION_MZONE,0,1,1,c) end function c213215.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end local tc=Duel.GetFirstTarget() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then Duel.SendtoGrave(c,REASON_EFFECT) return end if not Duel.Equip(tp,c,tc) then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(c213215.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) end function c213215.eqlimit(e,c) return c==e:GetLabelObject() end function c213215.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetEquipTarget() end function c213215.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c213215.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function c213215.drfilter(c) return c:IsRace(RACE_CYBERSE) and c:IsAbleToDeck() end function c213215.ctfilter(c) return c:IsFaceup() and c:IsOriginalCodeRule(213200) end function c213215.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ct=1 if Duel.IsExistingMatchingCard(c213215.ctfilter,tp,LOCATION_MZONE,0,1,nil) then ct=2 end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c213215.drfilter(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,ct) and Duel.IsExistingTarget(c213215.drfilter,tp,LOCATION_GRAVE,0,3,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,c213215.drfilter,tp,LOCATION_GRAVE,0,3,3,nil) e:SetLabel(ct) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) end function c213215.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if #tg~=0 then Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,e:GetLabel(),REASON_EFFECT) end end end