name: Twin-Sword
card_text: Once per Battle Phase, if this card attacks a Defense Position monster, it can make a second attack in a row. If this card attacks a Defense Position monster, inflict piercing Battle Damage to your opponent.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_DAMAGE_STEP_END)
  	e1:SetOperation(s.caop)
  	c:RegisterEffect(e1)
  	--pierce
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_PIERCE)
  	c:RegisterEffect(e2)
  end
  function s.caop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local bc = c:GetBattleTarget()
  	if Duel.GetAttacker() == c and bc and bit.band(bc:GetBattlePosition(), POS_DEFENSE) ~= 0 and c:IsRelateToBattle() and c:IsChainAttackable() then
  		Duel.ChainAttack()
  	end
  end
  
  
source_text: Twin-Sword
  Once per Battle Phase, if this card attacks a Defense Position monster, it can make a second attack in a row. If this card attacks a Defense Position monster, inflict piercing Battle Damage to your opponent.
target_text: -- Twin-Sword
  local s, id, o = GetID()
  function s.initial_effect(c)
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_DAMAGE_STEP_END)
  	e1:SetOperation(s.caop)
  	c:RegisterEffect(e1)
  	--pierce
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_PIERCE)
  	c:RegisterEffect(e2)
  end
  function s.caop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local bc = c:GetBattleTarget()
  	if Duel.GetAttacker() == c and bc and bit.band(bc:GetBattlePosition(), POS_DEFENSE) ~= 0 and c:IsRelateToBattle() and c:IsChainAttackable() then
  		Duel.ChainAttack()
  	end
  end
  
  