Closed huderlem closed 4 years ago
Development is taking place in the gen2
branch.
I don't think there is any demand for Gen 2 support. I also don't like how different some of the internals are for gen 2's system. IF there is demand in the future, I think I'd rather have a forked repo, rather than support both in one project. I'll keep the gen 2 branch around, in case.
Pokecrystal's scripting engine handles conditional logic a bit differently than gen 3. In gen 3, only three commands set the conditional flags (
checkflag
,compare
, andchecktrainerflag
). As a result, boolean expressions consist purely of the operatorsflag()
,var()
, anddefeated()
. In pokecrystal, tons of scripting commands write conditional flags towScriptVar
.wScriptVar
is multipurpose, but all conditional branching uses this variable to determine the action to take.Rather than defining a key operator, like
flag()
, for every single command that write conditional flags, Poryscript should accept arbitrary operators in boolean expressions. Then, every command will be rendered usingiftrue
,iffalse
,ifequal
,iffalse
,ifgreater
, andifless
.Above is probably the most important part, however, many other pieces need to be modified, including:
para
,line
, etc.)iftrue 0, <label>
that occurs withcase 0
in switch statement.wScriptVar
explicitly in conditions via a keyword. (e.g.if (scriptvar < 20)
)...and probably more.