Skip to content

RushDuel.CostSendHandToGrave ​

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

Signature ​

lua
RushDuel.CostSendHandToGrave(function filter, int|function min, int|function max, [function|nil set_label_before], [function|nil set_object_before], [function|nil set_label_after], [function|nil set_object_after]) -> function

Description ​

Returns a cost callback that selects min to max matching cards from the controller's hand and sends them to the Graveyard with REASON_COST, excluding the effect handler. The filter must include any required cost-legality check such as Card.IsAbleToGraveAsCost; this wrapper does not add that predicate. The callback honors EFFECT_NO_COST_SEND_HAND_TO_GRAVE through RD.NoCostCheck. min and max can be numbers or callbacks evaluated with the cost arguments. Optional label callbacks receive the selected Group before sending or the operated Group after a successful send.

Parameters ​

  • filter function: Card filter receiving card, effect, player and remaining cost callback arguments.
  • min int|function: Minimum count or callback computing it.
  • max int|function: Maximum count or callback computing it.
  • set_label_before function|nil (optional): Computes the effect label from the selected Group before sending.
  • set_object_before function|nil (optional): Computes the label object from the selected Group before sending.
  • set_label_after function|nil (optional): Computes the effect label from the operated Group after a successful send.
  • set_object_after function|nil (optional): Computes the label object from the operated Group after a successful send.

Returns ​

  • function: Cost callback for Effect.SetCost; tests availability for chk==0, then performs payment.

Example ​

lua
e1:SetCost(RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost, 1, 1))

Source ​

Rush/Utilities/RDCost.lua:299

lua
function RushDuel.CostSendHandToGrave(filter, min, max, set_label_before, set_object_before, set_label_after,
    set_object_after)
    local cost = RushDuel.CostSendMatchToGrave(filter, LOCATION_HAND, min, max, true, false, false, set_label_before,
        set_object_before, set_label_after, set_object_after)
    return RushDuel.NoCostCheck(cost, EFFECT_NO_COST_SEND_HAND_TO_GRAVE)
end

Used By ​

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

  • Detected in 315 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.CostSendHandToGrave.
CardIDScriptDetected Calls
Analyze Phlogiston120226001Rush/Scripts/c120226001.lua1
Vapor Lancer the Super Graphagas120260063Rush/Scripts/c120260063.lua1
Wako Gozen Riletta120309021Rush/Scripts/c120309021.lua1
The Black Witch Facing the Temple120309048Rush/Scripts/c120309048.lua1
Dimension Oper120309025Rush/Scripts/c120309025.lua1
Voidvelg Gehennamagia120109048Rush/Scripts/c120109048.lua1
Botonaginata the Music Princess120290009Rush/Scripts/c120290009.lua1
Supreme Machine Magnum Overlord [L]120150001Rush/Scripts/c120150001.lua1
Mystic Dealer120105006Rush/Scripts/c120105006.lua1
Icelyn the Super Assistant120254064Rush/Scripts/c120254064.lua1
Abysskite Liem120249025Rush/Scripts/c120249025.lua1
Jointech Digup120249047Rush/Scripts/c120249047.lua1
Dark Hole Device120249050Rush/Scripts/c120249050.lua1
Shiny Shady120260079Rush/Scripts/c120260079.lua1
Under Dealer120290015Rush/Scripts/c120290015.lua1
Lostream Shell120309039Rush/Scripts/c120309039.lua1
Super Princess of the Flock - Max Mutton [L]120293007Rush/Scripts/c120293007.lua1
The Player Returning Alive120305036Rush/Scripts/c120305036.lua1
The Trinity Dragiastar120109031Rush/Scripts/c120109031.lua1
Lana the Holy Wind of Healing120298044Rush/Scripts/c120298044.lua1
The Dragiastar120235035Rush/Scripts/c120235035.lua1
Destructor Emperor Bakhakaiser120264045Rush/Scripts/c120264045.lua1
The Flame Dragon Haunting the Temple120309047Rush/Scripts/c120309047.lua1
Grace Princess Emaki120300021Rush/Scripts/c120300021.lua1
...and 291 more

Script Examples ​

Analyze Phlogiston (120226001) ​

Source: Rush/Scripts/c120226001.lua

lua
	return g:GetSum(Card.GetLevel,nil)==lv
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
	local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)

Vapor Lancer the Super Graphagas (120260063) ​

Source: Rush/Scripts/c120260063.lua

lua
	return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil)
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end

Wako Gozen Riletta (120309021) ​

Source: Rush/Scripts/c120309021.lua

lua
	return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_RITUAL)
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end