Skip to content

RushDuel.IsMainPhase ​

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

Signature ​

lua
RushDuel.IsMainPhase() -> any

Description ​

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

Upstream source comment ​

text
条件: 玩家的主要阶段

Returns ​

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

Source ​

Rush/Utilities/RDCondition.lua:21

lua
function RushDuel.IsMainPhase()
    local player = Duel.GetTurnPlayer()
    if Duel.GetFlagEffect(player, FLAG_SKIP_MAIN_PHASE) ~= 0 then
        return false
    end
    local ph = Duel.GetCurrentPhase()
    return ph == PHASE_MAIN1 or ph == PHASE_MAIN2
end

Used By ​

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

  • Detected in 4 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.IsMainPhase.
CardIDScriptDetected Calls
Major Breaking News!120304060Rush/Scripts/c120304060.lua1
Amusi Annoyance120249063Rush/Scripts/c120249063.lua1
It's Right Behind You!120217084Rush/Scripts/c120217084.lua1
Traditional Tax120235063Rush/Scripts/c120235063.lua1

Script Examples ​

Major Breaking News! (120304060) ​

Source: Rush/Scripts/c120304060.lua

lua
function cm.event(e,tp,eg,ep,ev,re,r,rp)
	local g=eg:Filter(Card.IsPreviousLocation,nil,LOCATION_DECK)
	if RD.IsMainPhase() then
		Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,g:GetCount())
	end

Amusi Annoyance (120249063) ​

Source: Rush/Scripts/c120249063.lua

lua
function cm.event(e,tp,eg,ep,ev,re,r,rp)
	local g=eg:Filter(Card.IsPreviousLocation,nil,LOCATION_DECK)
	if RD.IsMainPhase() then
		Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,g:GetCount())
	end

It's Right Behind You! (120217084) ​

Source: Rush/Scripts/c120217084.lua

lua
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
	local phase=Duel.GetCurrentPhase()
	return ep~=tp and (phase==PHASE_DRAW or RD.IsMainPhase())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)