• 🏆 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!

Abolish magic

Status
Not open for further replies.
Level 12
Joined
Apr 15, 2008
Messages
1,063
In my latest map (Dungeon Lords) I came upon a problem with abolish magic: how does the game recognize between positive and negative buffs?
It keeps removing both friendly buffs (inner fire and mana shield) and hostile (slow), while it should remove only negative buffs (when used on allied unit)

Edit: my mana shield is was fact based unholy frenzy, which should still be considered positive
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
actually, i believe you can
JASS:
function B2U takes buff b returns unit
 return b
 return null
endfunction
.......
GroupUnitAdd( B2U( 'BHav' ) )
But that is not the point!!!!!!!!


Edit: found this:
JASS:
native UnitRemoveBuffs (unit whichUnit, boolean removePositive, boolean removeNegative) returns nothing

consider solved, though I still don't know what is with the abolish magic
 
Level 12
Joined
Mar 16, 2006
Messages
992
Use channel and trigger the spell to remove every buff you want it to.

That's the only way you will get the exact results you have in mind.
 
Status
Not open for further replies.
Top