name: Venom
card_text: Once per turn, you can place 2 Venom Counters on 1 monster your opponent controls. If you activate this effect, this card cannot attack during this turn.
external_ids: local CARD_ID_0 = 54306223 --Venom Swamp
  local COUNTER_ID_0 = 0x1009 --Venom
  
lua: local CARD_ID_0 = 54306223 --Venom Swamp
  local COUNTER_ID_0 = 0x1009 --Venom
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--add counter
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_COUNTER)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetCountLimit(1)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():GetAttackAnnouncedCount() == 0
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_OATH)
  	e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  	e:GetHandler():RegisterEffect(e1)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(1 - tp) and chkc:IsCanAddCounter(COUNTER_ID_0, 2)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsCanAddCounter, tp, 0, LOCATION_MZONE, 1, nil, 0x1009, 2)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	local g = Duel.SelectTarget(tp, Card.IsCanAddCounter, tp, 0, LOCATION_MZONE, 1, 1, nil, 0x1009, 2)
  	Duel.SetOperationInfo(0, CATEGORY_COUNTER, nil, 2, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(COUNTER_ID_0, 2) then
  		local atk = tc:GetAttack()
  		tc:AddCounter(COUNTER_ID_0, 2)
  		if atk > 0 and tc:IsAttack(0) then
  			Duel.RaiseEvent(tc, EVENT_CUSTOM + CARD_ID_0, e, 0, 0, 0, 0)
  		end
  	end
  end
  
  
source_text: Venom
  Once per turn, you can place 2 Venom Counters on 1 monster your opponent controls. If you activate this effect, this card cannot attack during this turn.
target_text: -- Venom
  local CARD_ID_0 = 54306223 --Venom Swamp
  local COUNTER_ID_0 = 0x1009 --Venom
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--add counter
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_COUNTER)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetCountLimit(1)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():GetAttackAnnouncedCount() == 0
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_OATH)
  	e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  	e:GetHandler():RegisterEffect(e1)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsControler(1 - tp) and chkc:IsCanAddCounter(COUNTER_ID_0, 2)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsCanAddCounter, tp, 0, LOCATION_MZONE, 1, nil, 0x1009, 2)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	local g = Duel.SelectTarget(tp, Card.IsCanAddCounter, tp, 0, LOCATION_MZONE, 1, 1, nil, 0x1009, 2)
  	Duel.SetOperationInfo(0, CATEGORY_COUNTER, nil, 2, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(COUNTER_ID_0, 2) then
  		local atk = tc:GetAttack()
  		tc:AddCounter(COUNTER_ID_0, 2)
  		if atk > 0 and tc:IsAttack(0) then
  			Duel.RaiseEvent(tc, EVENT_CUSTOM + CARD_ID_0, e, 0, 0, 0, 0)
  		end
  	end
  end
  
  