RushDuel.SelectAndSpecialSummon
Alias: RD.SelectAndSpecialSummon. Requires the matching Rush Duel Lua bootstrap.
Signature
RushDuel.SelectAndSpecialSummon(function filter, int tp, int s_range, int o_range, int min, int max, Card|Group|nil expect, Effect e, int pos, [bool break_effect], [int target_player]) -> intDescription
Checks destination Monster Zone capacity, selects a nonempty Group and performs an ordinary Special Summon with summon type 0, nocheck=false and nolimit=false. The filter must supply per-card summon legality; zone capacity alone does not make every monster summonable. Unlike the general SelectAndDoAction wrapper, this helper passes e,tp,pos,break_effect,target_player as extra filter arguments. The return value is the actual Duel.SpecialSummon count, or 0 when no selection/summon occurs. Face-down summon confirmation is handled by the Rush private wrapper.
Parameters
filterfunction: Candidate predicate; receives card,e,tp,pos,break_effect,target_player. Include per-card summon legality.tpint: Selecting and summoning player.s_rangeint: Source locations on tp side.o_rangeint: Source locations on the opponent side.minint: Minimum selected count.maxint: Maximum count, capped by the destination zone count.expectCard|Group|nil: Excluded Card(s), or nil.eEffect: Source effect passed to the filter.posint: Required summon position mask.break_effectbool(optional): Call Duel.BreakEffect immediately before summoning; default false.target_playerint(optional): Destination player; defaults to tp. Does not change which player makes the choice.
Returns
int: Actual summon count, or 0 if capacity/candidates/selection do not permit the operation.
Source
Rush/Utilities/RDAction.lua:123
function RushDuel.SelectAndSpecialSummon(filter, tp, s_range, o_range, min, max, expect, e, pos, break_effect, target_player)
local ct = RushDuel.GetMZoneCount(target_player or tp, max)
if ct >= min then
return RushDuel._private_action_select_match(HINTMSG_SPSUMMON, filter, tp, s_range, o_range, min, ct, expect, false, false, RushDuel._special_summon, e, tp, pos, break_effect, target_player)
end
return 0
endGuided Examples
Learn how to use this function in context:
Used By
Generated from the local Rush/Scripts/ folder and rush_cards.cdb.
- Detected in 270 indexed script(s).
- Search this function in the Script Explorer with
RushDuel.SelectAndSpecialSummon.
Script Examples
Nativity of the Monarchs (120244063)
Source: Rush/Scripts/c120244063.lua
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP_ATTACK)~=0 then
local g=eg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) thenInstant Gift (120306059)
Source: Rush/Scripts/c120306059.lua
local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local filter=RD.Filter(cm.spfilter,e,tp,code)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(filter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0 then
RD.CanDraw(aux.Stringid(m,1),tp,1,true)
endValkyrian Guard (120231066)
Source: Rush/Scripts/c120231066.lua
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_ATTACK)~=0 then
local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectGroupAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,cm.poscheck,tp,LOCATION_MZONE,0,1,3,nil,function(g)