--Bomber Goblin's Throwing Grounds --Automate ID local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:Desc(0) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) e2:Desc(1) e2:SetCategory(CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_TRIGGER_F) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EVENT_DESTROYED) e2:SetRange(LOCATION_FZONE) e2:HOPT() e2:SetCondition(s.condition) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) --draw local e3=Effect.CreateEffect(c) e3:Desc(2) e3:SetCategory(CATEGORY_DRAW) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_FZONE) e3:HOPT() e3:SetCost(s.drcost) e3:SetTarget(s.drtg) e3:SetOperation(s.drop) c:RegisterEffect(e3) end function s.cfilter(c,rc) return c:IsSetCard(ARCHE_GRENADE_TYPE) and c:IsReason(REASON_EFFECT) and rc==c end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not re then return false end return eg:IsExists(s.cfilter,1,nil,re:GetHandler()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(800) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end function s.costfilter1(c) return c:IsMonster() and c:IsSetCard(ARCHE_GRENADE_TYPE) and c:IsDiscardable() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter1,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,s.costfilter1,1,1,REASON_DISCARD|REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end