name: Dark
card_text: While you have 2 "D/D" cards in your Pendulum Zones, your opponent cannot target monsters on the field with Spell/Trap effects, Tribute them for a Tribute Summon, nor use them as Materials for a Fusion, Synchro, or Xyz Summon. Once per turn, during your Standby Phase: Take 1000 damage.
lua: 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)
  	--cannot be target
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE + EFFECT_FLAG_SET_AVAILABLE)
  	e2:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e2:SetCondition(s.condition)
  	e2:SetValue(s.evalue)
  	c:RegisterEffect(e2)
  	--cannot release
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCode(EFFECT_UNRELEASABLE_SUM)
  	e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
  	e3:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e3:SetCondition(s.condition)
  	e3:SetValue(s.sumlimit)
  	c:RegisterEffect(e3)
  	local e5 = e3:Clone()
  	e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
  	e5:SetValue(s.fuslimit)
  	c:RegisterEffect(e5)
  	local e6 = e3:Clone()
  	e6:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
  	c:RegisterEffect(e6)
  	local e7 = e3:Clone()
  	e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
  	c:RegisterEffect(e7)
  	--damage
  	local e8 = Effect.CreateEffect(c)
  	e8:SetDescription(aux.Stringid(id, 0))
  	e8:SetCategory(CATEGORY_DAMAGE)
  	e8:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e8:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e8:SetRange(LOCATION_SZONE)
  	e8:SetCountLimit(1)
  	e8:SetCondition(s.damcon)
  	e8:SetTarget(s.damtg)
  	e8:SetOperation(s.damop)
  	c:RegisterEffect(e8)
  end
  function s.condition(e)
  	return Duel.IsExistingMatchingCard(Card.IsSetCard, e:GetHandlerPlayer(), LOCATION_PZONE, 0, 2, nil, 0xaf)
  end
  function s.sumlimit(e, c)
  	if not c then
  		return false
  	end
  	return not c:IsControler(e:GetHandlerPlayer())
  end
  function s.fuslimit(e, c, sumtype)
  	if not c then
  		return false
  	end
  	return not c:IsControler(e:GetHandlerPlayer()) and sumtype == SUMMON_TYPE_FUSION
  end
  function s.evalue(e, re, rp)
  	return re:IsActiveType(TYPE_SPELL + TYPE_TRAP) and rp == 1 - e:GetHandlerPlayer()
  end
  function s.damcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() == tp
  end
  function s.damtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(1000)
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, 0, 0, tp, 1000)
  end
  function s.damop(e, tp, eg, ep, ev, re, r, rp)
  	local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Damage(p, d, REASON_EFFECT)
  end
  
  
source_text: Dark
  While you have 2 "D/D" cards in your Pendulum Zones, your opponent cannot target monsters on the field with Spell/Trap effects, Tribute them for a Tribute Summon, nor use them as Materials for a Fusion, Synchro, or Xyz Summon. Once per turn, during your Standby Phase: Take 1000 damage.
target_text: -- Dark
  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)
  	--cannot be target
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE + EFFECT_FLAG_SET_AVAILABLE)
  	e2:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e2:SetCondition(s.condition)
  	e2:SetValue(s.evalue)
  	c:RegisterEffect(e2)
  	--cannot release
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCode(EFFECT_UNRELEASABLE_SUM)
  	e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
  	e3:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e3:SetCondition(s.condition)
  	e3:SetValue(s.sumlimit)
  	c:RegisterEffect(e3)
  	local e5 = e3:Clone()
  	e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
  	e5:SetValue(s.fuslimit)
  	c:RegisterEffect(e5)
  	local e6 = e3:Clone()
  	e6:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
  	c:RegisterEffect(e6)
  	local e7 = e3:Clone()
  	e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
  	c:RegisterEffect(e7)
  	--damage
  	local e8 = Effect.CreateEffect(c)
  	e8:SetDescription(aux.Stringid(id, 0))
  	e8:SetCategory(CATEGORY_DAMAGE)
  	e8:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e8:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e8:SetRange(LOCATION_SZONE)
  	e8:SetCountLimit(1)
  	e8:SetCondition(s.damcon)
  	e8:SetTarget(s.damtg)
  	e8:SetOperation(s.damop)
  	c:RegisterEffect(e8)
  end
  function s.condition(e)
  	return Duel.IsExistingMatchingCard(Card.IsSetCard, e:GetHandlerPlayer(), LOCATION_PZONE, 0, 2, nil, 0xaf)
  end
  function s.sumlimit(e, c)
  	if not c then
  		return false
  	end
  	return not c:IsControler(e:GetHandlerPlayer())
  end
  function s.fuslimit(e, c, sumtype)
  	if not c then
  		return false
  	end
  	return not c:IsControler(e:GetHandlerPlayer()) and sumtype == SUMMON_TYPE_FUSION
  end
  function s.evalue(e, re, rp)
  	return re:IsActiveType(TYPE_SPELL + TYPE_TRAP) and rp == 1 - e:GetHandlerPlayer()
  end
  function s.damcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() == tp
  end
  function s.damtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(1000)
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, 0, 0, tp, 1000)
  end
  function s.damop(e, tp, eg, ep, ev, re, r, rp)
  	local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Damage(p, d, REASON_EFFECT)
  end
  
  