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
13 changes: 1 addition & 12 deletions lovely/lib_misc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,7 @@ position = "before"
payload = '''elseif _type == 'Consumeables' then _pool[#_pool + 1] = "c_ceres"'''
match_indent = true

# hand size forgiveness if playing negative or antimatter deck (someone please fix)
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "function Game:update_draw_to_hand(dt)"
position = "after"
payload = '''
if G.GAME.selected_back and (G.GAME.selected_back.name == 'cry--Negative Deck' or G.GAME.selected_back.name == 'cry-Antimatter') and G.hand.config.card_limit <= 0 then -- 'cry--Negative Deck'... sure
G.hand.config.card_limit = 1
end
'''
match_indent = true


# init Cryptid global through lovely
# so other mods can add things to obj pools
Expand Down
20 changes: 20 additions & 0 deletions lovely/misc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,26 @@ position = "at"
payload = """limit = limit - 1 + (card.edition and card.edition.card_limit or 0)"""
match_indent = true

#Fix SMODS.cards_to_draw desync when drawing negative cards (especially when drawing the entire deck)
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "SMODS.cards_to_draw = SMODS.cards_to_draw + (SMODS.cards_to_draw < #G.deck.cards and (cards_to_draw[i].ability.extra_slots_used or 0) - (cards_to_draw[i].ability.card_limit or 0) or 0)"
position = "at"
payload = "SMODS.cards_to_draw = SMODS.cards_to_draw + (cards_to_draw[i].ability.extra_slots_used or 0) - (cards_to_draw[i].ability.card_limit or 0)"
match_indent = true

#Ensure SMODS.cards_to_draw is reset at the start of each new round
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "G.GAME.current_round.used_packs = {}"
position = "after"
payload = '''
SMODS.cards_to_draw = nil
'''
match_indent = true


#This fixes a double-sided green seal cards crashing the game while trying to open "View deck" while flipped inside the random deck selection in a booster pack
[[patches]]
Expand Down