For those of you who weren't aware TargetFindData.xml and ValidatorData.xml in the game data folder contain some of the logic for targeting and using of abilities. For example here is the stimpack section of ValidatorData:
<!--
StimPack
if (already buffed)
return false;
if (!attacking)
return false;
if (nearby medivac can heal)
relax next two constraints:
if (recently damaged)
return false;
if (!hostile targets)
return false;
return true;
-->
<CValidatorCombine id="TacticalStimPack">
<Type value="And"/>
<CombineArray value="TacticalStimPackTestBuff"/>
<CombineArray value="CasterIsAttacking"/>
<CombineArray value="CasterNotInCombat"/>
<CombineArray value="TacticalStimPackHostiles"/>
</CValidatorCombine>
Nice. With all of these progress, we all will have a much better AI experience.
Does this mean that if we can create new buffs for units/structures?
I believe you asked in another thread if it was possible to read from the XML.
http://www.sc2mapster.com/api-docs/functions/catalog-field-value-get/ (http://www.sc2mapster.com/api-docs/functions/catalog-field-value-get/)