Issue:
Trying to use OnHitEffects on Buck Attack typed protoactions does not work.
E.G. for a simple addition to the Battle Boar’s buck attack:
<protoaction>
<name>BuckAttack</name>
<rof>0.500000</rof>
<damage type="Hack">40.00000</damage>
<damagebonus type="MythUnit">2.000000</damagebonus>
<damagebonus type="Hero">0.500000</damagebonus>
<maxrange>1.5</maxrange>
<onhiteffect type="StatModify" duration="6.000000">
<target attacktype="Unit"></target>
<modify type="Armor">0.850000</modify>
<modify type="Speed">0.850000</modify>
</onhiteffect>
<circularshockwave>1</circularshockwave>
<maxsizeclass>6</maxsizeclass>
</protoaction>
It does not apply the armor reduction or speed. It also doesn’t interact with the other on hit effects.
Trigger Event:
Simply testing out the above code produces the bug.
Repro Steps:
- Create an edit with a protounit with the valid Buck Attack protoaction.
- Start a game with this edit enabled.
- Witness the lack of on hit effect application.