If a Hammer Knight deals damage during attacking or countering, but the Hammer Knight itself is dealed enough damage to destroy it, does it's Aftershock 1 still take effect?

Thanks!