I think that in a computer game lair actions would translate better as features of the lair area rather than actions of the creature, anyway.
Legendary resistances will be convoluted to code because it has to weigh the necessity of resisting something and not just use it at the first given chance. A GM knows not to waste a legendary resistance on pinpricks and they'd have to code it to make sure that the AI understands this too.