works with attacking, switching, and state shifting