name: 手札断殺
card_text: 1:お互いのプレイヤーは手札を2枚墓地へ送る。
  その後、それぞれデッキから2枚ドローする。
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DRAW)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local h1 = Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
  		if e:GetHandler():IsLocation(LOCATION_HAND) then
  			h1 = h1 - 1
  		end
  		local h2 = Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND)
  		return h1 > 1 and h2 > 1 and Duel.IsPlayerCanDraw(tp, 2) and Duel.IsPlayerCanDraw(1 - tp, 2)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, PLAYER_ALL, 2)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local h1 = Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
  	local h2 = Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND)
  	if h1 < 2 or h2 < 2 then
  		return
  	end
  	local turnp = Duel.GetTurnPlayer()
  	Duel.Hint(HINT_SELECTMSG, turnp, HINTMSG_TOGRAVE)
  	local g1 = Duel.SelectMatchingCard(turnp, aux.TRUE, turnp, LOCATION_HAND, 0, 2, 2, nil)
  	Duel.ConfirmCards(1 - turnp, g1)
  	Duel.Hint(HINT_SELECTMSG, 1 - turnp, HINTMSG_TOGRAVE)
  	local g2 = Duel.SelectMatchingCard(1 - turnp, aux.TRUE, 1 - turnp, LOCATION_HAND, 0, 2, 2, nil)
  	g1:Merge(g2)
  	Duel.SendtoGrave(g1, REASON_EFFECT)
  	local og = Duel.GetOperatedGroup()
  	if og:IsExists(Card.IsLocation, 1, nil, LOCATION_GRAVE) then
  		Duel.BreakEffect()
  		Duel.Draw(turnp, 2, REASON_EFFECT)
  		Duel.Draw(1 - turnp, 2, REASON_EFFECT)
  	end
  end
  
  
source_text: 手札断殺
  1:お互いのプレイヤーは手札を2枚墓地へ送る。
  その後、それぞれデッキから2枚ドローする。
target_text: -- 手札断殺
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DRAW)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local h1 = Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
  		if e:GetHandler():IsLocation(LOCATION_HAND) then
  			h1 = h1 - 1
  		end
  		local h2 = Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND)
  		return h1 > 1 and h2 > 1 and Duel.IsPlayerCanDraw(tp, 2) and Duel.IsPlayerCanDraw(1 - tp, 2)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, PLAYER_ALL, 2)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local h1 = Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
  	local h2 = Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND)
  	if h1 < 2 or h2 < 2 then
  		return
  	end
  	local turnp = Duel.GetTurnPlayer()
  	Duel.Hint(HINT_SELECTMSG, turnp, HINTMSG_TOGRAVE)
  	local g1 = Duel.SelectMatchingCard(turnp, aux.TRUE, turnp, LOCATION_HAND, 0, 2, 2, nil)
  	Duel.ConfirmCards(1 - turnp, g1)
  	Duel.Hint(HINT_SELECTMSG, 1 - turnp, HINTMSG_TOGRAVE)
  	local g2 = Duel.SelectMatchingCard(1 - turnp, aux.TRUE, 1 - turnp, LOCATION_HAND, 0, 2, 2, nil)
  	g1:Merge(g2)
  	Duel.SendtoGrave(g1, REASON_EFFECT)
  	local og = Duel.GetOperatedGroup()
  	if og:IsExists(Card.IsLocation, 1, nil, LOCATION_GRAVE) then
  		Duel.BreakEffect()
  		Duel.Draw(turnp, 2, REASON_EFFECT)
  		Duel.Draw(1 - turnp, 2, REASON_EFFECT)
  	end
  end
  
  