Awww I see that there is a stackpriority in the statuses, so that might be where it's done. As far as the statuses effects, they are mostly, if not all, called from the stats_potions.