name: White
card_text: Pendulum Scale = 1
  [ Pendulum Effect ]
  Once per turn, when an activated card or effect resolves that targets a DARK Spellcaster-Type monster you control, negate that effect, then destroy this card.
  ----------------------------------------
  [ Monster Effect ]
  (This card is always treated as a "Synchro Dragon" card.)
  If this Pendulum Summoned card is used for a Synchro Summon, banish it.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.EnablePendulumAttribute(c)
  	--Negate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_CHAIN_SOLVING)
  	e1:SetRange(LOCATION_PZONE)
  	e1:SetCondition(s.condition)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--Banish
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetValue(LOCATION_REMOVED)
  	e2:SetCondition(s.rmcon)
  	c:RegisterEffect(e2)
  end
  function s.cfilter(c, tp)
  	return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsControler(tp)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetChainInfo(ev, CHAININFO_TARGET_CARDS)
  	return e:GetHandler():GetFlagEffect(id) == 0
  		and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
  		and g
  		and g:IsExists(s.cfilter, 1, nil, tp)
  		and Duel.IsChainDisablable(ev)
  		and not Duel.IsChainDisabled(ev)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.SelectEffectYesNo(tp, e:GetHandler()) then
  		Duel.Hint(HINT_CARD, 0, id)
  		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
  		if Duel.NegateEffect(ev) then
  			Duel.BreakEffect()
  			Duel.Destroy(e:GetHandler(), REASON_EFFECT)
  		end
  	end
  end
  function s.rmcon(e)
  	local c = e:GetHandler()
  	return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO)
  end
  
  
source_text: White
  Pendulum Scale = 1
  [ Pendulum Effect ]
  Once per turn, when an activated card or effect resolves that targets a DARK Spellcaster-Type monster you control, negate that effect, then destroy this card.
  ----------------------------------------
  [ Monster Effect ]
  (This card is always treated as a "Synchro Dragon" card.)
  If this Pendulum Summoned card is used for a Synchro Summon, banish it.
target_text: -- White
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.EnablePendulumAttribute(c)
  	--Negate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_CHAIN_SOLVING)
  	e1:SetRange(LOCATION_PZONE)
  	e1:SetCondition(s.condition)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--Banish
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetValue(LOCATION_REMOVED)
  	e2:SetCondition(s.rmcon)
  	c:RegisterEffect(e2)
  end
  function s.cfilter(c, tp)
  	return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsControler(tp)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetChainInfo(ev, CHAININFO_TARGET_CARDS)
  	return e:GetHandler():GetFlagEffect(id) == 0
  		and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
  		and g
  		and g:IsExists(s.cfilter, 1, nil, tp)
  		and Duel.IsChainDisablable(ev)
  		and not Duel.IsChainDisabled(ev)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.SelectEffectYesNo(tp, e:GetHandler()) then
  		Duel.Hint(HINT_CARD, 0, id)
  		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
  		if Duel.NegateEffect(ev) then
  			Duel.BreakEffect()
  			Duel.Destroy(e:GetHandler(), REASON_EFFECT)
  		end
  	end
  end
  function s.rmcon(e)
  	local c = e:GetHandler()
  	return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO)
  end
  
  