I have a unit, which represents a shield bubble. I want a chance of attacks (missiles) to ignore the shield and attack the hull directly.
More importantly, It needs to scale based on the shield's health. At full strength, it always blocks it. As it drained, it will drop down to a mere 30% block chance. Hence as bombardment continues, it would be less able to block missiles.
I don't know if there is any support for scaling chances in data, although I am certain triggers would make it easy. However, this event would occur often, so Needs to be data based.
Worst case, I would make a switch, with 4 chances, for each 20% shield lost.
Hmm. What then is the most efficient way to merge a trigger random-chance into a data validation? That is, have a switch statement, or validator, succeed or fail depending on a trigger-based effect, as such?
I'm guessing you're using the same shield unit as detailed here.
In which case the easiest thing to do would be to put a Switch effect into your Search effect which applies a different Damage effect based on the percentage of shield and each Damage effect would have a different value in the Effect - Chance field in order to cause missiles to sometimes slip through. Y would also have to make sure the Search doesn't reacquire the missiles once they're in the shield.
Yea, that's the way I was planning to do it if all else failed. I would prefer a cleaner slope, but it doesn't seem feasible. I don't know enough about catalogs, and that would require a trigger to run for each missile impact, which could be a problem. That lesser solution would work regardless, so I will use it.