HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Adding and detecting buffs

05-13-2006, 03:26 AM#1
knutz
Hi,
During spell making session 3 one bit of feedback I got was I didn't add buffs to my victims, therefore it was incompatible with other spells.

I know how to add effects in JASS, but how do you add buffs? And how do you check for them? I'm also assuming that a spell would only want to check for temporary buffs, not permanent item related bonuses or for things like devotion aura - so without going through a big list, how do you check for compatibility before affecting a target with the spell?
05-13-2006, 03:39 AM#2
TaintedReality
You can either just use a dummy spell based off something like Slow or Cripple, or you can use the spellbook method. This method is putting an aura like Devotion Aura inside a spellbook, adding the spellbook to the unit, then disabling the spellbook. It gives the unit the buff assigned to your Devotion Aura, and stacks with all other buffs (including other Devotion Auras).

To check if a unit has a buff, use GetUnitAbilityLevel(unit,buffid)>0.
05-13-2006, 06:20 PM#3
karukef
Again, do not use the spellbook trick when you can have infinite invisible Slow Aura that adds buff.