I dug into the macros a bit and I think I have found a fix for the conditions ending prematurely. I am not sure what else might be affected by my fix, but so far I have not run into any trouble.
In the Lib:States4e (Version 5.0.6) token, I edited the handleStates macro. Near the bottom of the macro there is a piece of code that looks like this:
Code:
[newStateObj = json.set("{}", "condition", state, "imposedBy", stateImposedBy, "expires", stateExpires, "start", start, "ogDamAmt",newDmgVal, "defsAffected", sdefsAffected, "affects", saffects, "targets", stargets)]
I changed the start value to start+1 so that it looks like this:
Code:
[newStateObj = json.set("{}", "condition", state, "imposedBy", stateImposedBy, "expires", stateExpires, "start", start+1, "ogDamAmt",newDmgVal, "defsAffected", sdefsAffected, "affects", saffects, "targets", stargets)]
I tested it with End of Your Next Turn, End of Target Next Turn and Beginning of Target Next Turn, and they all seemed to work.
EDIT: Seems to work fine for conditions applied to targets (enemies), but not for allies.
Edit2: Ally conditions use a different macro, procAllyStates. Made the same change in that macro and EoYNT seems to be working:
Code:
[newStateObj = json.set("{}","condition", state, "imposedBy",sImposedBy,"expires",expiry,"start",start+1,"ogDamAmt",newDmgVal, "defsAffected", defs, "targets", SelectedEnemy, "affects", attAffected)]