name: The
card_text: Place 1 Ocean Counter on this card during each player's Standby Phase. When this card is removed from the field, all Fish-Type and Sea Serpent-Type monsters you control gain 200 ATK for each Ocean Counter on this card, until the End Phase.
external_ids: local COUNTER_ID_0 = 0x23 --Ocean
  
lua: local COUNTER_ID_0 = 0x23 --Ocean
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableCounterPermit(0x23)
  	--add counter
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_COUNTER)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e1:SetTarget(s.addct)
  	e1:SetOperation(s.addc)
  	c:RegisterEffect(e1)
  	--attackup
  	local e0 = Effect.CreateEffect(c)
  	e0:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e0:SetCode(EVENT_LEAVE_FIELD_P)
  	e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e0:SetOperation(s.regop)
  	c:RegisterEffect(e0)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e2:SetCode(EVENT_LEAVE_FIELD)
  	e2:SetCondition(s.atkcon)
  	e2:SetOperation(s.atkop)
  	e2:SetLabelObject(e0)
  	c:RegisterEffect(e2)
  end
  function s.addct(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_COUNTER, nil, 1, 0, 0x23)
  end
  function s.addc(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():IsRelateToEffect(e) then
  		e:GetHandler():AddCounter(COUNTER_ID_0, 1)
  	end
  end
  function s.regop(e, tp, eg, ep, ev, re, r, rp)
  	local ct = e:GetHandler():GetCounter(COUNTER_ID_0)
  	e:SetLabel(ct)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	local ct = e:GetLabelObject():GetLabel()
  	e:SetLabel(ct)
  	return ct > 0
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsRace(RACE_FISH + RACE_SEASERPENT)
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, nil)
  	local tc = g:GetFirst()
  	while tc do
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(e:GetLabel() * 200)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		tc = g:GetNext()
  	end
  end
  
  
source_text: The
  Place 1 Ocean Counter on this card during each player's Standby Phase. When this card is removed from the field, all Fish-Type and Sea Serpent-Type monsters you control gain 200 ATK for each Ocean Counter on this card, until the End Phase.
target_text: -- The
  local COUNTER_ID_0 = 0x23 --Ocean
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableCounterPermit(0x23)
  	--add counter
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_COUNTER)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e1:SetTarget(s.addct)
  	e1:SetOperation(s.addc)
  	c:RegisterEffect(e1)
  	--attackup
  	local e0 = Effect.CreateEffect(c)
  	e0:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e0:SetCode(EVENT_LEAVE_FIELD_P)
  	e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e0:SetOperation(s.regop)
  	c:RegisterEffect(e0)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e2:SetCode(EVENT_LEAVE_FIELD)
  	e2:SetCondition(s.atkcon)
  	e2:SetOperation(s.atkop)
  	e2:SetLabelObject(e0)
  	c:RegisterEffect(e2)
  end
  function s.addct(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_COUNTER, nil, 1, 0, 0x23)
  end
  function s.addc(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():IsRelateToEffect(e) then
  		e:GetHandler():AddCounter(COUNTER_ID_0, 1)
  	end
  end
  function s.regop(e, tp, eg, ep, ev, re, r, rp)
  	local ct = e:GetHandler():GetCounter(COUNTER_ID_0)
  	e:SetLabel(ct)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	local ct = e:GetLabelObject():GetLabel()
  	e:SetLabel(ct)
  	return ct > 0
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsRace(RACE_FISH + RACE_SEASERPENT)
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, nil)
  	local tc = g:GetFirst()
  	while tc do
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(e:GetLabel() * 200)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		tc = g:GetNext()
  	end
  end
  
  