Actually I believe it might be possible. Have two attacks: One which works for allies, and one which works for enemies. They should have identic stats. And now, for the one for allies, have all the values for damage negative. I think this might not work, but I really hope it does.
And for the mana, check everytime an ally is attacked by the unit whose unit type is equal to the hero/unit whose stats you changed for damage. And then you can just decrease that unit's mana.
And to stop the unit from healing, check every attempt of a such unit whose mana is lower than x, to attack a friendly unit, and stop that unit immediately.
This is a brief introduction, if you can't get this working, I'll think of something else.
~Daelin