Skip to content

RushDuel.EnableChangeCode ​

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

Signature ​

lua
RushDuel.EnableChangeCode(any c, any code, any location, any condition) -> any

Description ​

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

Upstream source comment ​

text
永续改变卡名

Parameters ​

  • c any: Type and behavior are not yet reviewed; see the source.
  • code any: Type and behavior are not yet reviewed; see the source.
  • location any: Type and behavior are not yet reviewed; see the source.
  • condition 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/RDLegend.lua:46

lua
function RushDuel.EnableChangeCode(c, code, location, condition)
    Auxiliary.AddCodeList(c, code)
    local loc = c:GetOriginalType() & TYPE_MONSTER ~= 0 and LOCATION_MZONE or LOCATION_SZONE
    local e1 = Effect.CreateEffect(c)
    e1:SetType(EFFECT_TYPE_SINGLE)
    e1:SetCode(EFFECT_CHANGE_CODE)
    e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
    e1:SetRange(location or loc)
    if condition ~= nil then
        e1:SetCondition(condition)
    end
    e1:SetValue(code)
    c:RegisterEffect(e1)
    return e1
end

Used By ​

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

  • Detected in 102 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.EnableChangeCode.
CardIDScriptDetected Calls
Major Breaking News!120304060Rush/Scripts/c120304060.lua1
YXZ-Cannon Dragon120305004Rush/Scripts/c120305004.lua1
Red-Eyes Mars Dragon120306034Rush/Scripts/c120306034.lua1
Botonaginata the Music Princess120290009Rush/Scripts/c120290009.lua1
Dark Hole Device120249050Rush/Scripts/c120249050.lua1
Super Princess of the Flock - Max Mutton [L]120293007Rush/Scripts/c120293007.lua1
OuTerverSe Direct Driver120109056Rush/Scripts/c120109056.lua1
Extra! Extra! Hot Off the Press120304049Rush/Scripts/c120304049.lua1
OuTerverSe Burst Oblivion120290008Rush/Scripts/c120290008.lua1
Etraynze the Shadow Flower Restricter120254041Rush/Scripts/c120254041.lua1
Abysskite Kaleido-Dress120290061Rush/Scripts/c120290061.lua1
OuTerverSe Wish of Angeleva120293061Rush/Scripts/c120293061.lua2
OuTerverSe Wish of Devilgear120293062Rush/Scripts/c120293062.lua2
Star Sanctuary of Beginning120305027Rush/Scripts/c120305027.lua1
OuTerverSe Byugyuwazzo120290006Rush/Scripts/c120290006.lua1
OuTerverSe Toxic Blob120290028Rush/Scripts/c120290028.lua1
Dragon Knight of Dark120294009Rush/Scripts/c120294009.lua1
OuTerverSe Bug Fungus120290002Rush/Scripts/c120290002.lua1
Skull Archfiend of Confusion120277023Rush/Scripts/c120277023.lua1
Wish of OuTerverSe the World-Shattering Emperor [L]120293058Rush/Scripts/c120293058.lua1
The Swordsman Who Doles Out Victory120290023Rush/Scripts/c120290023.lua1
Super Princess of the Flock - Max Mutton [R]120293009Rush/Scripts/c120293009.lua1
Etraynze the Sprinting Shadow Flower Ninja120285012Rush/Scripts/c120285012.lua1
Abysskite Violate Halo120254055Rush/Scripts/c120254055.lua1
...and 78 more

Script Examples ​

Major Breaking News! (120304060) ​

Source: Rush/Scripts/c120304060.lua

lua
	RD.AddCodeList(c,list)
	--Change Code
	RD.EnableChangeCode(c,list[1],LOCATION_GRAVE)
	--Activate
	local e1=Effect.CreateEffect(c)

YXZ-Cannon Dragon (120305004) ​

Source: Rush/Scripts/c120305004.lua

lua
	RD.EnableUnionFusion(c,aux.Stringid(m,0))
	--Change Code
	RD.EnableChangeCode(c,list[4],LOCATION_EXTRA)
	--Special Summon
	local e1=Effect.CreateEffect(c)

Red-Eyes Mars Dragon (120306034) ​

Source: Rush/Scripts/c120306034.lua

lua
	RD.AddCodeList(c,list)
	--Change Code
	RD.EnableChangeCode(c,list[1],LOCATION_HAND+LOCATION_GRAVE)
	--Change Code
	local e1=Effect.CreateEffect(c)