You can set a units life with triggers easily- "Set/Modify Unit Property (Life)".
To change attack damage, I would just apply a buff that reduces all attack damage by 80%. You should not need to change the data values themselves- although you can by using "Catalog field value set".

Demtrod Regular ShmoeI want to create a spell that spawns a unit with 20% of the casters HP and 20% of the Attack damage. I will need to set the Hp and Damage with a trigger.
(This would be for both effects, units, actors, upgrades and in general all data values)
I saw it done with custom script, but I dont remember how it worked.
I asume having a trigger with local variables for the type, name, field and value to change instead of changing the custom script.
Gridlock TD : Elements