You used "dominated" before, but I don't know what you mean with that.
If it can be calculated, it can be modified.
What you need to do is calculate how much armor a unit has (with some system), then counteract all bonus damage done due to the armor.
Once all damage has been counteracted (so you know that the only damage modifier is now attack/armor type), you need to start modifying that a bit more according to the armor.
Here's an extended example:
Attacker: attack type "Normal" (x1.5 against medium), 10-10 base damage.
Defender: armor type "Medium", -2 armor.
Damage event: 10 (base) * 1.5 (attack/armor types) * 1.12 (12% bonus damage against a unit with -2 armor) = 16.8 damage detected.
Detect armor: defender has -2 armor (calculated).
Modify damage: damage = damage (event) / 1.12 (calculated) = 15 (this only includes attack/armor types).
Modify damage: damage = damage * 1.02 (this is "1 - (armor/100)") = 15,3 damage
-> Deal damage.
With such a system, the armor amount indicates the resistance. So 50 armor = 50% damage reduction; -8 armor = 8% damage increment.
That's what you wanted, no?
It is! but when you are hovering over the armor value, you get to see "-46%", even if I used the armor detect system, it will not look well and will cause quite a lag ( each unit get damaged each second then healed, each player get milion notes about his unit being damaged and pings all over the map, and the lag just increases as I add and remove health, while 1 hit can kill unit without saving it from killing blow) overall , I prefere not being able to dominate armor points if this lag and bugs are the cost. It could be usefull for maps who have nothing exept for that, since it make lags/bugs and should be used on small map who has nothing else to increase the lag. I just decided it wouldn't worth it, though your way of doing was really creative and extreamly usefull, damage detection + armor detection and then heal and create your own damage, could be neat if it would actually work
Attacker: attack type "Normal" (x1.5 against medium), 10-10 base damage.
Defender: armor type "Medium", -2 armor.
Damage event: 10 (base) * 1.5 (attack/armor types) * 1.12 (12% bonus damage against a unit with -2 armor) = 16.8 damage detected.
Trigger: heal the unit for 16.8 damage!
Comment: Unit is now as it was before taking the damage.
Detect armor: Dummy damaged the unit for 10 damage and detected 12 life missing, then healed it back
Cooment: detecter spotted that the defender has -2 armor (calculated).
Modify damage: damage = damage (event) - (12%*(damage (event)) = 10 (the original damage before the reisstance).
Modify HEALTH POINTS: lower unit health by (found armor) 2*(damage event) = 2 extra damage
Total damage done: 12 damage which are 10-10 +2% for armor resistance
Pros:
1) All resistance is now possible to be dominated
2) Spell damage will be reisisted
3) No need to form armor detector each second to global, unrelevant units, but only to the ones who take damage
Cons:
1) Maybe cause lags, need to check
2) Spell damage will be resisted
3) Damage that was enought to kill unit, will not be resisted to save it from killing blows
Note: Spell damage resisted via armor, its both a con and a pro, since it depends on what the map maker want.
Solved!!!!
EDIT: In beggining I thought it was impossible but we somehow found a way to do it
Skip to this massage to view a way that works!
***Attached a try map, tell me what you think?