name: Yu-Jo
card_text: Offer your opponent a handshake. If they accept your handshake, each player's Life Points become half the combined Life Points of both players. If you have "Unity" in your hand and show it to your opponent, they must accept the handshake.
external_ids: local CARD_ID_0 = 14731897 --Unity
  
lua: local CARD_ID_0 = 14731897 --Unity
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local opt = 0
  	if Duel.IsExistingMatchingCard(Card.IsCode, tp, LOCATION_HAND, 0, 1, nil, CARD_ID_0) and Duel.SelectYesNo(tp, aux.Stringid(id, 2)) then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONFIRM)
  		local g = Duel.SelectMatchingCard(tp, Card.IsCode, tp, LOCATION_HAND, 0, 1, 1, nil, CARD_ID_0)
  		Duel.ConfirmCards(1 - tp, g)
  		Duel.ShuffleHand(tp)
  		opt = 1
  	end
  	if opt == 0 then
  		opt = Duel.SelectOption(1 - tp, aux.Stringid(id, 0), aux.Stringid(id, 1))
  	else
  		opt = Duel.SelectOption(1 - tp, aux.Stringid(id, 0))
  	end
  	if opt == 0 then
  		local lp = math.ceil((Duel.GetLP(tp) + Duel.GetLP(1 - tp)) / 2)
  		Duel.SetLP(tp, lp)
  		Duel.SetLP(1 - tp, lp)
  	end
  end
  
  
source_text: Yu-Jo
  Offer your opponent a handshake. If they accept your handshake, each player's Life Points become half the combined Life Points of both players. If you have "Unity" in your hand and show it to your opponent, they must accept the handshake.
target_text: -- Yu-Jo
  local CARD_ID_0 = 14731897 --Unity
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local opt = 0
  	if Duel.IsExistingMatchingCard(Card.IsCode, tp, LOCATION_HAND, 0, 1, nil, CARD_ID_0) and Duel.SelectYesNo(tp, aux.Stringid(id, 2)) then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONFIRM)
  		local g = Duel.SelectMatchingCard(tp, Card.IsCode, tp, LOCATION_HAND, 0, 1, 1, nil, CARD_ID_0)
  		Duel.ConfirmCards(1 - tp, g)
  		Duel.ShuffleHand(tp)
  		opt = 1
  	end
  	if opt == 0 then
  		opt = Duel.SelectOption(1 - tp, aux.Stringid(id, 0), aux.Stringid(id, 1))
  	else
  		opt = Duel.SelectOption(1 - tp, aux.Stringid(id, 0))
  	end
  	if opt == 0 then
  		local lp = math.ceil((Duel.GetLP(tp) + Duel.GetLP(1 - tp)) / 2)
  		Duel.SetLP(tp, lp)
  		Duel.SetLP(1 - tp, lp)
  	end
  end
  
  