If it's autoshot ability, you must via one trigger detect when it's turned on and off, then set boolean variable (for example "FlamingArrowsOn") to true if on and false if off. Than in other trigger detect when unit takes damage (before add all units to event "Takes Damage") or if u want unit attacks (but it's not efficent), check if attacker have ability turned on (variable) and have needed amount of mana. Then in actions use "Unit - Damage Target", as damage amount use "Hero Attribute (Attribute, include bonuses)".