RushDuel.CostSendHandToGrave
Alias: RD.CostSendHandToGrave. Requires the matching Rush Duel Lua bootstrap.
Signature
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]) -> functionDescription
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
filterfunction: Card filter receiving card, effect, player and remaining cost callback arguments.minint|function: Minimum count or callback computing it.maxint|function: Maximum count or callback computing it.set_label_beforefunction|nil(optional): Computes the effect label from the selected Group before sending.set_object_beforefunction|nil(optional): Computes the label object from the selected Group before sending.set_label_afterfunction|nil(optional): Computes the effect label from the operated Group after a successful send.set_object_afterfunction|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
e1:SetCost(RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost, 1, 1))Source
Rush/Utilities/RDCost.lua:299
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)
endUsed 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.
Script Examples
Analyze Phlogiston (120226001)
Source: Rush/Scripts/c120226001.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
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) endWako Gozen Riletta (120309021)
Source: Rush/Scripts/c120309021.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