My gaming group has recently been through a number of against the game campaigns. Blackstone fortress&Cursed City, Frosthaven and X-wing Heroes of the Altari Cluster (HotAC)
One thing we've noticed is that such games can suffer when they have either overly predictable AI, OR overly Random AI.
On the one hand - overly Predictable AI can be easily gamed against - i.e. waiting just outside a known movement range, funneled into shooting alleys etc.. on the other hand overly random enemies can alternate between advancing & retreating or taking actions that don't make any tactical sense (Frosthaven it was purely random based on card drawn)
HotAC and BSF both reacted to the player fighters positions with a small chart whilst still having a couple of options to what they might do. Opponent visible, in range X etc...
So the trigger event might be visible enemy within range X. But still with a chance of roll d6 on 1-4 do A on 5-6 do B. (D20 roll in BSF but similar principle) but you end up rolling for each model every turn.
If they always have the same fixed trigger. It becomes predictable and players will learn how/when to trigger or avoid it. Not necessarily an issue if it's a one off storyline event, or a standing power such as confers benefit to
Obviously you get game design decisions such as what level of complexity/simple & elegance you want. And simplicity does keep the game moving certainly, as much as I really liked the HotAC AI but it was a bit of a trawl through to work out what each ship would do each turn.
For reference Tie fighter AI card for HotAC:
The actions or abilities are done in a list flow chart style so you do the first action that matches the described condition. Note the HotAC campaign was fan created AI campaign/add-on for Xwing and not by games designer.
For reference BSF: AI table on right of card.
From what I remember special abilities were listed under unique actions and would happen on certain rolls when the player was in the correct column.
Ok a much longer post than yesterday if X happens then use special ability on a roll of 3-6. But that also works. I just find AI opponent design fascinating given the games I play and how we always seem to need to tweak them to be a little bit smarter etc.. TLDR balance of chance and a some reflection of battlefield condition/events is best imo.