Added drains macro that supports the new value attribute, allowing for units to drain amounts other than 50%.