mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6922] [Feature]: "until"/"while" condition for macro based decisions #3880
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3880
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @usagirei on GitHub (Sep 30, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6922
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
Currently we can ask the decision model to conditionally enable a block via
{{#if decision:... }}.For persistence, we have
sticky:Nandcooldown:Nparameters.The addition of new condition parameters that can extend or shorten the block lifetime would extend the functionality.
Proposed solution
Following a
yesdecision, when one of these parameters are present, the decision model is also asked whether the entry should stay active / be deactivateduntil:"..."[:mode?]- disables the block when the model determinestrue|yeswhile:"..."[:mode?]- disables the block when the model determinesfalse|nomodetakesand|orand determines how the conditions interact with the presence of stickyrestrict|extendas alternate keywords as it simplifies reasoning about ituntil:"...") as the lifetime is determined only by the condition nowrestrict|andfor until;extend|orfor while)Cooldown then applies normally after deactivation.
With Sticky Turns
while:"...":and sticky:<N>condition == trueANDsticky_turns > 0while:"...":or sticky:<N>condition == trueORsticky_turns > 0until:"...":and sticky:<N>condition == falseANDsticky_turns > 0until:"...":or sticky:<N>condition == falseORsticky_turns > 0The AND mode creates a restriction on the active time - it only lasts until the timer expires, or the condition triggers
The OR mode creates an extension to the active time - it stays active indeterminately based on the condition
Without Sticky Turns
while:"..."condition == trueuntil:"..."condition == falseAlternatives considered
Additional context
Examples:
activates on combat start and stays until combat has ended:
decision:"combat has started this turn" until:"combat has ended this turn"activates on spell usage, and stays for n turns at minimum, extended if the user has not moved
decision:"{{user}} has used a stealth spell" while:"{{user}} has not moved":extend sticky:5activates on spell usage, and stays for n turns at most, while the user is undetected
decision:"{{user}} has used a stealth spell" until:"{{user}} was detected":restrict sticky:5Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: