name: Cloudian
card_text: Once per turn, during your Standby Phase: Place 1 Fog Counter on each face-up monster on the field.
external_ids: local COUNTER_ID_0 = 0x1019 --Fog
  
lua: local COUNTER_ID_0 = 0x1019 --Fog
  local s, id, o = GetID()
  function s.initial_effect(c)
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--counter
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_COUNTER)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e2:SetCountLimit(1)
  	e2:SetCondition(s.condition)
  	e2:SetOperation(s.operation)
  	c:RegisterEffect(e2)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() == tp
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(Card.IsCanAddCounter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, 0x1019, 1)
  	local tc = g:GetFirst()
  	while tc do
  		tc:AddCounter(COUNTER_ID_0, 1)
  		tc = g:GetNext()
  	end
  end
  
  
source_text: Cloudian
  Once per turn, during your Standby Phase: Place 1 Fog Counter on each face-up monster on the field.
target_text: -- Cloudian
  local COUNTER_ID_0 = 0x1019 --Fog
  local s, id, o = GetID()
  function s.initial_effect(c)
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--counter
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_COUNTER)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e2:SetCountLimit(1)
  	e2:SetCondition(s.condition)
  	e2:SetOperation(s.operation)
  	c:RegisterEffect(e2)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() == tp
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(Card.IsCanAddCounter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, 0x1019, 1)
  	local tc = g:GetFirst()
  	while tc do
  		tc:AddCounter(COUNTER_ID_0, 1)
  		tc = g:GetNext()
  	end
  end
  
  