--Galvanizer Conduction function c2320001.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --decrease tribute local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(2320001,0)) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SUMMON_PROC) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_HAND,0) e2:SetCondition(c2320001.ntcon) e2:SetTarget(c2320001.nttg) c:RegisterEffect(e2) --Draw local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(2320001,0)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,2320001) e3:SetTarget(c2320001.target) e3:SetOperation(c2320001.operation) c:RegisterEffect(e3) --shuffle and draw local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetCountLimit(1,2320011) e4:SetRange(LOCATION_GRAVE) e4:SetCost(aux.bfgcost) e4:SetTarget(c2320001.tdtg) e4:SetOperation(c2320001.tdop) c:RegisterEffect(e4) end function c2320001.tdfilter(c) return c:IsSetCard(0x232) and c:IsAbleToDeck() end function c2320001.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c2320001.tdfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c2320001.tdfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,c2320001.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function c2320001.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) end Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end end function c2320001.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function c2320001.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetDecktopGroup(tp,1) local tc=g:GetFirst() Duel.Draw(tp,1,REASON_EFFECT) if tc then Duel.ConfirmCards(1-tp,tc) if not tc:IsSetCard(0x232) then Duel.BreakEffect() Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) end Duel.ShuffleHand(tp) end end function c2320001.ntcon(e,c,minc) if c==nil then return true end return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function c2320001.nttg(e,c) return c:IsLevelAbove(5) and c:IsSetCard(0x232) end