Help implementing spell

Hi there,

We are trying to implement the spell “anger management” of the warrior but we have a problem.
Is there a function in the core that allows you to handle when a PJ wins or loses, in this case, anger?
Or we have to make use of, for example, a PlayerScript void event OnModifyPower (Player * player, Powers power, int32 oldValue, int32 & newValue, bool regen, bool after)

Thanks in advance.