A great way to solve this is with Constant arrays.

Basically you make a constant aray that contains the offsets that you want for each direction - or rather delta offsets. Then based on the players facing direction you add the deltas to get the attack animation details.

Heres code out of my head - might be slightly syntax incorrect:

[pascal]
Const
AttackDeltas : Array[0..3] of Record DX, DY : Integer; End =
(
(DX:+10Y:-32), // Up
(DX:-20Y:+10), // Left
(DX:+10Y:+32), // Down
(DX:+20Y:+10)); // Right

// Inside procedure creating attack
AttackAnim := TAttackAnim.Create;
AttackAnim.X := Player.X + AttackDeltas[Player.Facing].DX;
AttackAnim.Y := Player.Y + AttackDeltas[Player.Facing].DY;

[/pascal]

Hope this ansers your question