Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JokerDisplay Compatibility #1

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

TehSeph
Copy link

@TehSeph TehSeph commented Oct 10, 2024

This PR includes https://github.com/nh6574/JokerDisplay tooltips for all KCVanilla Jokers except for Power Grid.

I don't understand what Power Grid does... I assume it should be starting at x1.0 and gaining x0.2 for every playing card scored with +Mult, then resetting on round end. Testing in game, however, I can't get it to increase (or decrease) from x1.2... It even starts the round at x1.2! And while claiming x1.2, it doesn't seem to ever actually apply that x0.2 mult anywhere. Played hands just skip over this Joker. I've tried +Mult, xMult, Holographic, Polychrome, Lucky, and Red Seal. Nothing changes. Your code looks fine, so I don't understand.

Testing was done with:

  • Balatro 1.0.1g
  • Lovely 0.5.0-beta7
  • Steammodded 1.0.0-1006a
  • "_RELEASE_MODE = false"

I wasn't even including JokerDisplay compat in testing, just this mod and the Joker's core functionality.

*shrugs* I'm leaving it with no display for now. I don't want to add something that I cannot test for.
I assume just a simple x_mult border_node is all that is needed. (Can be copied directly from Handy.)
Please discuss within this PR (or Discord) and I will update it, or you may merge this and do so yourself.

Also included is a change to the description of Luck of the Irish as a separate commit f2fe505 to be cherrypicked if undesired. This change puts the description in parity with the visuals of the new tooltip and improves its readability IMO

New Description New Tooltip

@TehSeph
Copy link
Author

TehSeph commented Oct 13, 2024

Pushed an update for Power Grid. I'm still not satisfied with it completely but at least some functionality exists.

As it is now, let's say you played 2, 2, 3, 3 and all of them are Mult cards:
When you submit your hand, the JokerDisplay tooltip instantly updates to show X2.0 and then the scoring begins with the popups above each card showing X1.2, X1.4, X1.6, X1.8 while conversely the joker's description updates immediately after each of the popups happen during the scoring.

To me this just feels like an odd disconnect between the information given in the two locations. A more elegant solution is needed before I feel comfortable saying this PR is ready to be merged but I wanted to get something working at least.

@TehSeph TehSeph marked this pull request as draft October 13, 2024 19:50
93% completed
see comment in code
not sure what is wrong
for readability and parity with JokerDisplay tooltip
no functionality changes and can be cherrypicked if undesired
@TehSeph TehSeph force-pushed the compat-jokerdisplay branch from f2e2c75 to 51e5a18 Compare October 20, 2024 19:10
@TehSeph
Copy link
Author

TehSeph commented Oct 20, 2024

Another attempt. (After rebasing on top of 1.3.3)

This time the tooltip shows the overall effect on the current hand.
Using the same example hand above, the tooltip will show X4.84 (1*1.2*1.4*1.6*1.8)

However, there does seem to be a bug with this new version.

Whenever using a consumable, the tooltip resets back to X1 until the selected cards change. And during the first hand played after triggering the bug, the tooltip is multiplied by whatever value it had prior to resetting. After that hand is scored, the bug resolves and everything is back top normal again. Obviously, this is caused by how I'm storing the value for the tooltip but I'm unsure how else to handle it. Storing it locally to calc_function fixes this particular bug but breaks in different ways and so does removing the last if statement to skip recalculating while scoring. 😖

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.

1 participant