Skip to content

Conversation

@the-Astra
Copy link
Contributor

This commit allows objects that trigger off contexts to change a blind's target amount and correctly shows it on the Blind UI screen (assuming the object is in the player's possession at time of UI creation). It currently calls with two attributes:

  • context.modify_blind_amt = true - Base context boolean
  • context.blind_multiplier = float - The multiplier value the blind uses to modify from the base ante amount (i.e. 1.5 for Big Blind)
  • There is also a global SMODS.blind_amt variable set before the context call used to ensure all values being returned from this context call are factored into the final blind amount value. This value should be used when doing math with the blind amount in the trigger object.

Returning blind_amt = value in a calculate function's return table will set SMODS.blind_amt to the new value.

I believe there could be more done to this, i.e. calling the context with the blind's type, however I currently cba to figure out how to pull that from two different patch locations.

A weird issue I've come across with this is an inconsistency of trigger order, for example with a joker and a back that both trigger under modify_blind_amt, the UI call will trigger the joker before the deck, but when the blind is set, the deck will trigger before the joker.

Additional Info:

  • I didn't modify api's or I've made a PR to the wiki repo.
  • I didn't modify api's or I've updated lsp definitions.
  • I didn't make new lovely files or all new lovely files have appropriate priority.

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