- Joined
- Sep 14, 2009
- Messages
- 284
Hi. Im trying to make a version of League of Legend's Olaf's Berserker Rage ability.
Berserker Rage increases his attack speed by 1% for each 1% health he is missing.
However, my ability has 5 levels, and does NOT need to be MUI.
Level 1: Increases attack speed by 1% for each 5% of health missing.
Level 2: Increases attack speed by 1% for each 4% of health missing.
Level 3: Increases attack speed by 1% for each 3% of health missing.
Level 4: Increases attack speed by 1% for each 2% of health missing.
Level 5: Increases attack speed by 1% for each 1% of health missing.
The unit has 2 abilities. The first ability that has 5 levels with tooltips etc. The other ability (dummy, not visible) has 101 levels and is based on the Item Attack Speed Bonus ability, with level 1 giving 0% attack speed, level 2 giving 1% attack speed, level 51 giving 50%, and level 101 giving 100%. You get the idea.
I do NOT need help with the events that triggers the effect, only the formula to adjust the level of the Item Attack Speed ability based on the unit's missing health.
My current formula is like this:
But it does not give logical results.
Berserker Rage increases his attack speed by 1% for each 1% health he is missing.
However, my ability has 5 levels, and does NOT need to be MUI.
Level 1: Increases attack speed by 1% for each 5% of health missing.
Level 2: Increases attack speed by 1% for each 4% of health missing.
Level 3: Increases attack speed by 1% for each 3% of health missing.
Level 4: Increases attack speed by 1% for each 2% of health missing.
Level 5: Increases attack speed by 1% for each 1% of health missing.
The unit has 2 abilities. The first ability that has 5 levels with tooltips etc. The other ability (dummy, not visible) has 101 levels and is based on the Item Attack Speed Bonus ability, with level 1 giving 0% attack speed, level 2 giving 1% attack speed, level 51 giving 50%, and level 101 giving 100%. You get the idea.
I do NOT need help with the events that triggers the effect, only the formula to adjust the level of the Item Attack Speed ability based on the unit's missing health.
My current formula is like this:
But it does not give logical results.
- BerserkerRageAbilityTrigger
-
Actions
- Set TempRealA = ((((Max Life of "Unit") - (Life of "Unit")) / (Max life of "Unit")) x (0.20 x (Real((Level of "Olaf" - "Berserker Rage" for "Unit")))))
- Unit - Set level of "Olaf" - "Berserker Rage" (Attack Speed Bonus) for "Unit" to ((Integer(TempRealA)) + 1)