Avoid polluting centers and improve debugging experience
This commit is contained in:
parent
91660bfeea
commit
c90132af64
4 changed files with 14 additions and 4 deletions
|
|
@ -129,5 +129,5 @@ match_indent = true
|
|||
target = "card.lua"
|
||||
pattern = "math\\.floor\\(\\(G\\.GAME\\.dollars \\+ \\(G\\.GAME\\.dollar_buffer or 0\\)\\)/self\\.ability\\.extra\\.dollars\\)"
|
||||
position = "at"
|
||||
payload = "G.P_CENTERS.j_bootstraps:mult(self)"
|
||||
payload = "SMODS.Mods.Roland.bootstraps_mult(self)"
|
||||
match_indent = true
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"id": "Roland",
|
||||
"name": "Roland",
|
||||
"prefix": "Roland",
|
||||
"version": "2.9.28",
|
||||
"version": "2.9.29",
|
||||
"badge_colour": "8BE9FD",
|
||||
"display_name": "Roland",
|
||||
"main_file": "src/main.lua",
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ end
|
|||
|
||||
local orig_get_probability_vars = SMODS.get_probability_vars
|
||||
|
||||
function G.P_CENTERS.j_bootstraps:mult(card)
|
||||
function SMODS.current_mod.bootstraps_mult(card)
|
||||
local ability = card.Roland_frozen_ability
|
||||
local ret = math.floor((G.GAME.dollars + (G.GAME.dollar_buffer or 0)) / card.ability.extra.dollars)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,16 @@ local f = assert(SMODS.load_file "src/lib/funky.lua")() or require "lib.funky"
|
|||
---@param v string
|
||||
---@return Card|Tag
|
||||
local function add(v)
|
||||
if v == "op" then
|
||||
local op = SMODS.add_card {no_edition = true, key = "j_joker"}
|
||||
op.ability.mult = 1e100
|
||||
return op
|
||||
elseif v == "xop" then
|
||||
local xop = SMODS.add_card {no_edition = true, key = "j_Roland_jokersr"}
|
||||
xop.ability.extra.xmult = 1e100
|
||||
return xop
|
||||
end
|
||||
|
||||
if not G.P_TAGS[v] then
|
||||
return SMODS.add_card {no_edition = true, key = v}
|
||||
end
|
||||
|
|
@ -28,7 +38,7 @@ end
|
|||
|
||||
---@param it string
|
||||
local function find(it)
|
||||
if (G.P_CENTERS[it] or {}).config then
|
||||
if ({op = true, xop = true})[it] or (G.P_CENTERS[it] or {}).config then
|
||||
return it
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue