• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Intelligence used as healing

Status
Not open for further replies.
Level 5
Joined
Oct 20, 2019
Messages
60
Hello, i have this healing spell that provides bonus healing based of the casters intellect, it currently provides 130% of the casters intellect as bonus healing on all 5 levels.

  • Holy Light
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light (True)
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (1.30 x (Real((Intelligence of (Triggering unit) (Include bonuses))))))

I would like that bonus healing to increase at each lvl, like this:


Lvl 1 - 200 hitpoints and 130% of intelligence used as healing
Lvl 2 - 300 hitpoints and 160% of intelligence used as healing
Lvl 3 - 400 hitpoints and 190% of intelligence used as healing
Lvl 4 - 500 hitpoints and 220% of intelligence used as healing
Lvl 5 - 600 hitpoints and 250% of intelligence used as healing

How do i fix this?
 
Level 38
Joined
Feb 27, 2007
Messages
4,951
Set up an array where the index is the level of the spell:
  • //in init trigger
  • Set HFactor[1] = 1.30
  • Set HFactor[2] = 1.60
  • Set HFactor[3] = 1.90
  • Set HFactor[4] = 2.20
  • Set HFactor[5] = 2.50
  • //in cast trigger
  • Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + (HFactor[(Level of Holy Light for (Triggering Unit))] x (Real((Intelligence of (Triggering unit) (Include bonuses))))))
Or do some math. Instead of 1.30 it’s: 1.00 + 0.30x(level), use that instead.
 
Status
Not open for further replies.
Top