name: Shadow-Imprisoning
card_text: Negate all DARK monster effects activated on the field or in the GY.
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)
  	--disable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCode(EVENT_CHAIN_SOLVING)
  	e2:SetOperation(s.disop)
  	c:RegisterEffect(e2)
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local loc = Duel.GetChainInfo(ev, CHAININFO_TRIGGERING_LOCATION)
  	if re:IsActiveType(TYPE_MONSTER) and (loc == LOCATION_MZONE or loc == LOCATION_GRAVE) and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) then
  		Duel.NegateEffect(ev)
  	end
  end
  
  
source_text: Shadow-Imprisoning
  Negate all DARK monster effects activated on the field or in the GY.
target_text: -- Shadow-Imprisoning
  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)
  	--disable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCode(EVENT_CHAIN_SOLVING)
  	e2:SetOperation(s.disop)
  	c:RegisterEffect(e2)
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local loc = Duel.GetChainInfo(ev, CHAININFO_TRIGGERING_LOCATION)
  	if re:IsActiveType(TYPE_MONSTER) and (loc == LOCATION_MZONE or loc == LOCATION_GRAVE) and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) then
  		Duel.NegateEffect(ev)
  	end
  end
  
  