The structure matters more than any individual entry. These four explain most of “why will it not cast that”.
| It is a priority chain | Almost every entry reads “only when X cannot be used”. Dark Swarm only when Plague cannot, Ensnare only when Parasite and Broodling cannot, Irradiate only when EMP and Defensive Matrix cannot, Hallucination only when Storm cannot, Recall only when Stasis cannot. |
|---|---|
| Mana cost is not priority | The widely repeated trick of lowering a spell's mana cost to make the AI prefer it does not work. Making one cheaper only makes the higher-priority spell affordable more often. |
| There are two ranges | There is a wide search while idle and a 9x9 one once the unit has been attacked. A mob that casts freely on patrol and barely casts in a fight is behaving correctly. |
| The 250 and double rule | Plague, Ensnare, Stasis and Psionic Storm, when not under attack, need enemy HP+shields in the area over 250 and more than twice the friendly total. Mobs that never storm are usually failing this. |
| Invincible units | No spell ever targets one. |
|---|---|
| Cloaked units | Not a target unless detected. |
| Hero units | A hero uses no special ability except cloak and infestation - which makes “make it a hero” the bluntest way to switch a mob's casting off. |
| Interceptor · Spider Mine · Scarab · a worker in gas | Excluded as targets almost everywhere. |
| Consume | No AI uses it at all - there is nothing to switch off. |
|---|---|
| Infestation | Fires automatically near a damaged Command Center, and marking the ability disabled in the editor does not stop it. |
| Siege Mode | The same: place a sieged tank with the ability disabled and it still un-sieges when its conditions are met. |
| Defensive Matrix | Target needs max HP of 100 or more and current HP of 75 or less, must not already have it, and allies are eligible. |
|---|---|
| EMP | Shields or energy totalling over 200. |
| Yamato Gun | A target between 200 and 450 HP+shields, heroes excluded. |
| Optical Flare | Over 80 HP+shields, and only on a full mana bar. |
| Restoration | Over 60 HP+shields, and an actual status effect other than Stasis. |
| Stim Pack | When attacking an enemy at 100 current HP or more. |
| Nuclear Strike | Five or more units at the target point. |
| Heal | Only on its own units - never on an allied player's. |
Treat the range figures with care. The original is Heinermann and SEN's analysis of the StarCraft beta's debug build, and as its translator points out it expressed ranges in box pixels and assumed the AI's notion of an “area” as context. The “9x9 tiles” in circulation is somebody's conversion. Use them as relative sizes - wide when idle, small when attacked - and not as measurements.
And the AI itself breaks. Computer units cast well early and stop later, the classic symptom being a tank that sieges and never un-sieges for the rest of the game. That is a known failure of the unit AI rather than of your conditions - and it is the argument for driving mob behaviour from the struct instead.
