It doesn't need to be a trigger... just change the object data.
Of course, if you really want it to miss completely, you need to trigger it... which isn't the easiest trigger, since you need to keep a few things in mind:
1) large-scale battles have a lot of these units
2) Multiple types of units can have different accuracy/damage
3) You need to detect the damage of each unit (including upgrades, of course).
A way to make the unit able to miss is just like the mortar team can miss (the arrow will shoot in the direction of the unit, but you can dodge it by moving).
(It's a JASS-code, but that's to make it look better ^^ - it's just the object data)
JASS:
Combat - Attack 1 - Area of Effect (Full Damage): 30-60 (your choice)
Combat - Attack 1 - Area of Effect (Full Damage): 30-60 (your choice)
Combat - Attack 1 - Area of Effect (Full Damage): 30-60 (your choice)
Combat - Attack 1 - Damage Factor - Medium: 0.60-1.00 (your choice)
Combat - Attack 1 - Damage Factor - Small: 0.30-1.00 (your choice)
Combat - Attack 1 - Projectile Arc: 0.10-0.40 (your choice)
Combat - Attack 1 - Projectile Speed: 700-1500 (your choice)
Combat - Attack 1 - Weapon Type: Artillery
That's about everything you need... if it's not good enough, I won't create the trigger, that's for sure xD