name: 禁じられた聖典
card_text: 1:お互いのモンスターが戦闘を行うダメージ計算時に発動できる。
  ダメージステップ終了時まで、このカード以外のフィールドのカードの効果は無効化され、その戦闘のダメージ計算は元々の攻撃力・守備力で行う。
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_PRE_DAMAGE_CALCULATE)
  	e1:SetCondition(s.condition)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetAttackTarget() ~= nil
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local a = Duel.GetAttacker()
  	local d = Duel.GetAttackTarget()
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_DISABLE)
  	e1:SetTargetRange(LOCATION_ONFIELD, LOCATION_ONFIELD)
  	e1:SetTarget(s.distg)
  	e1:SetReset(RESET_PHASE + PHASE_DAMAGE)
  	Duel.RegisterEffect(e1, tp)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_CHAIN_SOLVING)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetOperation(s.disop)
  	e2:SetReset(RESET_PHASE + PHASE_DAMAGE)
  	Duel.RegisterEffect(e2, tp)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e3:SetReset(RESET_PHASE + PHASE_DAMAGE)
  	Duel.RegisterEffect(e3, tp)
  	Duel.AdjustInstantly()
  	if a:IsRelateToBattle() then
  		local e4 = Effect.CreateEffect(c)
  		e4:SetType(EFFECT_TYPE_SINGLE)
  		e4:SetCode(EFFECT_SET_BATTLE_ATTACK)
  		e4:SetReset(RESET_PHASE + PHASE_DAMAGE)
  		e4:SetValue(a:GetBaseAttack())
  		a:RegisterEffect(e4, true)
  		local e5 = Effect.CreateEffect(c)
  		e5:SetType(EFFECT_TYPE_SINGLE)
  		e5:SetCode(EFFECT_SET_BATTLE_DEFENSE)
  		e5:SetReset(RESET_PHASE + PHASE_DAMAGE)
  		e5:SetValue(a:GetBaseDefense())
  		a:RegisterEffect(e5, true)
  	end
  	if d and d:IsRelateToBattle() then
  		local e6 = Effect.CreateEffect(c)
  		e6:SetType(EFFECT_TYPE_SINGLE)
  		e6:SetCode(EFFECT_SET_BATTLE_ATTACK)
  		e6:SetValue(d:GetBaseAttack())
  		e6:SetReset(RESET_PHASE + PHASE_DAMAGE)
  		d:RegisterEffect(e6, true)
  		local e7 = Effect.CreateEffect(c)
  		e7:SetType(EFFECT_TYPE_SINGLE)
  		e7:SetCode(EFFECT_SET_BATTLE_DEFENSE)
  		e7:SetValue(d:GetBaseDefense())
  		e7:SetReset(RESET_PHASE + PHASE_DAMAGE)
  		d:RegisterEffect(e7, true)
  	end
  end
  function s.distg(e, c)
  	return c ~= e:GetHandler()
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local loc = Duel.GetChainInfo(ev, CHAININFO_TRIGGERING_LOCATION)
  	if bit.band(loc, LOCATION_ONFIELD) ~= 0 then
  		Duel.NegateEffect(ev)
  	end
  end
  
  
source_text: 禁じられた聖典
  1:お互いのモンスターが戦闘を行うダメージ計算時に発動できる。
  ダメージステップ終了時まで、このカード以外のフィールドのカードの効果は無効化され、その戦闘のダメージ計算は元々の攻撃力・守備力で行う。
target_text: -- 禁じられた聖典
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
  	e1:SetCondition(s.condition)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetAttackTarget() ~= nil
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local a = Duel.GetAttacker()
  	local d = Duel.GetAttackTarget()
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_DISABLE)
  	e1:SetTargetRange(LOCATION_ONFIELD, LOCATION_ONFIELD)
  	e1:SetTarget(s.distg)
  	e1:SetReset(RESET_PHASE + PHASE_DAMAGE)
  	Duel.RegisterEffect(e1, tp)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_CHAIN_SOLVING)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetOperation(s.disop)
  	e2:SetReset(RESET_PHASE + PHASE_DAMAGE)
  	Duel.RegisterEffect(e2, tp)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e3:SetReset(RESET_PHASE + PHASE_DAMAGE)
  	Duel.RegisterEffect(e3, tp)
  	Duel.AdjustInstantly()
  	if a:IsRelateToBattle() then
  		local e4 = Effect.CreateEffect(c)
  		e4:SetType(EFFECT_TYPE_SINGLE)
  		e4:SetCode(EFFECT_SET_BATTLE_ATTACK)
  		e4:SetReset(RESET_PHASE + PHASE_DAMAGE)
  		e4:SetValue(a:GetBaseAttack())
  		a:RegisterEffect(e4, true)
  		local e5 = Effect.CreateEffect(c)
  		e5:SetType(EFFECT_TYPE_SINGLE)
  		e5:SetCode(EFFECT_SET_BATTLE_DEFENSE)
  		e5:SetReset(RESET_PHASE + PHASE_DAMAGE)
  		e5:SetValue(a:GetBaseDefense())
  		a:RegisterEffect(e5, true)
  	end
  	if d and d:IsRelateToBattle() then
  		local e6 = Effect.CreateEffect(c)
  		e6:SetType(EFFECT_TYPE_SINGLE)
  		e6:SetCode(EFFECT_SET_BATTLE_ATTACK)
  		e6:SetValue(d:GetBaseAttack())
  		e6:SetReset(RESET_PHASE + PHASE_DAMAGE)
  		d:RegisterEffect(e6, true)
  		local e7 = Effect.CreateEffect(c)
  		e7:SetType(EFFECT_TYPE_SINGLE)
  		e7:SetCode(EFFECT_SET_BATTLE_DEFENSE)
  		e7:SetValue(d:GetBaseDefense())
  		e7:SetReset(RESET_PHASE + PHASE_DAMAGE)
  		d:RegisterEffect(e7, true)
  	end
  end
  function s.distg(e, c)
  	return c ~= e:GetHandler()
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	local loc = Duel.GetChainInfo(ev, CHAININFO_TRIGGERING_LOCATION)
  	if bit.band(loc, LOCATION_ONFIELD) ~= 0 then
  		Duel.NegateEffect(ev)
  	end
  end
  
  