Retaliate triggers after all effects of an attack have been applied. If the retaliating figure dies from the attack, the retaliate does not trigger because the figure is removed from the board beforehand. If the retaliating figure is pushed out of the range of its retaliate, it also does not trigger. However, if it is pulled into retaliate range, it would trigger.