Trickstar
Target 1 "Trickstar" monster you control and 1 face-up monster on the field; return that "Trickstar" monster to the hand, and if you do, the other monster gains ATK equal to the original ATK of the returned monster, until the end of this turn. You can only activate 1 "Trickstar Bouquet" per turn.
local SETCARD_ID_0 = 0xfb --Trickstar

local SETCARD_ID_0 = 0xfb --Trickstar
local s, id, o = GetID()
function s.initial_effect(c)
	--activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_ATKCHANGE)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_DAMAGE_STEP)
	e1:SetHintTiming(TIMING_DAMAGE_STEP)
	e1:SetCountLimit(1, id)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.filter(c, tp)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, c)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return false
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter, tp, LOCATION_MZONE, 0, 1, nil, tp)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RTOHAND)
	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_MZONE, 0, 1, 1, nil, tp)
	e:SetLabelObject(g:GetFirst())
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
	Duel.SelectTarget(tp, Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, g)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g, 1, 0, 0)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
	if g:GetCount() ~= 2 then
		return
	end
	local hc = g:GetFirst()
	local tc = g:GetNext()
	if hc ~= e:GetLabelObject() then
		tc, hc = hc, tc
	end
	if hc:IsFaceup() and tc:IsFaceup() and Duel.SendtoHand(hc, nil, REASON_EFFECT) ~= 0 then
		local atk = hc:GetBaseAttack()
		local e1 = Effect.CreateEffect(e:GetHandler())
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_UPDATE_ATTACK)
		e1:SetValue(atk)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
		tc:RegisterEffect(e1)
	end
end


Trickstar
Target 1 "Trickstar" monster you control and 1 face-up monster on the field; return that "Trickstar" monster to the hand, and if you do, the other monster gains ATK equal to the original ATK of the returned monster, until the end of this turn. You can only activate 1 "Trickstar Bouquet" per turn.
-- Trickstar
local SETCARD_ID_0 = 0xfb --Trickstar
local s, id, o = GetID()
function s.initial_effect(c)
	--activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_ATKCHANGE)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_DAMAGE_STEP)
	e1:SetHintTiming(TIMING_DAMAGE_STEP)
	e1:SetCountLimit(1, id)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.filter(c, tp)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, c)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return false
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter, tp, LOCATION_MZONE, 0, 1, nil, tp)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RTOHAND)
	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_MZONE, 0, 1, 1, nil, tp)
	e:SetLabelObject(g:GetFirst())
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
	Duel.SelectTarget(tp, Card.IsFaceup, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, g)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g, 1, 0, 0)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
	if g:GetCount() ~= 2 then
		return
	end
	local hc = g:GetFirst()
	local tc = g:GetNext()
	if hc ~= e:GetLabelObject() then
		tc, hc = hc, tc
	end
	if hc:IsFaceup() and tc:IsFaceup() and Duel.SendtoHand(hc, nil, REASON_EFFECT) ~= 0 then
		local atk = hc:GetBaseAttack()
		local e1 = Effect.CreateEffect(e:GetHandler())
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_UPDATE_ATTACK)
		e1:SetValue(atk)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
		tc:RegisterEffect(e1)
	end
end

