CXyz
3 or more Level 7 monsters
You can also Xyz Summon this card by using 1 monster you control with "Number C101" through "Number C107" in its name as the Xyz Material. (Xyz Materials attached to that monster also become Xyz Materials on this card.) This card gains 1000 ATK for each Xyz Material attached to it. You can target 1 "Number" monster in your Graveyard; until your opponent's next End Phase, this card's name becomes that monster's, and replace this effect with that monster's original effects. You can only use this effect of "CXyz Barian Hope" once per turn.
local SETCARD_ID_0 = 0x1048 --Number
local SETCARD_ID_1 = 0x48 --Number

local SETCARD_ID_0 = 0x1048 --Number
local SETCARD_ID_1 = 0x48 --Number
local s, id, o = GetID()
function s.initial_effect(c)
	--xyz summon
	aux.AddXyzProcedure(c, nil, 7, 3, s.ovfilter, aux.Stringid(id, 0), 99)
	c:EnableReviveLimit()
	--atk
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetCode(EFFECT_UPDATE_ATTACK)
	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetValue(s.atkval)
	c:RegisterEffect(e1)
	--copy
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 1))
	e2:SetType(EFFECT_TYPE_IGNITION)
	e2:SetRange(LOCATION_MZONE)
	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e2:SetCountLimit(1, id)
	e2:SetTarget(s.copytg)
	e2:SetOperation(s.copyop)
	c:RegisterEffect(e2)
end
function s.ovfilter(c)
	local no = aux.GetXyzNumber(c)
	return c:IsFaceup() and no and no >= 101 and no <= 107 and c:IsSetCard(SETCARD_ID_1)
end
function s.atkval(e, c)
	return c:GetOverlayCount() * 1000
end
function s.filter(c)
	return c:IsSetCard(SETCARD_ID_1) and c:IsType(TYPE_EFFECT)
end
function s.copytg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc)
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter, tp, LOCATION_GRAVE, 0, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
	Duel.SelectTarget(tp, s.filter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
end
function s.copyop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local tc = Duel.GetFirstTarget()
	if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
		local code = tc:GetOriginalCode()
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_CHANGE_CODE)
		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e1:SetValue(code)
		e1:SetLabel(tp)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
		c:RegisterEffect(e1)
		local cid = c:CopyEffect(code, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
		local e2 = Effect.CreateEffect(c)
		e2:SetDescription(aux.Stringid(id, 2))
		e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
		e2:SetCode(EVENT_PHASE + PHASE_END)
		e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e2:SetCountLimit(1)
		e2:SetRange(LOCATION_MZONE)
		e2:SetCondition(s.rstcon)
		e2:SetOperation(s.rstop)
		e2:SetLabel(cid)
		e2:SetLabelObject(e1)
		e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
		c:RegisterEffect(e2)
	end
end
function s.rstcon(e, tp, eg, ep, ev, re, r, rp)
	local e1 = e:GetLabelObject()
	return Duel.GetTurnPlayer() ~= e1:GetLabel()
end
function s.rstop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local cid = e:GetLabel()
	c:ResetEffect(cid, RESET_COPY)
	c:ResetEffect(RESET_DISABLE, RESET_EVENT)
	local e1 = e:GetLabelObject()
	e1:Reset()
	Duel.HintSelection(Group.FromCards(c))
	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
end


CXyz
3 or more Level 7 monsters
You can also Xyz Summon this card by using 1 monster you control with "Number C101" through "Number C107" in its name as the Xyz Material. (Xyz Materials attached to that monster also become Xyz Materials on this card.) This card gains 1000 ATK for each Xyz Material attached to it. You can target 1 "Number" monster in your Graveyard; until your opponent's next End Phase, this card's name becomes that monster's, and replace this effect with that monster's original effects. You can only use this effect of "CXyz Barian Hope" once per turn.
-- CXyz
local SETCARD_ID_0 = 0x1048 --Number
local SETCARD_ID_1 = 0x48 --Number
local s, id, o = GetID()
function s.initial_effect(c)
	--xyz summon
	aux.AddXyzProcedure(c, nil, 7, 3, s.ovfilter, aux.Stringid(id, 0), 99)
	c:EnableReviveLimit()
	--atk
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetCode(EFFECT_UPDATE_ATTACK)
	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetValue(s.atkval)
	c:RegisterEffect(e1)
	--copy
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 1))
	e2:SetType(EFFECT_TYPE_IGNITION)
	e2:SetRange(LOCATION_MZONE)
	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e2:SetCountLimit(1, id)
	e2:SetTarget(s.copytg)
	e2:SetOperation(s.copyop)
	c:RegisterEffect(e2)
end
function s.ovfilter(c)
	local no = aux.GetXyzNumber(c)
	return c:IsFaceup() and no and no >= 101 and no <= 107 and c:IsSetCard(SETCARD_ID_1)
end
function s.atkval(e, c)
	return c:GetOverlayCount() * 1000
end
function s.filter(c)
	return c:IsSetCard(SETCARD_ID_1) and c:IsType(TYPE_EFFECT)
end
function s.copytg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc)
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter, tp, LOCATION_GRAVE, 0, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
	Duel.SelectTarget(tp, s.filter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
end
function s.copyop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local tc = Duel.GetFirstTarget()
	if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
		local code = tc:GetOriginalCode()
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_CHANGE_CODE)
		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e1:SetValue(code)
		e1:SetLabel(tp)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
		c:RegisterEffect(e1)
		local cid = c:CopyEffect(code, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
		local e2 = Effect.CreateEffect(c)
		e2:SetDescription(aux.Stringid(id, 2))
		e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
		e2:SetCode(EVENT_PHASE + PHASE_END)
		e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e2:SetCountLimit(1)
		e2:SetRange(LOCATION_MZONE)
		e2:SetCondition(s.rstcon)
		e2:SetOperation(s.rstop)
		e2:SetLabel(cid)
		e2:SetLabelObject(e1)
		e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
		c:RegisterEffect(e2)
	end
end
function s.rstcon(e, tp, eg, ep, ev, re, r, rp)
	local e1 = e:GetLabelObject()
	return Duel.GetTurnPlayer() ~= e1:GetLabel()
end
function s.rstop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local cid = e:GetLabel()
	c:ResetEffect(cid, RESET_COPY)
	c:ResetEffect(RESET_DISABLE, RESET_EVENT)
	local e1 = e:GetLabelObject()
	e1:Reset()
	Duel.HintSelection(Group.FromCards(c))
	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
end

