I am messing with the brewmaster Sim rotation and noticed the check for purifying brew is for stagger level and hp which is not at all how you actually play a brewmaster. You want to purify immediately post taking a large hit regardless of your hp. Is there a way to check if the"big hit" just happened in a tank Sim? I can’t see any options for recent damage.
When the simulator does a rotation check, it does not have a way to know how long ago something happened. There would be a way to hack that in by adding some custom spells if you wanted.
Another way to effectively do what you want is to add an action that is simply: use Purifying Brew when you have heavy stagger. After you take a big hit, it will put you into heavy stagger, which will then cause the rotation to use Purifying Brew. You could set up the same condition with moderate stagger as well.
There is also a helper function, StaggerDamageRemaining - which returns the total damage remaining to be staggered. You could create an action like use Purifying Brew if:
StaggerDamageRemaining >= X * TotalMaxHealth
Where X = whatever health threshold you deem apporpriate.
Through my experimentation with the rotation, I have found the current conditions to be slightly more effective at reducing the death chance in some situations than always using Purifying Brew right after a big hit. Most importantly, I haven’t found a case where it performs worse. Brewmasters are ridiculously hard to kill, so saving the Purifying Brew charges for when they are in trouble has very little downside as long as healers aren’t having mana problems. In a real raid, you could of course choose to use a Purifying Brew charge based on the needs of the healers.
If you are using Mighty Pour(Celestial Infusion) as a legendary - more aggressive Purifying Brew use might be a little better - I have actually added that in on my development rotation but not pushed it live yet.