[Spell] A war stomp spell that heals

Level 7
Joined
Sep 30, 2017
Messages
100
I want a spell that acts like a normal Tauren Chieftain stomp ability, but I want it to heal and give mana for each hit unit. I don't know how to do it, really. Can anyone help?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
I want a spell that acts like a normal Tauren Chieftain stomp ability, but I want it to heal and give mana for each hit unit. I don't know how to do it, really. Can anyone help?
That's a little vague, do you just want a non-targeted AoE ability or do you want War Stomp's damage, Stun buff, Targeting enemy ground units, etc.

Edit: I think I understand now. You can create a pretty simple although not perfect setup like this:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to War Stomp
  • Actions
    • Set Variable Point = (Position of (Triggering unit))
    • Set Variable Group = (Units within 300.00 range of Point)
    • Set Variable Count = 0
    • Unit Group - Pick every unit in Group and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Picked unit) is alive) Equal to True
            • ((Picked unit) is A ground unit) Equal to True
            • ((Picked unit) belongs to an enemy of (Triggering player)) Equal to True
          • Then - Actions
            • Set Variable Count = (Count + 1)
          • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Count Greater than 0
      • Then - Actions
        • Set Variable BonusLife = (50.00 x (Real(Count))
        • Set Variable BonusMana = (25.00 x (Real(Count))
        • Unit - Set Life of (Triggering unit) to (Life of (Triggering unit) + BonusLife)
        • Unit - Set Mana of (Triggering unit) to (Mana of (Triggering unit) + BonusMana)
      • Else - Actions
    • Custom script: call RemoveLocation( udg_Point )
    • Custom script: call DestroyGroup( udg_Group )
Variable Names / Types:
Point = Point
Group = Unit Group
Count = Integer
BonusLife = Real
BonusMana = Real

1) When calculating the Bonus variables you'll need to use the Arithmetic function and also convert Count to a Real since you can only do arithmetic on variables of the same type -> (Real + Real, Integer + Integer).

2) You can scale the BonusLife and BonusMana based on Ability level, for example:
  • -------- Calculate heal amount --------
  • Set Variable Amount = (10.00 x (Real(Level of (Ability being cast)))
  • Set Variable BonusLife = (Amount x (Real(Count))
  • -------- Then calculate mana amount --------
  • Set Variable Amount = (5.00 x (Real(Level of (Ability being cast)))
  • Set Variable BonusMana = (Amount x (Real(Count))
^ That'll heal 10/20/30 life and 5/10/15 mana per unit hit.

3) Use better variable names than this, for example, prefix them with "WS_" or "WarStomp_". You want to distinguish this apart from anything else that you might create or import into the Trigger Editor.

4) The reason this isn't perfect is that the Area of Effect of an ability takes into consideration unit collision size while the "units in range" Unit Group function does not. That means you'll get cases where hit units don't get counted or unhit units do get counted. You should be able to fix it using some examples in here:
 
Last edited:
Level 12
Joined
Nov 13, 2010
Messages
277
i think it was this you was hoping for i also add a map ( edit uncle trigger will work better for you ! )
  • war stump
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to War Stomp
    • Actions
      • Set VariableSet Caster = (Triggering unit)
      • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
      • Unit Group - Pick every unit in (Units within 300.00 of TempPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Casting unit)).) Equal to True) and (((Matching unit) is alive) Equal to True))).) and do (Actions)
        • Loop - Actions
          • Set VariableSet Target = (Picked unit)
          • Unit - Cause Caster to damage (Picked unit), dealing 0.00 damage of attack type Spells and damage type Normal
          • Set VariableSet HealAmount = 50.00
          • Set VariableSet ManaAmount = 25.00
          • Unit - Set life of Caster to ((Percentage life of Caster) + HealAmount)%
          • Unit - Set mana of Caster to ((Percentage mana of Caster) + ManaAmount)%
          • Special Effect - Create a special effect attached to the overhead of Caster using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempPoint)
 

Attachments

  • war Stomp.w3m
    14.2 KB · Views: 1
Top