Added note about addvar

The contest scripts actually use addvar to add a -1 to a variable instead of using subvar to subtract a positive number. This is fine in vanilla, where addvar script command does NOT support adding the value of a variable to another variable (like subvar supports), but should anyone want to change it, contests will be inexplicably broken.
This commit is contained in:
Tustin2121 2019-08-17 11:16:54 -04:00
parent f4d4424618
commit bac8974ce3

View file

@ -466,6 +466,9 @@ bool8 ScrCmd_addvar(struct ScriptContext *ctx)
{
u16 *ptr = GetVarPointer(ScriptReadHalfword(ctx));
*ptr += ScriptReadHalfword(ctx);
// Note: addvar doesn't support adding from a variable in vanilla. If you were to
// add a VarGet() to the above, make sure you change the `addvar VAR_0x8006, 65535`
// in the contest scripts to `subvar VAR_0x8006, 1`, else contests will break.
return FALSE;
}