name: Marshmallon
card_text: While "Marshmallon" is in your Monster Zone, your opponent cannot target monsters other than "Marshmallon" for attacks.
external_ids: local CARD_ID_0 = 31305911 --Marshmallon
  
lua: local CARD_ID_0 = 31305911 --Marshmallon
  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)
  	c:RegisterEffect(e1)
  	--
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(0, LOCATION_MZONE)
  	e2:SetCondition(s.con)
  	e2:SetValue(s.atlimit)
  	c:RegisterEffect(e2)
  	--
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetTargetRange(0, LOCATION_MZONE)
  	e3:SetCondition(s.con)
  	c:RegisterEffect(e3)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_0)
  end
  function s.con(e)
  	return Duel.IsExistingMatchingCard(s.cfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, nil)
  end
  function s.atlimit(e, c)
  	return c:IsFacedown() or not c:IsCode(CARD_ID_0)
  end
  
  
source_text: Marshmallon
  While "Marshmallon" is in your Monster Zone, your opponent cannot target monsters other than "Marshmallon" for attacks.
target_text: -- Marshmallon
  local CARD_ID_0 = 31305911 --Marshmallon
  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)
  	c:RegisterEffect(e1)
  	--
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(0, LOCATION_MZONE)
  	e2:SetCondition(s.con)
  	e2:SetValue(s.atlimit)
  	c:RegisterEffect(e2)
  	--
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetTargetRange(0, LOCATION_MZONE)
  	e3:SetCondition(s.con)
  	c:RegisterEffect(e3)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_0)
  end
  function s.con(e)
  	return Duel.IsExistingMatchingCard(s.cfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, nil)
  end
  function s.atlimit(e, c)
  	return c:IsFacedown() or not c:IsCode(CARD_ID_0)
  end
  
  