As NicotineLL mentioned, you may just check the animation playing and set the base damage accordingly. For the critical, you can have a damageMultiplier on your damage calculations, which is set to 1 all the time, but set to 2 (or 3 or whatever you want) when you get a critical.
Here's a very simple example, just so you get the gist of it:
Click the buttons to change the animation. The chance of a critical is very high (10%) just to allow you to see it happen.