Skip to content

Conversation

@Toneblock
Copy link
Collaborator

one patch pr

@Toneblock Toneblock marked this pull request as ready for review July 30, 2025 16:16
@Toneblock
Copy link
Collaborator Author

i don't think this needs to be reviewed thoroughly

@Toneblock
Copy link
Collaborator Author

ok now it does

@Toneblock Toneblock changed the title fix sixth sense behaviour fix sixth sense behaviour + extras Jul 30, 2025
Comment on lines +79 to +86
# align sixth sense trigger behaviour with vanilla - STEAMODDED BUG
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''if self.ability.name == 'Sixth Sense' and #context.full_hand == 1 and context.full_hand[1]:get_id() == 6 and G.GAME.current_round.hands_played == 0 then'''
position = 'after'
payload = '''if ( SMODS.find_card('j_sixth_sense') )[1] ~= self then return end'''
match_indent = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait what's the actual bug here? multiple sixth sense jokers all creating spectrals when only one should be created? or something else? also which steamodded code path even creates this behavior?

code injection is brutal to debug - we've seen this play out with talisman where the codebase is basically archaeological at this point. could we consider monkey patching / overriding the relevant steamodded method or sixth sense evaluation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically the card destruction calculate in vanilla looks like:

for j = 1, #G.jokers.cards do
	destroyed = G.jokers.cards[j]:calculate_joker({destroying_card = scoring_hand[i], full_hand = G.play.cards})
	if destroyed then break end
end

this is pretty simple, if a card destruction effect returns true for the card, then calculation loop is stopped early

smods calculation rework runs the cards and jokers through a bunch of stuff and doesn't exactly present an easy opportunity for the break to happen, so much so that steamodded discord is discussing a similar hardcode for this behaviour

this is the easiest fix for now, i hope a new smods release will fix this and we can remove this eventually

@stephenkirk
Copy link
Member

btw if this could merge after the lobby refactor that’d be goated - would save me from merge conflict hell

@V-rtualized
Copy link
Collaborator

Git is confusing me with this merge resolve.. cuz I think its neither, it was conflicting because literally none of those functions on either side exist anymore. Hopefully I didn't break anything

@V-rtualized V-rtualized merged commit a76f934 into Balatro-Multiplayer:main Aug 3, 2025
FilPag pushed a commit to FilPag/BalatroMultiplayer that referenced this pull request Aug 11, 2025
FilPag pushed a commit to FilPag/BalatroMultiplayer that referenced this pull request Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants