Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions lovely/center.toml
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,7 @@ payload = '''
local nc
local select_to = card.area == G.pack_cards and G.pack_cards and booster_obj and SMODS.card_select_area(card, booster_obj) and card:selectable_from_pack(booster_obj)
if card.ability.consumeable and not select_to then
local obj = card.config.center
if obj.keep_on_use and type(obj.keep_on_use) == 'function' then
nc = obj:keep_on_use(card)
end
nc = SMODS.should_keep_on_use(card)
end
if G.booster_pack and not G.booster_pack.alignment.offset.py and ((not select_to and card.ability.consumeable) or not (G.GAME.pack_choices and G.GAME.pack_choices > 1)) then

Expand Down
6 changes: 5 additions & 1 deletion lsp_def/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -768,4 +768,8 @@ function SMODS.challenge_is_unlocked(challenge, k) end
--- a custom `func` to modify the values in specific ways. `hands` and `parameters` can
--- be limited to specific ones, or default to using all of `G.GAME.hands` and `SMODS.Scoring_Parameters`.
--- Use `level_up` to control whether the level of the hand is upgraded.
function SMODS.upgrade_poker_hands(args) end
function SMODS.upgrade_poker_hands(args) end

---@param card Card|table The card being checked to keep on usage
---@return boolean
function SMODS.should_keep_on_use(card) end
8 changes: 8 additions & 0 deletions src/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3428,4 +3428,12 @@ function SMODS.get_clean_pool(_type, _rarity, _legendary, _append)
end
end
return clean_pool
end

function SMODS.should_keep_on_use(card)
local obj = card.config.center
if type(obj.keep_on_use) == "function" then
return obj:keep_on_use(card)
end
return false
end