Skip to content

RushDuel.CreateRaceCannotAttackEffect ​

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

Signature ​

lua
RushDuel.CreateRaceCannotAttackEffect(any e, any desc, any race, any player, any s_range, any o_range, any reset) -> any

Description ​

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

Upstream source comment ​

text
创建限制: 不能用某些种族攻击

Parameters ​

  • e any: Type and behavior are not yet reviewed; see the source.
  • desc any: Type and behavior are not yet reviewed; see the source.
  • race any: Type and behavior are not yet reviewed; see the source.
  • player any: Type and behavior are not yet reviewed; see the source.
  • s_range any: Type and behavior are not yet reviewed; see the source.
  • o_range any: Type and behavior are not yet reviewed; see the source.
  • reset 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/RDLimit.lua:45

lua
function RushDuel.CreateRaceCannotAttackEffect(e, desc, race, player, s_range, o_range, reset)
    local s_target, o_traget = 0, 0
    if s_range == 1 then
        s_target = LOCATION_MZONE
    end
    if o_range == 1 then
        o_traget = LOCATION_MZONE
    end
    local e1 = Effect.CreateEffect(e:GetHandler())
    e1:SetType(EFFECT_TYPE_FIELD)
    e1:SetCode(EFFECT_CANNOT_ATTACK)
    e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
    e1:SetTargetRange(s_target, o_traget)
    e1:SetTarget(function(e, c)
        return c:IsRace(race)
    end)
    e1:SetReset(reset)
    Duel.RegisterEffect(e1, player)
    local e2 = Effect.CreateEffect(e:GetHandler())
    e2:SetDescription(desc)
    e2:SetType(EFFECT_TYPE_FIELD)
    e2:SetCode(EFFECT_PLAYER_RACE_CANNOT_ATTACK)
    e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT)
    e2:SetTargetRange(s_range, o_range)
    e2:SetValue(race)
    e2:SetReset(reset)
    Duel.RegisterEffect(e2, player)
    return e1, e2
end

Used By ​

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

  • Detected in 100 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.CreateRaceCannotAttackEffect.
CardIDScriptDetected Calls
Instant Gift120306059Rush/Scripts/c120306059.lua1
Freshberry Collaboration120301071Rush/Scripts/c120301071.lua1
Miracle Pick120253052Rush/Scripts/c120253052.lua1
Wako Gozen Riletta120309021Rush/Scripts/c120309021.lua1
Moonforce Timo120300015Rush/Scripts/c120300015.lua1
Moonforce Sheila120300013Rush/Scripts/c120300013.lua1
Dimension Oper120309025Rush/Scripts/c120309025.lua1
Necromaid Timer120294014Rush/Scripts/c120294014.lua1
Botonaginata the Music Princess120290009Rush/Scripts/c120290009.lua1
Voidvelg Beyond Probe120300031Rush/Scripts/c120300031.lua1
Speed Carrier120301059Rush/Scripts/c120301059.lua1
Fiarma the Ally Spark120298025Rush/Scripts/c120298025.lua1
Goe Goe the Rumored Ninja120306029Rush/Scripts/c120306029.lua1
Peit the Ally Spark120298024Rush/Scripts/c120298024.lua1
Sparkhearts Familiar120298027Rush/Scripts/c120298027.lua1
Cornetlass the Music Princess120287066Rush/Scripts/c120287066.lua1
Lostream Reading120309043Rush/Scripts/c120309043.lua1
Dimension Pramma120309026Rush/Scripts/c120309026.lua1
Royal Rebel's Extreme120306006Rush/Scripts/c120306006.lua1
Voidalfr Star Stripe120300033Rush/Scripts/c120300033.lua1
Lostream Record120309044Rush/Scripts/c120309044.lua1
Legendary Saber120238010Rush/Scripts/c120238010.lua1
Accel Wonder Dark120285005Rush/Scripts/c120285005.lua1
Evil Star Beacon120155041Rush/Scripts/c120155041.lua1
...and 76 more

Script Examples ​

Instant Gift (120306059) ​

Source: Rush/Scripts/c120306059.lua

lua
	end
	if Duel.GetFlagEffect(tp,m)~=0 then return end
	RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,2),RACE_ALL-RACE_WARRIOR,tp,1,0,RESET_PHASE+PHASE_END)
	Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end

Freshberry Collaboration (120301071) ​

Source: Rush/Scripts/c120301071.lua

lua
	end)
	if Duel.GetFlagEffect(tp,m)~=0 then return end
	RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,2),RACE_ALL-RACE_AQUA,tp,1,0,RESET_PHASE+PHASE_END)
	Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end

Miracle Pick (120253052) ​

Source: Rush/Scripts/c120253052.lua

lua
	end
	if Duel.GetFlagEffect(tp,m)~=0 then return end
	RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,1),RACE_ALL-RACE_OMEGAPSYCHO-RACE_PSYCHO,tp,1,0,RESET_PHASE+PHASE_END)
	Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end