GAE/Cast spell
Cast spell is a command that lets you perform give an effect to a target without having to attack them. You can cast spells on either yourself or a target.
Contents
XML
<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|affect]] value="self" />
<cast-spell-skill value="eat_spinach_skill"/>
</command>Elements
Most elements are standard effect or command elements, with the exception of the affect element.
affect
Defines who the cast spell command can be used against. At the moment, it cannot target other units and "self" is the only valid value, but it will be expanded in the future.
Targeted spells
If using a spell with the affect value being target, then you can set a splash and projectile values. This is done the same way as in an attack skill.
<start-time value="0.5" />
<projectile value="true">
<particle value="true" path="heal_proj.xml"/>
<sound enabled="false" />
</projectile>
<splash value="true">
<radius value="3"/>
<particle value="true" path="heal_splash.xml"/>
</splash>