--Elemental HERO Neo New Bubbleman function c269000009.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCondition(c269000009.spcon) c:RegisterEffect(e1) --draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(79979666,1)) e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCondition(c269000009.condition) e2:SetTarget(c269000009.target) e2:SetOperation(c269000009.operation) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) local e4=e2:Clone() e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e4) --change name local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e5:SetCode(EFFECT_CHANGE_CODE) e5:SetRange(LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND) e5:SetValue(79979666) c:RegisterEffect(e5) --destroy local e6=Effect.CreateEffect(c) e6:SetDescription(aux.Stringid(5285665,0)) e6:SetCategory(CATEGORY_DESTROY) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e6:SetCode(EVENT_DAMAGE_STEP_END) e6:SetTarget(c269000009.destg) e6:SetOperation(c269000009.desop) c:RegisterEffect(e6) end function c269000009.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)==1 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function c269000009.filter(c) return not c:IsStatus(STATUS_LEAVE_CONFIRMED) end function c269000009.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(c269000009.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end function c269000009.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function c269000009.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsExistingMatchingCard(c269000009.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end function c269000009.destg(e,tp,eg,ep,ev,re,r,rp,chk) local bc=e:GetHandler():GetBattleTarget() if chk==0 then return bc and bc:IsRelateToBattle() end Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) end function c269000009.desop(e,tp,eg,ep,ev,re,r,rp) local bc=e:GetHandler():GetBattleTarget() if bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end end