I can't seem to set integers to negative values, even if their initial value was -1:
integers { encounter_countdown: integer "-1" ; }
: print {( "before: " + encounter_countdown )}
: set_integer var="encounter_countdown" value = "-2"; // reset
print "after:" + {( encounter_countdown )} :
results in
before: -1
after: 0
I fixed it by adding an undocumented 'min' parameter, which seems to work nicely.
integers {
encounter_countdown: integer "-1" min="-2" max="10";
}