This hard-G gif is runs faster[footnote]I am using ffmpeg to create the gif. Not sure if there is some setting that would fix this.[/footnote] than the actual game, but this is how it looks. It's roughly a second and a half for each status effect that is on a character. Positive and negative.
It cycles through each status effect, starting with the good ones, and then repeats. This seems pretty easy, but how do you actually code it?
Each battle participant has its positive and negative status effects tracked with bit flags. I'm still unsure if this is the best way to handle this. It does make for clearing all status effects, or giving many status effects at the same time easier.
But it makes this a bit harder. Looping through the various statuses means I need to do some bit shifting from the counter. Then I see if the character has that status and if so, display the image. If not, keep checking until I find one they do have and display that image. If we have reached the original status, the loop is complete.
Of course if the character has no statuses then we display nothing. Boom.
Now I just have to implement them all.