rabdill / bishop

An engine for writing browser-based text adventures using only client-side JavaScript.
Other
1 stars 0 forks source link

Add conditionals #148

Open rabdill opened 9 years ago

rabdill commented 9 years ago

"if" statements that can be inserted at points where actions would normally just be taken without checking for anything.

Will probably have to be in FRONT of the thing in question:

if : {
    "condition" : [thing blabla],
    "execute" : {
    }
}

rather than in-line with the thing:

"actions" : {
    "if" : [blablah],
    "fart" : {
        "loud" : {}
    }
}

Because we'd have to allow for "else" statements. Possibly this, if we do it in line:

"actions" : {
    "if" : [blablah],
    "fart" : {
        "loud" : {}
    }
    "else" : { zzzzzzz
    }
}

But if this is the case, what is "zzzzzz"? Just a change to implement, or an action to take?