Quoting LikeTheWhirlwind,
I think a simpler solution might be to add another AIUseTargetCondition that prefers targets that don't already have the buff/debuff in question.
Well I don't know the details, I'm not sure if I understood it well, does what you suggest fix that problem which particularly affect with ships with abilities having needToFaceTarget true ? Would that stop a ship going to use an ability when it realizes (after it had decided to cast it on a target, but does not yet face it or is not yet in range) that the target has just been debuffed ?
An example, if 3 Dominas (1, 2, 3) are against 4 ships (A, B, C, D), would that behave like this :
-1) All three Dominas target a ship (say A) with Suppression. But some are closer and better oriented, so one is faster.
-2) So Domina 1 just casted Suppression on A. Here is my question, will Dominas 2 and 3 stop targetting 1 and choose another target at that point ? And so on ?...
This would be cool if it worked with that apparently simple solution you suggest... It wouldn't be the "optimal" solution (it would be a bit better if the 3 Dominas above targetted different ships from the start) but that would already be a great improvement over the current behaviour.
Edit : I'm no modder please excuse me if this is not really relevant.