Add attack function and it can do simple attacking simulation