--Alchemage Manaboost local cid,id=GetID() function cid.initial_effect(c) --Converge Mana local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCost(cid.atcost) e1:SetCountLimit(1,id) e1:SetTarget(cid.cttg) e1:SetOperation(cid.ctop) c:RegisterEffect(e1) --Atk up local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCondition(aux.exccon) e3:SetCost(aux.bfgcost) e3:SetOperation(cid.spop) c:RegisterEffect(e3) end --Filters function cid.cfilter(c) return c:IsSetCard(0x8108) and not c:IsPublic() end --Converge Mana function cid.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cid.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectMatchingCard(tp,cid.cfilter,tp,LOCATION_HAND,0,1,63,nil) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) e:SetLabel(g:GetCount()) end function cid.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return Duel.IsPlayerCanDraw(tp,1) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsCanAddCounter(0x1818,1) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x1818,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),0x1818,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function cid.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then tc:AddCounter(0x1818,e:GetLabel()) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end end --ATK Boost function cid.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(cid.atkfilter,tp, LOCATION_MZONE,0,nil) local tc=g:GetFirst() while tc do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(100*Duel.GetCounter(tp,1,0,0x1818)) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) tc=g:GetNext() end end