You'd add that achivement like usual, and then would run the appropriate checks to grant that achievement.
For example,
label best_ending:
"You and Eileen live happily ever after together, eating ice cream every day for dessert!"
achieve bestending
if achievement.has("goodending") and achievement.has("badending"):
achieve allendings