name: Froggy
card_text: Activate only when a face-up "Frog" monster you control, except "Frog the Jam", is selected as an attack target. Destroy all Attack Position monsters your opponent controls.
external_ids: local SETCARD_ID_0 = 0x12 --Frog
  
lua: local SETCARD_ID_0 = 0x12 --Frog
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_BE_BATTLE_TARGET)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local d = Duel.GetAttackTarget()
  	return d and d:IsFaceup() and d:IsControler(tp) and d:IsSetCard(SETCARD_ID_0)
  end
  function s.filter(c)
  	return c:IsAttackPos()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_MZONE, nil)
  	if g:GetCount() > 0 then
  		Duel.Destroy(g, REASON_EFFECT)
  	end
  end
  
  
source_text: Froggy
  Activate only when a face-up "Frog" monster you control, except "Frog the Jam", is selected as an attack target. Destroy all Attack Position monsters your opponent controls.
target_text: -- Froggy
  local SETCARD_ID_0 = 0x12 --Frog
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_BE_BATTLE_TARGET)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local d = Duel.GetAttackTarget()
  	return d and d:IsFaceup() and d:IsControler(tp) and d:IsSetCard(SETCARD_ID_0)
  end
  function s.filter(c)
  	return c:IsAttackPos()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, 0, LOCATION_MZONE, nil)
  	if g:GetCount() > 0 then
  		Duel.Destroy(g, REASON_EFFECT)
  	end
  end
  
  