name: Guardian
card_text: Cannot be Summoned unless you control a face-up "Rod of Silence - Kay'est". This card is unaffected by Spell effects and cannot be targeted for attacks, but does not prevent your opponent from attacking you directly.
external_ids: local CARD_ID_0 = 95515060 --Rod of Silence - Kay'est
  
lua: local CARD_ID_0 = 95515060 --Rod of Silence - Kay'est
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--sum limit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_SUMMON)
  	e1:SetCondition(s.sumcon)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e3:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e3:SetValue(s.sumlimit)
  	c:RegisterEffect(e3)
  	--immune spell
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetCode(EFFECT_IMMUNE_EFFECT)
  	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetValue(s.efilter)
  	c:RegisterEffect(e4)
  	--atk
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_SINGLE)
  	e5:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
  	e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e5:SetRange(LOCATION_MZONE)
  	e5:SetValue(1)
  	c:RegisterEffect(e5)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_0)
  end
  function s.sumcon(e)
  	return not Duel.IsExistingMatchingCard(s.cfilter, e:GetHandlerPlayer(), LOCATION_ONFIELD, 0, 1, nil)
  end
  function s.sumlimit(e, se, sp, st, pos, tp)
  	return Duel.IsExistingMatchingCard(s.cfilter, sp, LOCATION_ONFIELD, 0, 1, nil)
  end
  function s.efilter(e, te)
  	return te:IsActiveType(TYPE_SPELL)
  end
  
  
source_text: Guardian
  Cannot be Summoned unless you control a face-up "Rod of Silence - Kay'est". This card is unaffected by Spell effects and cannot be targeted for attacks, but does not prevent your opponent from attacking you directly.
target_text: -- Guardian
  local CARD_ID_0 = 95515060 --Rod of Silence - Kay'est
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--sum limit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_SUMMON)
  	e1:SetCondition(s.sumcon)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e3:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e3:SetValue(s.sumlimit)
  	c:RegisterEffect(e3)
  	--immune spell
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetCode(EFFECT_IMMUNE_EFFECT)
  	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetValue(s.efilter)
  	c:RegisterEffect(e4)
  	--atk
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_SINGLE)
  	e5:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
  	e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e5:SetRange(LOCATION_MZONE)
  	e5:SetValue(1)
  	c:RegisterEffect(e5)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_0)
  end
  function s.sumcon(e)
  	return not Duel.IsExistingMatchingCard(s.cfilter, e:GetHandlerPlayer(), LOCATION_ONFIELD, 0, 1, nil)
  end
  function s.sumlimit(e, se, sp, st, pos, tp)
  	return Duel.IsExistingMatchingCard(s.cfilter, sp, LOCATION_ONFIELD, 0, 1, nil)
  end
  function s.efilter(e, te)
  	return te:IsActiveType(TYPE_SPELL)
  end
  
  