name: Fog
card_text: Tribute 1 face-up "Cloudian" monster, then target 1 face-up monster on the field; place 3 Fog Counters on that target.
external_ids: local SETCARD_ID_0 = 0x18 --Cloudian
  local COUNTER_ID_0 = 0x1019 --Fog
  
lua: local SETCARD_ID_0 = 0x18 --Cloudian
  local COUNTER_ID_0 = 0x1019 --Fog
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckReleaseGroup(tp, s.cfilter, 1, nil)
  	end
  	local g = Duel.SelectReleaseGroup(tp, s.cfilter, 1, 1, nil)
  	Duel.Release(g, REASON_COST)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsCanAddCounter, tp, LOCATION_MZONE, LOCATION_MZONE, 2, nil, 0x1019, 3)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, Card.IsCanAddCounter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil, 0x1019, 3)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsFaceup() and tc:IsRelateToEffect(e) then
  		tc:AddCounter(COUNTER_ID_0, 3)
  	end
  end
  
  
source_text: Fog
  Tribute 1 face-up "Cloudian" monster, then target 1 face-up monster on the field; place 3 Fog Counters on that target.
target_text: -- Fog
  local SETCARD_ID_0 = 0x18 --Cloudian
  local COUNTER_ID_0 = 0x1019 --Fog
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckReleaseGroup(tp, s.cfilter, 1, nil)
  	end
  	local g = Duel.SelectReleaseGroup(tp, s.cfilter, 1, 1, nil)
  	Duel.Release(g, REASON_COST)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsCanAddCounter, tp, LOCATION_MZONE, LOCATION_MZONE, 2, nil, 0x1019, 3)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, Card.IsCanAddCounter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil, 0x1019, 3)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsFaceup() and tc:IsRelateToEffect(e) then
  		tc:AddCounter(COUNTER_ID_0, 3)
  	end
  end
  
  