Skip to content

Duel.PayLPCost ​

Signature ​

lua
Duel.PayLPCost(int player, int cost, [bool must_pay]) -> void

Description ​

Makes player pay the specified LP cost. Call this only in the real Cost branch after the chk==0 branch has used Duel.CheckLPCost or an equivalent legality check.

Parameters ​

  • player int - Player who pays the LP cost.
  • cost int - LP amount to pay.
  • must_pay bool optional - Passed through to the core LP-cost payment processor.

Source ​

  • D:\Programs\GitHub\ygopro-core\libduel.cpp:4909

Guided Examples ​

Learn how to use this function in context:

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 410 indexed script(s).
  • Search this function in the Script Explorer with Duel.PayLPCost.
CardIDScriptDetected Calls
Ultra Polymerization76647978Scripts/c76647978.lua1
Deftero Enneacraft - "alazoneIA"92171126Scripts/c92171126.lua1
Odd-Eyes Revolution Dragon16306932Scripts/c16306932.lua2
Enlightenment Dragon46186135Scripts/c46186135.lua1
Yummy★Snatchy30581601Scripts/c30581601.lua1
El Shaddoll Meshachrer32467459Scripts/c32467459.lua1
Super Duper Polymerization44886582Scripts/c44886582.lua1
Soul of the Supreme King92428405Scripts/c92428405.lua1
Mixeroid71340250Scripts/c71340250.lua1
Chaos Emperor, the Dragon of Armageddon4538826Scripts/c4538826.lua2
Gem-Knight Phantom Quartz24484270Scripts/c24484270.lua1
Dinomorphia Frenzy78420796Scripts/c78420796.lua1
Beyond the Pendulum22125101Scripts/c22125101.lua1
Ursarctic Quint Charge15758127Scripts/c15758127.lua1
R.B. Lambda Blade17188206Scripts/c17188206.lua1
R.B. Lambda Cannon81794107Scripts/c81794107.lua1
Kaiki the Unity Star60822251Scripts/c60822251.lua1
Todoroki the Earthbolt Star30118701Scripts/c30118701.lua1
Dinomorphia Domain26631975Scripts/c26631975.lua1
Abyss Actor - Mellow Madonna78310590Scripts/c78310590.lua1
Gunkan Sushipyard Seaside Supper Spot62200831Scripts/c62200831.lua1
Psychic Arsenal16238373Scripts/c16238373.lua1
Materiactor Meltthrough66059345Scripts/c66059345.lua1
Masterking Archfiend35606858Scripts/c35606858.lua1
...and 386 more

Script Examples ​

Ultra Polymerization (76647978) ​

Source: Scripts/c76647978.lua

lua
function c76647978.cost(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.CheckLPCost(tp,2000) end
	Duel.PayLPCost(tp,2000)
end
function c76647978.fcheck(tp,sg,fc)

Deftero Enneacraft - "alazoneIA" (92171126) ​

Source: Scripts/c92171126.lua

lua
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.CheckLPCost(tp,900) end
	Duel.PayLPCost(tp,900)
end
function s.thfilter(c)

Odd-Eyes Revolution Dragon (16306932) ​

Source: Scripts/c16306932.lua

lua
	if chk==0 then return e:GetHandler():IsDiscardable() and Duel.CheckLPCost(tp,500) end
	Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
	Duel.PayLPCost(tp,500)
end
function c16306932.thfilter(c)