Ok, this shoooooould work, but I can't really test that right now, so hopefully my math is right.
Heal By Missing Health
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Heal
Actions
Set TempUnit = (Target unit of ability being cast)
Set Real1 = ((Max life of TempUnit) x 0.10) <-- this finds out what 10% of the unit's max health is
Set Real2 = (((Max life of TempUnit) - (Life of TempUnit)) / Real1) <-- this finds out how many times 10% of the max health is missing.
Set HealStrength = 25 <--This is whatever the base healing is.
Unit - Set life of TempUnit to ((Life of TempUnit) + (HealStrength x Real2)) <-- multiply healing power by how many times 10% is missing.
This will not work perfectly. It will activate even when, for example, 25% HP is missing. Let's say a unit has 200 HP and lost 25%. Now it's 150. Based on your calculation (200- 150) / 20 = 2.5
It means that the healing will be multiplied by 2.5 but that's not what the user asks for. It should be 2 because the 10% was lost twice only. Also, the user still didn't clarify how he would like the heal to be incremented. Why multiplying by HealStrength? Maybe he wants to 5 extra HP healed for every 10% HP missing.
ninehell, you need to give me more info before I can concoct a trigger about this.
Might want to brush up on your mathematics...The calculation would be: BaseHealValue * (1.1 * ((CurrentLife / MaxLife) *100))
FinalHealValue = BaseHealValue * (1 + 1.1 * (1 - CurrentLife / MaxLife))
// CurrentLife / MaxLife -> current life fraction
// (1 - CurrentLife / MaxLife) -> current life missing fraction
// 1.1 -> fractional form of healing power bonus when unit has 0% health (110%)
// 1.1 * (1 - CurrentLife / MaxLife) -> work out the healing bonus to apply as a fraction
// (1 + 1.1 * (1 - CurrentLife / MaxLife)) -> work out the power fraction to apply by adding the bonus fraction to the default damage fraction of 1
// BaseHealValue * (1 + 1.1 * (1 - CurrentLife / MaxLife)) -> work out heal amount by applying the power fraction
yea sorry it is indeed 1-CurrentLife/MaxLife