Skip to content

RushDuel.SendToHandAndExists ​

Alias: RD.SendToHandAndExists. Requires the matching Rush Duel Lua bootstrap.

Signature ​

lua
RushDuel.SendToHandAndExists(Card|Group|Effect target, Effect effect, int player, int reason, [function|nil filter], [int count], [Card|Group|nil expect]) -> bool

Description ​

Moves the supplied Card/Group/Effect handler toward its owner hand after applying the Rush EFFECT_CANNOT_TO_HAND_EFFECT protection filter and expanding Maximum components. After movement, confirms relevant cards from Deck/GY/banishment to the opponent. The reason argument is forwarded to the Rush protection checks, but this pinned implementation calls Duel.SendtoHand with REASON_EFFECT unconditionally. It is not a generic cost-payment helper. player controls protection/confirmation context, not a forced hand destination: the native destination argument is nil. Returns false if the eligible Group is empty or the core movement count is zero. Otherwise returns true when filter is nil, or checks at least count matching cards in Duel.GetOperatedGroup while excluding expect. This is a boolean, not a count, and the default does not prove every selected card reached the hand.

Parameters ​

  • target Card|Group|Effect: Cards to move; Effect input means its handler.
  • effect Effect: Source effect used by Rush protection checks; required.
  • player int: Player used for protection and confirmation context.
  • reason int: Reason passed to protection checks; actual movement is always REASON_EFFECT in this snapshot.
  • filter function|nil (optional): Optional predicate checked against the operated Group.
  • count int (optional): Required match count when filter is supplied.
  • expect Card|Group|nil (optional): Exclusion for the operated-Group check.

Returns ​

  • bool: Whether movement was nonzero and the optional operated-Group check passed.

Source ​

Rush/Utilities/RDAction.lua:277

lua
function RushDuel.SendToHandAndExists(target, effect, player, reason, filter, count, expect)
    local hints = Group.CreateGroup()
    local group = RushDuel.ToGroup(target):Filter(RushDuel.FilterToHandTarget, nil, effect, player, reason, hints)
    local g = RushDuel.ToMaximunGroup(group)
    local tc = hints:GetFirst()
    if tc then
        Duel.Hint(HINT_CARD, 0, tc:GetOriginalCode())
    end
    if #g == 0 then
        return false
    end
    if Duel.SendtoHand(g, nil, REASON_EFFECT) == 0 then
        return false
    end
    local cg = g:Filter(RushDuel.FilterToHandConfirm, nil, player)
    if #cg > 0 then
        Duel.ConfirmCards(1 - player, cg)
    end
    return RushDuel.IsOperatedGroupExists(filter, count, expect)
end

Guided Examples ​

Learn how to use this function in context:

Used By ​

Generated from the local Rush/Scripts/ folder and rush_cards.cdb.

  • Detected in 496 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.SendToHandAndExists.
CardIDScriptDetected Calls
Lufer the Symbol of the Devils120309059Rush/Scripts/c120309059.lua1
Skysavior Watch120235053Rush/Scripts/c120235053.lua1
Voidalfr Star Mayfly120300034Rush/Scripts/c120300034.lua1
Brassdes of the Wicked Wheels120304033Rush/Scripts/c120304033.lua1
Miracle Pick120253052Rush/Scripts/c120253052.lua1
Pot of Duality120271002Rush/Scripts/c120271002.lua1
Vapor Lancer the Super Graphagas120260063Rush/Scripts/c120260063.lua1
Ember the Ultra Assistant120283035Rush/Scripts/c120283035.lua1
Sparkhearts Makma120298023Rush/Scripts/c120298023.lua1
Fairy of the Stars120305016Rush/Scripts/c120305016.lua1
Rising Protect120304055Rush/Scripts/c120304055.lua1
Tubardiche the Music Princess120247025Rush/Scripts/c120247025.lua1
Moonforce Sheila120300013Rush/Scripts/c120300013.lua1
Spiritualization Training120301020Rush/Scripts/c120301020.lua1
Dimension Oper120309025Rush/Scripts/c120309025.lua1
Lovely Wolf120260046Rush/Scripts/c120260046.lua1
False Sun120264033Rush/Scripts/c120264033.lua1
Void Veil120227029Rush/Scripts/c120227029.lua1
Voidvelg Gehennamagia120109048Rush/Scripts/c120109048.lua1
Preferlyre120283046Rush/Scripts/c120283046.lua1
Handy Girl120290012Rush/Scripts/c120290012.lua1
Botonaginata the Music Princess120290009Rush/Scripts/c120290009.lua1
Soleil, the Fairy of Skysavior120235020Rush/Scripts/c120235020.lua1
Crystal Seer120109067Rush/Scripts/c120109067.lua1
...and 472 more

Script Examples ​

Lufer the Symbol of the Devils (120309059) ​

Source: Rush/Scripts/c120309059.lua

lua
		if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
			RD.CanSelectAndDoAction(aux.Stringid(m,5),HINTMSG_RTOHAND,cm.thfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
				RD.SendToHandAndExists(sg,e,tp,REASON_EFFECT)
			end)
		end

Skysavior Watch (120235053) ​

Source: Rush/Scripts/c120235053.lua

lua
		Duel.DisableShuffleCheck()
		if tc:IsAbleToHand() then
			RD.SendToHandAndExists(sg,e,p,REASON_EFFECT)
			Duel.ShuffleHand(p)
		else

Voidalfr Star Mayfly (120300034) ​

Source: Rush/Scripts/c120300034.lua

lua
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
	RD.SelectAndDoAction(HINTMSG_RTOHAND,cm.filter,tp,0,LOCATION_MZONE,1,3,nil,function(g)
		RD.SendToHandAndExists(g,e,tp,REASON_EFFECT)
	end)
	if Duel.GetFlagEffect(tp,m)~=0 then return end