Skip to content

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]) -> int

Description ​

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 ​

  • desc int: Yes/no prompt description identifier.
  • filter function: Candidate predicate; receives card,e,tp,pos,break_effect,target_player. Include per-card summon legality.
  • tp int: Selecting and summoning player.
  • s_range int: Source locations on tp side.
  • o_range int: Source locations on the opponent side.
  • min int: Minimum selected count.
  • max int: Maximum count, capped by the destination zone count.
  • expect Card|Group|nil: Excluded Card(s), or nil.
  • e Effect: Source effect passed to the filter.
  • pos int: Required summon position mask.
  • break_effect bool (optional): Call Duel.BreakEffect immediately before summoning; default false.
  • target_player int (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
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 154 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.CanSelectAndSpecialSummon.
CardIDScriptDetected Calls
Dark-Guiding Kuriboh120280009Rush/Scripts/c120280009.lua1
Major Breaking News!120304060Rush/Scripts/c120304060.lua1
Dark Renewal120285066Rush/Scripts/c120285066.lua1
Magical Retribution120254028Rush/Scripts/c120254028.lua1
Gold Rush120247059Rush/Scripts/c120247059.lua1
Curse of the Magiclad Dragon120304061Rush/Scripts/c120304061.lua1
Lullalabind120246073Rush/Scripts/c120246073.lua1
Star Protector Recapture120306063Rush/Scripts/c120306063.lua1
Chemicalizer Wing120272057Rush/Scripts/c120272057.lua1
Dark Matter Transcend Dragon120272044Rush/Scripts/c120272044.lua1
Fusionic Revivern120109030Rush/Scripts/c120109030.lua1
Dicemite Gyame Double-Up Chirori120272040Rush/Scripts/c120272040.lua1
The Flame Dragon Haunting the Temple120309047Rush/Scripts/c120309047.lua1
Hysteric Party120279035Rush/Scripts/c120279035.lua1
Multiple Adapter Unit120231030Rush/Scripts/c120231030.lua1
Ever-Grace Princess Hina120290038Rush/Scripts/c120290038.lua1
Takeout Attack120290060Rush/Scripts/c120290060.lua1
OuTerverSe Burst Oblivion120290008Rush/Scripts/c120290008.lua1
Iris the Rare Shadow Flower120228018Rush/Scripts/c120228018.lua1
Whispurring Fairy120277047Rush/Scripts/c120277047.lua1
Flip Dragon120253007Rush/Scripts/c120253007.lua1
The Ultimate Flag120294019Rush/Scripts/c120294019.lua1
Legendary Hunter120271046Rush/Scripts/c120271046.lua1
Abysslayer Apsaras120239028Rush/Scripts/c120239028.lua1
...and 130 more

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)
end

Major 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