Added attack function and tweaked damage calculations