PDA

View Full Version : [JASS] Detecting buff on unit


Cokemonkey11
06-09-2009, 02:12 AM
Hey, there. I have this in a damage detection trigger:


if GetUnitAbilityLevel(GetTriggerUnit(),'B016')>0 then //Captains Cannon
call UnitRemoveAbility(GetTriggerUnit(),'B016')
call floatingTextSizeIncrease("Captains Cannon!",GetUnitLoc(GetTriggerUnit()))
endif


What ability should I base it on? It needs to deal damage and give a buff for about 1 second without stunning.

NightSong
06-09-2009, 02:38 AM
Base it off of rejuvenation but give it negative regen and make it only castable on enemy units. Make the duration 1 second and the heal (damage) frequency .8 seconds and make the heal (damage) amount equal to the damage you want to deal. Change the art to whatever you want and voila.

Cokemonkey11
06-09-2009, 02:40 AM
I forgot to mention it needs to have a projectile, is that possible with rejuvenation?

NightSong
06-09-2009, 04:40 AM
Shadow strike has a projectile, and I'm sure you could mess around with the data fields a little bit so that you don't have any periodic damage and it doesn't slow. Then the only thing that would stick out is the initial damage has a little number (like 200!) that floats up when the projectile hits, but that might be cool with you?

If you're still against that, then you can have the ability be chain lightning and have a trigger that makes a dummy unit cast a separate spell that has a buff on the target of the chain lightning ability.

Hope that helps?