An initial implementation of the cast-spell command is available, is can currently only apply an Effect to the 'caster'.
A test addon is available,
attached to the ticket.
This addon makes use of another new (and as yet) undocumented feature, enhancements (levels, upgrades, effects...) can include a new section <point-boosts> to boost the current hp and ep points. They add the hp/ep to any existing units affectd, and to any new units of those types. Obviously a hp-boost on a freshly constructed unit is not going to do a lot, but I'm sure you guys can think of a million ways to use ep-boost.
So, the addon adds to tech an upgrade, 'spinach' (research at castle),
<upgrade>
<image path="spinach.bmp"/>
<!-- other boring stuff omitted -->
<effects>
<unit name="swordman"/>
<unit name="guard"/>
</effects>
<point-boosts>
<ep-boost value="100" />
</point-boosts>
</upgrade>
This gives swordsmen 5 doses of spinach, which when eaten gives him 150% attack speed and doubles his attack-strength for 30 seconds,
...
<skill>
<type value="cast-spell" />
<name value="eat_spinach_skill" />
<ep-cost value="20" />
<speed value="20" />
<anim-speed value="200" />
<animation path="models/swordman_standing.g3d" />
<sound enabled="false" />
<effects>
<effect name="popeye_strength" bias="beneficial" stacking="overwrite" duration="30">
<multipliers>
<attack-strength value="2.0" />
<attack-speed value="1.5" />
</multipliers>
</effect>
</effects>
</skill>
...
<command>
<type value="cast-spell"/>
<name value="eat_spinach"/>
<image path="../../upgrades/spinach/spinach.bmp"/>
<unit-requirements/>
<upgrade-requirements/>
<affect value="self" />
<cast-spell-skill value="eat_spinach_skill"/>
</command>