Duel.PayLPCost
Signature
lua
Duel.PayLPCost(int player, int cost, [bool must_pay]) -> voidDescription
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
playerint- Player who pays the LP cost.costint- LP amount to pay.must_paybooloptional - 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.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Ultra Polymerization | 76647978 | Scripts/c76647978.lua | 1 |
| Deftero Enneacraft - "alazoneIA" | 92171126 | Scripts/c92171126.lua | 1 |
| Odd-Eyes Revolution Dragon | 16306932 | Scripts/c16306932.lua | 2 |
| Enlightenment Dragon | 46186135 | Scripts/c46186135.lua | 1 |
| Yummy★Snatchy | 30581601 | Scripts/c30581601.lua | 1 |
| El Shaddoll Meshachrer | 32467459 | Scripts/c32467459.lua | 1 |
| Super Duper Polymerization | 44886582 | Scripts/c44886582.lua | 1 |
| Soul of the Supreme King | 92428405 | Scripts/c92428405.lua | 1 |
| Mixeroid | 71340250 | Scripts/c71340250.lua | 1 |
| Chaos Emperor, the Dragon of Armageddon | 4538826 | Scripts/c4538826.lua | 2 |
| Gem-Knight Phantom Quartz | 24484270 | Scripts/c24484270.lua | 1 |
| Dinomorphia Frenzy | 78420796 | Scripts/c78420796.lua | 1 |
| Beyond the Pendulum | 22125101 | Scripts/c22125101.lua | 1 |
| Ursarctic Quint Charge | 15758127 | Scripts/c15758127.lua | 1 |
| R.B. Lambda Blade | 17188206 | Scripts/c17188206.lua | 1 |
| R.B. Lambda Cannon | 81794107 | Scripts/c81794107.lua | 1 |
| Kaiki the Unity Star | 60822251 | Scripts/c60822251.lua | 1 |
| Todoroki the Earthbolt Star | 30118701 | Scripts/c30118701.lua | 1 |
| Dinomorphia Domain | 26631975 | Scripts/c26631975.lua | 1 |
| Abyss Actor - Mellow Madonna | 78310590 | Scripts/c78310590.lua | 1 |
| Gunkan Sushipyard Seaside Supper Spot | 62200831 | Scripts/c62200831.lua | 1 |
| Psychic Arsenal | 16238373 | Scripts/c16238373.lua | 1 |
| Materiactor Meltthrough | 66059345 | Scripts/c66059345.lua | 1 |
| Masterking Archfiend | 35606858 | Scripts/c35606858.lua | 1 |
| ...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)