name: Traptrix
card_text: Unaffected by the effects of "Hole" Normal Traps. You can activate "Hole" Normal Trap Cards from your hand. The activation and effects of Normal Traps activated on your field cannot be negated.
external_ids: local SETCARD_ID_0 = 0x4c --Trap
  
lua: local SETCARD_ID_0 = 0x4c --Trap
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--immune
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EFFECT_IMMUNE_EFFECT)
  	e1:SetValue(s.efilter)
  	c:RegisterEffect(e1)
  	--
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(LOCATION_HAND, 0)
  	e2:SetTarget(s.etarget)
  	e2:SetValue(id)
  	c:RegisterEffect(e2)
  	--
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_CANNOT_INACTIVATE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetValue(s.chainfilter)
  	c:RegisterEffect(e3)
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_FIELD)
  	e4:SetCode(EFFECT_CANNOT_DISEFFECT)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetValue(s.chainfilter)
  	c:RegisterEffect(e4)
  end
  function s.efilter(e, te)
  	local c = te:GetHandler()
  	return c:GetType() == TYPE_TRAP and c:IsSetCard(SETCARD_ID_0, 0x89)
  end
  function s.etarget(e, c)
  	return c:GetType() == TYPE_TRAP and c:IsSetCard(SETCARD_ID_0, 0x89)
  end
  function s.chainfilter(e, ct)
  	local p = e:GetHandlerPlayer()
  	local te, tp = Duel.GetChainInfo(ct, CHAININFO_TRIGGERING_EFFECT, CHAININFO_TRIGGERING_PLAYER)
  	return p == tp and te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetActiveType() == TYPE_TRAP
  end
  
  
source_text: Traptrix
  Unaffected by the effects of "Hole" Normal Traps. You can activate "Hole" Normal Trap Cards from your hand. The activation and effects of Normal Traps activated on your field cannot be negated.
target_text: -- Traptrix
  local SETCARD_ID_0 = 0x4c --Trap
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--immune
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EFFECT_IMMUNE_EFFECT)
  	e1:SetValue(s.efilter)
  	c:RegisterEffect(e1)
  	--
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(LOCATION_HAND, 0)
  	e2:SetTarget(s.etarget)
  	e2:SetValue(id)
  	c:RegisterEffect(e2)
  	--
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_CANNOT_INACTIVATE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetValue(s.chainfilter)
  	c:RegisterEffect(e3)
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_FIELD)
  	e4:SetCode(EFFECT_CANNOT_DISEFFECT)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetValue(s.chainfilter)
  	c:RegisterEffect(e4)
  end
  function s.efilter(e, te)
  	local c = te:GetHandler()
  	return c:GetType() == TYPE_TRAP and c:IsSetCard(SETCARD_ID_0, 0x89)
  end
  function s.etarget(e, c)
  	return c:GetType() == TYPE_TRAP and c:IsSetCard(SETCARD_ID_0, 0x89)
  end
  function s.chainfilter(e, ct)
  	local p = e:GetHandlerPlayer()
  	local te, tp = Duel.GetChainInfo(ct, CHAININFO_TRIGGERING_EFFECT, CHAININFO_TRIGGERING_PLAYER)
  	return p == tp and te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetActiveType() == TYPE_TRAP
  end
  
  