added logic to register attack hits