improve implementation of the attack action