Skip to content

RushDuel.CanDraw ​

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

Signature ​

lua
RushDuel.CanDraw(any desc, any player, any count, any break_effect) -> any

Description ​

Rush Duel helper declared in RDAction.lua. Its argument names are extracted from the pinned source; parameter and return types have not yet been reviewed.

Upstream source comment ​

text
可选操作: 抽卡

Parameters ​

  • desc any: Type and behavior are not yet reviewed; see the source.
  • player any: Type and behavior are not yet reviewed; see the source.
  • count any: Type and behavior are not yet reviewed; see the source.
  • break_effect any: Type and behavior are not yet reviewed; see the source.

Returns ​

  • any: Return contract has not been reviewed; inspect the source below.

Source ​

Rush/Utilities/RDAction.lua:570

lua
function RushDuel.CanDraw(desc, player, count, break_effect)
    if Duel.IsPlayerCanDraw(player, count) and Duel.SelectYesNo(player, desc) then
        if break_effect then
            Duel.BreakEffect()
        end
        return Duel.Draw(player, count, REASON_EFFECT)
    end
    return 0
end

Used By ​

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

  • Detected in 87 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.CanDraw.
CardIDScriptDetected Calls
Instant Gift120306059Rush/Scripts/c120306059.lua1
Red-Eyes Mars Dragon120306034Rush/Scripts/c120306034.lua1
Sparkhearts Familiar120298027Rush/Scripts/c120298027.lua1
Worker Warrior - Sinister Chairman120196038Rush/Scripts/c120196038.lua1
Surtr the Brilliant Magical Sword120306100Rush/Scripts/c120306100.lua1
Ancient Gear Supplier120271010Rush/Scripts/c120271010.lua1
Sevens Road Wiz120183014Rush/Scripts/c120183014.lua1
Mr. Alchemy120196020Rush/Scripts/c120196020.lua1
Wyrm Excavator the Heavy Cavalry Draco [R]120155023Rush/Scripts/c120155023.lua1
King's Greed120254083Rush/Scripts/c120254083.lua1
Space Call120260018Rush/Scripts/c120260018.lua1
Ancient Gear Medic120271009Rush/Scripts/c120271009.lua1
Master Craftsman Kotetsu120238036Rush/Scripts/c120238036.lua1
Voidalfr Heavenstar120300006Rush/Scripts/c120300006.lua1
Darkness Ri-chair-al120151027Rush/Scripts/c120151027.lua1
Imaginary Reactor120271025Rush/Scripts/c120271025.lua1
Freshberry Rich120264027Rush/Scripts/c120264027.lua1
Progress Potter120217035Rush/Scripts/c120217035.lua1
Spirit of Isyria120300061Rush/Scripts/c120300061.lua1
Yewearth the Planetairy120293051Rush/Scripts/c120293051.lua1
Back Beat120199053Rush/Scripts/c120199053.lua1
Moonforce Rifet120300012Rush/Scripts/c120300012.lua1
Sevens Paladin120196015Rush/Scripts/c120196015.lua1
Imaginary Arc Actor120271037Rush/Scripts/c120271037.lua1
...and 63 more

Script Examples ​

Instant Gift (120306059) ​

Source: Rush/Scripts/c120306059.lua

lua
	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)
	end
	if Duel.GetFlagEffect(tp,m)~=0 then return end

Red-Eyes Mars Dragon (120306034) ​

Source: Rush/Scripts/c120306034.lua

lua
		RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
		if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
			RD.CanDraw(aux.Stringid(m,2),tp,1)
		end
	end

Sparkhearts Familiar (120298027) ​

Source: Rush/Scripts/c120298027.lua

lua
		if Duel.SendtoGrave(g,REASON_EFFECT)~=0
			and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
			RD.CanDraw(aux.Stringid(m,1),tp,2)
		end
	end)