• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Playing with Negative Values Help!!!

Status
Not open for further replies.
Level 4
Joined
Apr 18, 2011
Messages
60
hehe its true playing with negative values mayber is not rigth but

to "heal" a unit you use "set unit hp (current unit hp + heal value)"

but you can negative damage that unit to simulate damage?????????????

damage that unit by -100 means 100 heal??????

wtf
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Yes, a negative times a negative makes a positive. Be aware that damage is subject to reductions while setting unit hitpoints is not. Correct healing behaviour like holy light on friendly living units actually gets reduced by magic reduction where as setting unit hitpoints bypasses all reduction.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
As DSG stated, you have to take into account that dealing damage means you have to calculate its spell/physical reduction

When a tooltips stated it heals 300 HP, if you're using damage as your healing method, then you have to know the risk of using damage as healing method because it will calculate the unit's armor (for physical damage) or unit's magic resistance (all hero-type unit naturally has 25% magic resistance), and the actual value on the tooltips can be misled
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
you can however use it in skills that lets say "deals damage, this skill is not affected by resistances"
for example in boss fights who have very high damage reduction otherwise
drawback is this doesn't count as unit kills unit event nor is eligible for the xp obtained while damage target is, iirc

or other things if you are creative
 
Status
Not open for further replies.
Top