WeakAuras

WeakAuras

206M Downloads

"Else" Condition type

emptyrivers opened this issue · 1 comments

commented

Is your feature request related to a problem? Please describe.

Sometimes I want to write a condition which looks like:

“If Trigger 1 remaining duration is > 5
then do X
Else if Trigger 1 remaining duration is > 10
then do Y”

Now, this is already possible with some clever combinations (particularly if X and Y affect the same property). However, this can get very cumbersome for intricate conditions.

Describe the solution you'd like

A new combination option, named If/Else If or some such, which creates the ability to write a branching condition like this.

Describe alternatives you've considered

Instead of being considered a combinator condition, If/Else If could be something implemented in the primary UI. This would make some amount of sense with the way that “If” already exists on the top level, but I do not want to speculate on how much effort that would take, compared to using a combinator type.

Alternatively, the ability to duplicate a condition would be quite helpful to solve at least some use cases. For example, in this video https://youtu.be/eZrQ2KtNzZc I create two conditions which are very similar. This could have been made a bit more intuitive with an “else” option, and it could have also been a lot quicker to do if I had the ability to duplicate conditions.

commented

I think the easiest way to implement that is to toggle that on a condition block that allows switching from "if" to "else if"

That wouldn't be too complicated implementation wise.