• 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.

How to debuff a buff

Status
Not open for further replies.
Level 17
Joined
Jan 21, 2010
Messages
2,111
I make an item that debuffing poison state, such as shadow strike, poison arrow and anything that smiliar to it, but when i tested the item, the buff wont removed
I use periodic event to check whether the cure buff is on the unit or not
I also using another trig to turn on the periodic event
 
Use the event Unit - A unit starts the effect of an ability and then use Unit - Remove specific buff from (Target unit of ability being cast). Set your debuffs in a list in the Map Initialization, e.g.
  • T
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Buffs[1] = Shadow Strike
    • Set Buffs[2] = Poison Arrow
and then the action(s):
  • For each (Integer A) from 1 to 2, do (Actions)
    • Loop - Actions
      • If (All conditions are true) Then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) has Buffs[(IntegerA)]) Equal to True
        • Then - Actions
          • Unit - Remove Buffs[(IntegerA)] from (Target unit of ability being cast)
        • Else - Actions
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
Remove the buff ability.

Sound strage? Well it is...

Basically, buffs are known as a sub type of ability. Thus if you remove the ability with the ID (rawdata value) of the buff it will remove the buff. This is masked by GUI but inside the remove buff BJ is a remove ability call.

You can also remove all buffs of a certain type using a completly different buff type removal calls but I never tried that.

call UnitRemoveAbility(whichUnit, buffcode)
For removing a specific buff. usable with some easy parameter changes.

native UnitRemoveBuffs takes unit whichUnit,boolean removePositive,boolean removeNegative returns nothing
native UnitRemoveBuffsEx takes unit whichUnit,boolean removePositive,boolean removeNegative,boolean magic,boolean physical,boolean timedLife,boolean aura,boolean autoDispel returns nothing
For removing all buffs of certain type. Need to be called.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Here's a test map for you
Credits to Pharaoh for looping efficiency and setup trigger
Let the Gnoll attack you first, then you will be infected with Poison-type debuff, pick up the item and use it, EUREKA !
Same as Shadow Strike (I edited that ability so that you can target yourself ONLY (for testing purposes))
Use Shadow Strike on you and use the Antidote (based from Potion of Invisibility)
Base spell is Roar
Any question is you wanna ask, just ask.
 

Attachments

  • Simple Debuffing System.w3x
    13.3 KB · Views: 94
Status
Not open for further replies.
Top