--Geargiastronaut --Script by: XGlitchy30 local cid,id=GetID() function cid.initial_effect(c) --flip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_POSITION) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCost(cid.gvcost) e1:SetTarget(cid.gvtg) e1:SetOperation(cid.gvop) c:RegisterEffect(e1) --recycle local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FLIP) e2:SetCountLimit(1,id+100) e2:SetTarget(cid.shtg) e2:SetOperation(cid.shop) c:RegisterEffect(e2) --flip 2 local e3=Effect.CreateEffect(c) e3:GLString(2) e3:SetCategory(CATEGORY_POSITION+CATEGORY_TODECK+CATEGORY_ATKCHANGE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id+200) e3:SetCondition(aux.exccon) e3:SetCost(aux.bfgcost) e3:SetTarget(cid.postg) e3:SetOperation(cid.posop) c:RegisterEffect(e3) end --FLIP function cid.gvcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() end Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) end function cid.gvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFacedown() end if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,1,nil) end function cid.gvop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) if tc:IsType(TYPE_MONSTER) and tc:IsSetCard(0x72) then Duel.ChangePosition(tc,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE) end end end --RECYCLE function cid.tdfilter(c) return c:IsSetCard(0x72) and c:IsAbleToDeck() end function cid.shtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cid.tdfilter(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(cid.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,aux.NecroValleyFilter(cid.tdfilter),tp,LOCATION_GRAVE,0,3,3,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function cid.shop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if tg:GetCount()<=0 then return end Duel.SendtoDeck(tg,nil,0,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,1,REASON_EFFECT) end end --FLIP 2 function cid.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFacedown() end if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,g:GetCount(),0,-1) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) end function cid.scfilter(c) return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_MACHINE) and c:IsLevel(3,4) and c:IsAbleToHand() end function cid.posop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFacedown() and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEUP_ATTACK)>0 and tc:IsFaceup() then if tc:IsType(TYPE_MONSTER) and tc:IsSetCard(0x72) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(cid.ftarget) e2:SetLabel(tc:GetFieldID()) e2:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e2,tp) else if not tc:IsAbleToDeck() then return end Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) end end end function cid.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() end