RushDuel.CanSelectAndSpecialSummon
Alias: RD.CanSelectAndSpecialSummon. Requires the matching Rush Duel Lua bootstrap.
Signature
lua
RushDuel.CanSelectAndSpecialSummon(int desc, 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
Optional action version of SelectAndSpecialSummon. If capacity and candidates exist, asks yes/no before selecting and summoning. Declining returns 0; canceling card selection returns to the yes/no question. This performs work and belongs in resolution, not chk==0. It uses the same filter arguments, destination rules and actual numeric summon count as SelectAndSpecialSummon.
Parameters
descint: Yes/no prompt description identifier.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 when declined/unavailable.
Source
Rush/Utilities/RDAction.lua:131
lua
function RushDuel.CanSelectAndSpecialSummon(desc, 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_can_select_match(desc, 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 154 indexed script(s).
- Search this function in the Script Explorer with
RushDuel.CanSelectAndSpecialSummon.
Script Examples
Dark-Guiding Kuriboh (120280009)
Source: Rush/Scripts/c120280009.lua
lua
tc:RegisterFlagEffect(FLAG_CANNOT_ATTACK_NEXT_TURN,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1)
end
RD.CanSelectAndSpecialSummon(aux.Stringid(m,3),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEDOWN_DEFENSE)
end)
endMajor Breaking News! (120304060)
Source: Rush/Scripts/c120304060.lua
lua
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,2,2,nil,function(g)
if RD.SendToDeckTop(g,e,tp,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),cm.spfilter,tp,LOCATION_HAND,0,1,2,nil,e,POS_FACEUP_DEFENSE,true)
end
end)Dark Renewal (120285066)
Source: Rush/Scripts/c120285066.lua
lua
Duel.HintSelection(sg)
if Duel.Destroy(sg,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end
end