League-of-Fabulous-Developers / FoundryVTT-Fabula-Ultima

Enter Project FU: an unofficial foundry system for Fabula Ultima, channeling the essence of the book while delivering the immersive experience of playing a JRPG in tabletop format.
MIT License
41 stars 18 forks source link

fix isSuppressed reliant on 'crisis' being evaluated first #150

Closed 4m2c4bl3 closed 3 months ago

4m2c4bl3 commented 3 months ago

Looked into the bug in the support forum: image

It seems target.statuses looks only at already applied statuses. Therefore anything evaluating isSuppressed relies on crisis to have been evaluated first in the list, which doesn't seem to be a sure thing. (I'm not sure how the list is created, but it might be that any effect added is added in at the bottom. So crisis would always be evaluated pretty far down?)

Swapped out target.statuses for target.effects, which doesn't rely on them being evaluated in any order.

I think a problem might come up here as well if something can supress/disable crisis, target.effects is just a list of all effects the user has rather than filtering out disabled/suppressed things, but that seems far less likely than the current situation. And it would be homebrew, I think? Can't remember anything in cr/hf (i don't have any other of the books) that suppress crisis