Skip to content

RushDuel.CostChangeSelfPosition ​

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

Signature ​

lua
RushDuel.CostChangeSelfPosition(any pos1, any pos2) -> any

Description ​

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

Upstream source comment ​

text
代价: 改变自身的表示形式

Parameters ​

  • pos1 any: Type and behavior are not yet reviewed; see the source.
  • pos2 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/RDCost.lua:515

lua
function RushDuel.CostChangeSelfPosition(pos1, pos2)
    return function(e, tp, eg, ep, ev, re, r, rp, chk)
        local c = e:GetHandler()
        if chk == 0 then
            return (not pos1 or c:IsPosition(pos1)) and RushDuel.IsCanChangePosition(c, e, tp, REASON_COST)
        end
        if pos2 then
            RushDuel.ChangePosition(c, e, tp, REASON_COST, pos2)
        else
            RushDuel.ChangePosition(c, e, tp, REASON_COST)
        end
        return true
    end
end

Used By ​

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

  • Detected in 31 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.CostChangeSelfPosition.
CardIDScriptDetected Calls
Dark Matter Freya120261027Rush/Scripts/c120261027.lua1
Delirium Shewel120274058Rush/Scripts/c120274058.lua1
The Nomnom Liliputian120309054Rush/Scripts/c120309054.lua1
Summoner Monk120307009Rush/Scripts/c120307009.lua1
Delirium Drone120274059Rush/Scripts/c120274059.lua1
Draco the Hand-Picked120294005Rush/Scripts/c120294005.lua1
Flower Fan Clematis120254072Rush/Scripts/c120254072.lua1
Delirium Polynea120277033Rush/Scripts/c120277033.lua1
Delirium Mariquita120274057Rush/Scripts/c120274057.lua1
Weaksauce Brassdes120304066Rush/Scripts/c120304066.lua1
Draco the Palm Greaser120301067Rush/Scripts/c120301067.lua1
Twin Edge Phantom Dragon120261030Rush/Scripts/c120261030.lua1
Metarion Armarostar120272046Rush/Scripts/c120272046.lua1
Voidvelg Hecatoncheir120227007Rush/Scripts/c120227007.lua1
Yamiruler the Dark Delayer120120029Rush/Scripts/c120120029.lua1
Gamabot120285009Rush/Scripts/c120285009.lua1
Grace Cat120287022Rush/Scripts/c120287022.lua1
Baron Wight120271057Rush/Scripts/c120271057.lua1
Princess Ladybug White120208023Rush/Scripts/c120208023.lua1
Plus Skull120261040Rush/Scripts/c120261040.lua1
Yurushima Sage120140003Rush/Scripts/c120140003.lua1
Delirium Teega120300025Rush/Scripts/c120300025.lua1
Long Shield Gardna120145037Rush/Scripts/c120145037.lua1
Royal Rebel's Grunge120254074Rush/Scripts/c120254074.lua1
...and 7 more

Script Examples ​

Dark Matter Freya (120261027) ​

Source: Rush/Scripts/c120261027.lua

lua
	return Duel.IsAbleToEnterBP()
end
cm.cost=RD.CostChangeSelfPosition()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end

Delirium Shewel (120274058) ​

Source: Rush/Scripts/c120274058.lua

lua
	return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
cm.cost=RD.CostChangeSelfPosition(POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsExistingMatchingCard(RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end

The Nomnom Liliputian (120309054) ​

Source: Rush/Scripts/c120309054.lua

lua
	return c:IsCode(list[2]) and c:IsAbleToDeck()
end
cm.cost=RD.CostChangeSelfPosition(POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end