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

Implicit truthiness and NOT operator for condition operators #9

Closed huderlem closed 5 years ago

huderlem commented 5 years ago

I should be able to write:

if (flag(FLAG_1)) {
     # flag is set
}
if (var(VAR_1)) {
    # var is != 0
}
if (!flag(FLAG_1)) {
    # flag is unset
}
if (!var(VAR_1)) {
    # var == 0
}
huderlem commented 5 years ago

21f678df35d694d005d069942e350855024ae314