name: Wind-Up
card_text: When a face-up "Wind-Up" monster you control is targeted for an attack: You can negate the attack. This effect can only be used once while this card is face-up on the field.
external_ids: local SETCARD_ID_0 = 0x58 --Wind-Up
  
lua: local SETCARD_ID_0 = 0x58 --Wind-Up
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--negate attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_BE_BATTLE_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCondition(s.condition)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local d = Duel.GetAttackTarget()
  	return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(SETCARD_ID_0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.NegateAttack()
  end
  
  
source_text: Wind-Up
  When a face-up "Wind-Up" monster you control is targeted for an attack: You can negate the attack. This effect can only be used once while this card is face-up on the field.
target_text: -- Wind-Up
  local SETCARD_ID_0 = 0x58 --Wind-Up
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--negate attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_BE_BATTLE_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCondition(s.condition)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local d = Duel.GetAttackTarget()
  	return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(SETCARD_ID_0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.NegateAttack()
  end
  
  