When unit receives damage, i need to change it's Base Combat Strength to % of damage received.
For example, Warrior with str 8 received 50% damage, down to 50/100.
So Warrior's str should be changed from 8 to 4 ( by half ).
I need it because i want to make attack in game more valuable. Currently when you attack enemy, you still has advantage dealing more damage, but it's a small one.
What i want it's if Warrior attacks another Warrior with both being at full health, it would end with something like 70-80/100 for attacker and 30-40/100 for defender.
This is my pseudo-code:
I didn't found GameEvent/Event to trigger it, which one would suit? Or i don't need any event?
And i don't know how to change "combat" depending on % of damage received...
I still don't feel ok with lua, so please help here
I am working on huge mode that changes overall tactics and strategy of warfare in civ.
For example, Warrior with str 8 received 50% damage, down to 50/100.
So Warrior's str should be changed from 8 to 4 ( by half ).
I need it because i want to make attack in game more valuable. Currently when you attack enemy, you still has advantage dealing more damage, but it's a small one.
What i want it's if Warrior attacks another Warrior with both being at full health, it would end with something like 70-80/100 for attacker and 30-40/100 for defender.
This is my pseudo-code:
Code:
if Unit:GetDamage() then
Unit:SetBaseCombatStrength(int combat)
combat=% of Damage
end
end
I didn't found GameEvent/Event to trigger it, which one would suit? Or i don't need any event?
And i don't know how to change "combat" depending on % of damage received...
I still don't feel ok with lua, so please help here

I am working on huge mode that changes overall tactics and strategy of warfare in civ.