name: Kazejin
card_text: Once while face-up on the field, during damage calculation in your opponent's turn, if this card is being attacked (Quick Effect): You can target the attacking monster; make that target's ATK 0 during damage calculation only.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--atkdown
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_ATKCHANGE)
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
  	e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
  	e1:SetCountLimit(1)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() ~= tp and Duel.GetAttackTarget() == e:GetHandler()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetAttacker():IsCanBeEffectTarget(e)
  	end
  	Duel.SetTargetCard(Duel.GetAttacker())
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_SET_ATTACK_FINAL)
  		e1:SetReset(RESET_PHASE + PHASE_DAMAGE_CAL)
  		e1:SetValue(0)
  		tc:RegisterEffect(e1)
  	end
  end
  
  
source_text: Kazejin
  Once while face-up on the field, during damage calculation in your opponent's turn, if this card is being attacked (Quick Effect): You can target the attacking monster; make that target's ATK 0 during damage calculation only.
target_text: -- Kazejin
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--atkdown
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_ATKCHANGE)
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
  	e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
  	e1:SetCountLimit(1)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() ~= tp and Duel.GetAttackTarget() == e:GetHandler()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetAttacker():IsCanBeEffectTarget(e)
  	end
  	Duel.SetTargetCard(Duel.GetAttacker())
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_SET_ATTACK_FINAL)
  		e1:SetReset(RESET_PHASE + PHASE_DAMAGE_CAL)
  		e1:SetValue(0)
  		tc:RegisterEffect(e1)
  	end
  end
  
  