Skip to content

RushDuel.CostPayLP ​

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

Signature ​

lua
RushDuel.CostPayLP(int lp) -> function

Description ​

Returns a cost callback that checks Duel.CheckLPCost during chk==0, then pays the specified LP when the cost is performed.

Parameters ​

  • lp int: LP to pay.

Returns ​

  • function: Cost callback for Effect.SetCost.

Example ​

lua
e1:SetCost(RD.CostPayLP(1000))

Source ​

Rush/Utilities/RDCost.lua:196

lua
function RushDuel.CostPayLP(lp)
    return function(e, tp, eg, ep, ev, re, r, rp, chk)
        if chk == 0 then
            return Duel.CheckLPCost(tp, lp)
        end
        Duel.PayLPCost(tp, lp)
        return true
    end
end

Used By ​

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

  • Detected in 97 indexed script(s).
  • Search this function in the Script Explorer with RushDuel.CostPayLP.
CardIDScriptDetected Calls
Chaos Emperor Dragon - Envoy of the End120305001Rush/Scripts/c120305001.lua1
Magical Retribution120254028Rush/Scripts/c120254028.lua1
Instant Fusion120305053Rush/Scripts/c120305053.lua1
Prophecy Phrase the Colors of the Wind120228024Rush/Scripts/c120228024.lua1
Lovely Ange120272026Rush/Scripts/c120272026.lua1
Pirate of the Apport Winds120228025Rush/Scripts/c120228025.lua1
Beast Gear Sage Roller Stag120222033Rush/Scripts/c120222033.lua1
Back Jersey120228063Rush/Scripts/c120228063.lua1
Bandijo the Battle Ballad120228026Rush/Scripts/c120228026.lua1
CAN - Eb:D120283034Rush/Scripts/c120283034.lua1
Vic Viper Beginning120294026Rush/Scripts/c120294026.lua1
Worker Warrior - Sinister Chairman120196038Rush/Scripts/c120196038.lua1
Dragon Knight of Dark120294009Rush/Scripts/c120294009.lua1
Surtr the Brilliant Magical Sword120306100Rush/Scripts/c120306100.lua1
Bowing Brotherhood120188027Rush/Scripts/c120188027.lua1
Prime Bandijo120257006Rush/Scripts/c120257006.lua1
Prime Bandijo120273003Rush/Scripts/c120273003.lua1
Supreme Dog Ropero120239022Rush/Scripts/c120239022.lua1
Awakened Stegoceratops120277018Rush/Scripts/c120277018.lua1
Seraph of Darkness120228030Rush/Scripts/c120228030.lua1
Shinesteel Ultra Dragon Devastar Okeabyss [L]120239019Rush/Scripts/c120239019.lua1
Animal Doctor Lily120272022Rush/Scripts/c120272022.lua1
Agent Mislead120249021Rush/Scripts/c120249021.lua1
Shaman Octopus120130034Rush/Scripts/c120130034.lua1
...and 73 more

Script Examples ​

Chaos Emperor Dragon - Envoy of the End (120305001) ​

Source: Rush/Scripts/c120305001.lua

lua
		and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0
end
cm.cost=RD.CostPayLP(1000)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_ONFIELD,1,nil) end

Magical Retribution (120254028) ​

Source: Rush/Scripts/c120254028.lua

lua
	return eg:IsExists(cm.confilter,1,nil,tp,rp)
end
cm.cost=RD.CostPayLP(800)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end

Instant Fusion (120305053) ​

Source: Rush/Scripts/c120305053.lua

lua
	return RD.IsPlayerNoActivateInThisTurn(tp,list[1])
end
cm.cost=RD.CostPayLP(1000)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)