huderlem / poryscript

High-level scripting language for gen 3 pokemon decompilation projects
https://www.huderlem.com/poryscript-playground/
MIT License
200 stars 22 forks source link

Support composite boolean expressions #3

Closed huderlem closed 5 years ago

huderlem commented 5 years ago

Currently, if conditions aren't true expressions. They only support a single comparison. However, it would clearly be more useful if you could combine comparisons to check multiple conditions.

script Foo {
    # Example condition
    if (var(VAR_1) == 1 && flag(FLAG_1) == true || (var(VAR_2) == 2 || var(VAR_3) < 2)) {
        ...
    }
}

This would also apply to elif, while, do/while, etc.

huderlem commented 5 years ago

d4fbf2098cf11d73fab4016e8d492c53e505915f