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

[Trigger] Help with Buff Spell

Level 11
Joined
Aug 11, 2009
Messages
594
I need help to make a spell that when cast, gives the caster and nearby allies a damage boost based on the casters Strength stat for 5 seconds.

Its for an RPG so it does not need to be completely MUI, each player can only have 1 Hero each.

The spell should not stack if cast multiple times or from different players. But preferably work like this:
- If the damage boost is the same as the one already active it refresh duration.
- If damage is higher it refresh duration with the new higher value.
- If boost is lower than the one already active it does nothing, but if its easier its ok if it refreshes duration with current damage boost aswell (i guess if its tracked with a active buff it would be easier with refresh).

I would prefer if the spell is in GUI or atleast setup of values is since i cant code in Jass.

I hope its not too complicated to make. Thanks in advance!
 
Level 20
Joined
Aug 29, 2012
Messages
841
If you're on the last version of the editor, we now have new super useful functions for this. You can base your spell on Battle Roar as it gives a flat damage bonus, instead of a % boost, then use an action like such:
  • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Battle Roar)'s Real Level Field: Damage Increase ('Nbr1') of Level: 0 to (Real((Strength of (Triggering unit) (Include bonuses))))
As for the stacking and whatnot, I suppose you can simply manually remove the buff from nearby friendlies in range once the spell is cast

Edit: looks like this
1693225318076.png

You can replace "battle roar" with your custom spell, but if you use another base spell, keep in mind the "real level field" must match what is used in the ability editor (note the "nbr1" that you can see with raw data)

1693225398675.png


Also, level 0 in the trigger = level 1 in the ability editor because obviously :D
 
Last edited:
Level 11
Joined
Aug 11, 2009
Messages
594
If you're on the last version of the editor, we now have new super useful functions for this. You can base your spell on Battle Roar as it gives a flat damage bonus, instead of a % boost, then use an action like such:
  • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Battle Roar)'s Real Level Field: Damage Increase ('Nbr1') of Level: 0 to (Real((Strength of (Triggering unit) (Include bonuses))))
As for the stacking and whatnot, I suppose you can simply manually remove the buff from nearby friendlies in range once the spell is cast

Edit: looks like this
View attachment 446487
You can replace "battle roar" with your custom spell, but if you use another base spell, keep in mind the "real level field" must match what is used in the ability editor (note the "nbr1" that you can see with raw data)

View attachment 446488

Also, level 0 in the trigger = level 1 in the ability editor because obviously :D
Wow that is amazing, didnt know about that :D it worked perfectly, thank you so much for the help :D
 
Top