name: Hollow
card_text: Activate this card only if both players control a monster that was Special Summoned from the Extra Deck. Negate the effects of face-up monsters Special Summoned from the Extra Deck. If a monster(s) is destroyed by battle involving 2 monsters that were Special Summoned from the Extra Deck: Send this card to the GY, also the player(s) who controlled the destroyed monster(s) takes 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)
  	e1:SetCondition(s.actcon)
  	c:RegisterEffect(e1)
  	--disable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_DISABLE)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e2:SetTarget(s.distg)
  	c:RegisterEffect(e2)
  	--send to GY
  	local e3 = Effect.CreateEffect(c)
  	e3:SetCategory(CATEGORY_TOGRAVE + CATEGORY_DAMAGE)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e3:SetCode(EVENT_BATTLE_DESTROYED)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCondition(s.tgcon)
  	e3:SetTarget(s.tgtg)
  	e3:SetOperation(s.tgop)
  	c:RegisterEffect(e3)
  end
  function s.cfilter(c)
  	return c:IsSummonLocation(LOCATION_EXTRA)
  end
  function s.actcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingMatchingCard(s.cfilter, tp, 0, LOCATION_MZONE, 1, nil)
  end
  function s.distg(e, c)
  	return c:IsSummonLocation(LOCATION_EXTRA)
  end
  function s.egfilter(c)
  	local d = c:GetBattleTarget()
  	return c:IsSummonLocation(LOCATION_EXTRA) and d:IsSummonLocation(LOCATION_EXTRA)
  end
  function s.pcheck(c, tp)
  	return c:IsPreviousControler(tp)
  end
  function s.tgcon(e, tp, eg, ep, ev, re, r, rp)
  	return eg:IsExists(s.egfilter, 1, nil)
  end
  function s.tgtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, e:GetHandler(), 1, 0, 0)
  	local tg, pct, player = eg:Filter(s.egfilter, nil), 0, 0
  	for p = 0, 1 do
  		if tg:IsExists(s.pcheck, 1, nil, p) then
  			pct = pct + 1
  			player = p
  		end
  	end
  	if pct == 2 then
  		player = PLAYER_ALL
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, player, 1000)
  end
  function s.tgop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) then
  		Duel.SendtoGrave(c, REASON_EFFECT)
  		local tg = eg:Filter(s.egfilter, nil)
  		for p = 0, 1 do
  			if tg:IsExists(s.pcheck, 1, nil, p) then
  				Duel.Damage(p, 1000, REASON_EFFECT, true)
  			end
  		end
  		Duel.RDComplete()
  	end
  end
  
  
source_text: Hollow
  Activate this card only if both players control a monster that was Special Summoned from the Extra Deck. Negate the effects of face-up monsters Special Summoned from the Extra Deck. If a monster(s) is destroyed by battle involving 2 monsters that were Special Summoned from the Extra Deck: Send this card to the GY, also the player(s) who controlled the destroyed monster(s) takes 1000 damage.
target_text: -- Hollow
  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)
  	e1:SetCondition(s.actcon)
  	c:RegisterEffect(e1)
  	--disable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_DISABLE)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e2:SetTarget(s.distg)
  	c:RegisterEffect(e2)
  	--send to GY
  	local e3 = Effect.CreateEffect(c)
  	e3:SetCategory(CATEGORY_TOGRAVE + CATEGORY_DAMAGE)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e3:SetCode(EVENT_BATTLE_DESTROYED)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCondition(s.tgcon)
  	e3:SetTarget(s.tgtg)
  	e3:SetOperation(s.tgop)
  	c:RegisterEffect(e3)
  end
  function s.cfilter(c)
  	return c:IsSummonLocation(LOCATION_EXTRA)
  end
  function s.actcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingMatchingCard(s.cfilter, tp, 0, LOCATION_MZONE, 1, nil)
  end
  function s.distg(e, c)
  	return c:IsSummonLocation(LOCATION_EXTRA)
  end
  function s.egfilter(c)
  	local d = c:GetBattleTarget()
  	return c:IsSummonLocation(LOCATION_EXTRA) and d:IsSummonLocation(LOCATION_EXTRA)
  end
  function s.pcheck(c, tp)
  	return c:IsPreviousControler(tp)
  end
  function s.tgcon(e, tp, eg, ep, ev, re, r, rp)
  	return eg:IsExists(s.egfilter, 1, nil)
  end
  function s.tgtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, e:GetHandler(), 1, 0, 0)
  	local tg, pct, player = eg:Filter(s.egfilter, nil), 0, 0
  	for p = 0, 1 do
  		if tg:IsExists(s.pcheck, 1, nil, p) then
  			pct = pct + 1
  			player = p
  		end
  	end
  	if pct == 2 then
  		player = PLAYER_ALL
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, player, 1000)
  end
  function s.tgop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) then
  		Duel.SendtoGrave(c, REASON_EFFECT)
  		local tg = eg:Filter(s.egfilter, nil)
  		for p = 0, 1 do
  			if tg:IsExists(s.pcheck, 1, nil, p) then
  				Duel.Damage(p, 1000, REASON_EFFECT, true)
  			end
  		end
  		Duel.RDComplete()
  	end
  end
  
  