Skip to content

Latest commit

 

History

History
78 lines (71 loc) · 5.01 KB

File metadata and controls

78 lines (71 loc) · 5.01 KB

GOALS

  • Attempt to get MobDebug working with VSCode playing along - sidestepping from this
  • ~~Update package.path properly, so that way I can access functions from other modules - this would allow me to not duplicate the requireModule function I've written as well ~~ honed down next bulletpoint
  • Look into Lua debug library and the functionality it offers
    • Execute some debug library functions to see what happens
    • Look up the debug library in the Lua Quick Reference guide and Lua 5.4 reference manual
  • Look into what 'upvalues' specifically are in the Lua Quick Reference guide + see what Cogito says about them
  • Figure out how to tackle require issue encountered - can't access utils module using require function from logic module's init.lua file - use debug library functionality if and where it makes it sense - need to use SMODS.load_file using a conditional to avoid referencing SMODS in unit tests... do not use require calls, except in test suite files
  • Explore using SMODS.PokerHandPart to make composable functions that are also valid Evens hands, such as Flush Evens and Straight Flush Evens
  • Look at awesome-lua on GitHub for more resources that could help me pick up Lua more effectively and help move me along more
  • Look into metatables in Lua to see their purpose as well as to see how their use can fit in with this mod
  • Look into obfuscation of Lua code in terms of adding DRM to the mod
  • Look into whether or not returning a function in a module's init.lua is a common practice and if so, in what case it makes sense

Overall idea

  • Get Balatro to load Steamodded
  • Get mod details to appear in Balatro
  • What is an Evens hand?
    • 2, 4, 6, 8, T of any suit
    • scores higher than a Straight due to Q not counting
    • scores lower than a Flush
    • What should the base mult be?
      • Base mult: 4
    • What should the base chips be?
      • Base chips: 32 (in between a Straight and a Flush), plus it's an even number
  • How do I create an Evens hand as an entity in Lua?
    • How do I write the business logic for the Evens hand in Lua, making sure that it is decoupled from the Steamodded API?
    • How do I register the hand with the Steamodded API?
    • How do I make the hand take effect?
    • How do I level up the Evens hand?
  • Integrate into the API in a small way - make a hand appear in the list of hands and/or add it to the game logic and log to console or to screen
  • Make it functional (though the business logic could be decoupled and made testable)
  • Extract the business logic in a way that is decoupled from the Steamodded API and is testable
    • Write tests for isValidHand function
      • Find out best practices for testing Lua code, including testing libraries (ideally builtin)
    • Initially tackle the Evens hand
      • An Evens hand
        • when played
        • when scored
          • should be evaluated
            • with the multiplier for Evens and value for an Evens hand (should score higher than for a Straight hand since Queens don't qualify) and add the values of the cards played to the score
              • except the Joker that allows 4 card Flushes and Straights shouldn't apply
          • as above a Straight and below a Flush -- take a look at scoring to see if this makes sense
          • should not be evaluated
            • as an Evens when the Joker that allows skips in Straight hands is active - maybe add this in some way to the Joker tooltip in parentheses
        • should be upgradable
      • Cases to make sure are handled
        • Upgrades
        • Full debuff
        • Partial debuff
        • Ranking below a Flush if the hand is also a Flush
        • Debuffed Evens hand - should score the minimum score for the hand
        • Partially debuffed Evens hand - should score properly (assume one debuffed card)
          • The Joker that upgrades the hand if it's the first discarded hand
          • The Joker that has a 1 in 4 chance to upgrade the hand when played
          • The Joker that has a 1 in 4 chance to upgrade the hand when played in combination with the doubled odds Joker
    • Add variations on Evens hand
      • Flush Evens hand
      • Straight Flush Evens hand
    • Planet card (post v1)
      • Flush Evens variant
      • Straight Flush Evens variant
    • Round skips should allow upgrading Evens, just as they do for Pairs, Flushes, etc.
    • The list of hands when displayed in the UI should show an Evens hand
  • Look up a testing framework for Lua and integrate it into the project

Things to consider

  • How would a played Evens or Odds hand interact with:
    • the Joker that allows Straight hands to be played with a gap? double check this
    • the hand also being a Flush or a Straight Flush?
      • Initially make it take precedence over those two hands
      • Afterwards, make a Flush Evens and a Straight Flush Evens hand
  • Are there any concerns about how an Evens hand could affect game balance?