Modify Blind Amount context #1135
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 booleancontext.blind_multiplier = float- The multiplier value the blind uses to modify from the base ante amount (i.e.1.5for Big Blind)SMODS.blind_amtvariable 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 = valuein 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: