Hi ^^
I hope I'm not bothering you , I need some help with a trigger.
It works, but only for ennemies. They cant use it agains me.
(The original spell work on me and it seems my unit get wanter from the wierd patern it follow, but I don't get the debuff based on Drunken haze )
Here's the code, I'm pretty sure it got something to do with local unit u, but I don't realy know JASS and I'm not sure how to correct this.
I hope I'm not bothering you , I need some help with a trigger.
It works, but only for ennemies. They cant use it agains me.
(The original spell work on me and it seems my unit get wanter from the wierd patern it follow, but I don't get the debuff based on Drunken haze )
Here's the code, I'm pretty sure it got something to do with local unit u, but I don't realy know JASS and I'm not sure how to correct this.
Trigger:
- Confusion H
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- ((Ability being cast) Equal to Confusion (H)) or ((Ability being cast) Equal to Confusion (M))
- Actions
- Custom script: local unit u
- Set intIntell[0] = (Intelligence of (Triggering unit) (Include bonuses))
- Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
- Unit - Add Confusion (STATUS)(Part II) to (Last created unit)
- Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Target unit of ability being cast)
- Unit - Cause (Last created unit) to damage (Target unit of ability being cast), dealing (0.50 x (Real(intIntell[0]))) damage of attack type Pierce and damage type Normal
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Set intTARGET[2] = (Target unit of ability being cast)
- Unit - Add Wander (Neutral) to (Target unit of ability being cast)
- Custom script: set u = udg_intTARGET[2]
- Wait 10.00 seconds
- Custom script: set udg_intTARGET[2] = u
- Unit - Remove Wander (Neutral) from intTARGET[2]
- Custom script: set u = null
- Events