• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! đź“… Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! đź”— Click here to enter!

[Solved] A bolt that heal allies and damege enemys

Level 12
Joined
Feb 13, 2012
Messages
403
hello i want to make some spell for a priest that is a bolt that is healing if tagetet an ally or if targeted an enemy damage them with added bonus damege to the undead 🙏
 
Level 12
Joined
Feb 5, 2018
Messages
521
I am sure you could have found out how to do this by reading some of the very basic tutorials. However I made it for you.

Base the ability on Channel. I used targets allowed: air,enemies,friend,ground,self,vulnerable

In this simple trigger we first check if the target is allied then we heal the target if the condition returns true.

Second we check if the target is enemy and also check afterwards if its undead. If its undead we deal 100 damage and if its an enemy unit we deal 50 damage.

  • Holy Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Bolt
    • Actions
      • Set VariableSet HolyBolt_Caster = (Triggering unit)
      • Set VariableSet HolyBolt_Target = (Target unit of ability being cast)
      • -------- We should set up damage here --------
      • -------- We could also add level scaling to set the damage --------
      • -------- Use Channel ability in the Object editor and set the targets allowed to your desire --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (HolyBolt_Target belongs to an ally of (Owner of HolyBolt_Caster).) Equal to True
        • Then - Actions
          • Unit - Set life of HolyBolt_Target to ((Life of HolyBolt_Target) + 50.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (HolyBolt_Target belongs to an enemy of (Owner of HolyBolt_Caster).) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (HolyBolt_Target is Undead) Equal to True
            • Then - Actions
              • Unit - Cause HolyBolt_Caster to damage HolyBolt_Target, dealing 100.00 damage of attack type Spells and damage type Magic
            • Else - Actions
              • Unit - Cause HolyBolt_Caster to damage HolyBolt_Target, dealing 50.00 damage of attack type Spells and damage type Magic
        • Else - Actions
 
Level 12
Joined
Feb 13, 2012
Messages
403
I am sure you could have found out how to do this by reading some of the very basic tutorials. However I made it for you.

Base the ability on Channel. I used targets allowed: air,enemies,friend,ground,self,vulnerable

In this simple trigger we first check if the target is allied then we heal the target if the condition returns true.

Second we check if the target is enemy and also check afterwards if its undead. If its undead we deal 100 damage and if its an enemy unit we deal 50 damage.

  • Holy Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Bolt
    • Actions
      • Set VariableSet HolyBolt_Caster = (Triggering unit)
      • Set VariableSet HolyBolt_Target = (Target unit of ability being cast)
      • -------- We should set up damage here --------
      • -------- We could also add level scaling to set the damage --------
      • -------- Use Channel ability in the Object editor and set the targets allowed to your desire --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (HolyBolt_Target belongs to an ally of (Owner of HolyBolt_Caster).) Equal to True
        • Then - Actions
          • Unit - Set life of HolyBolt_Target to ((Life of HolyBolt_Target) + 50.00)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (HolyBolt_Target belongs to an enemy of (Owner of HolyBolt_Caster).) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (HolyBolt_Target is Undead) Equal to True
            • Then - Actions
              • Unit - Cause HolyBolt_Caster to damage HolyBolt_Target, dealing 100.00 damage of attack type Spells and damage type Magic
            • Else - Actions
              • Unit - Cause HolyBolt_Caster to damage HolyBolt_Target, dealing 50.00 damage of attack type Spells and damage type Magic
        • Else - Actions
thats looks really usfel for my thank you but what if im using shadow strike as a base for the spell is there any diffrence ?
 

Attachments

  • 1698580833918.png
    1698580833918.png
    260.3 KB · Views: 3
  • 1698580853893.png
    1698580853893.png
    263.9 KB · Views: 3
Level 12
Joined
Feb 5, 2018
Messages
521
thats looks really usfel for my thank you but what if im using shadow strike as a base for the spell is there any diffrence ?
Proably not. I guess we can only find out if you test the tigger with shadow strike as base skill :)

But if you want to use a missile then you should use this Relativistic Missiles [vJASS][LUA][GUI]

You can add the condition checks and the damage/healing to the Missile On Hit trigger then.
 
Level 12
Joined
Feb 13, 2012
Messages
403
Proably not. I guess we can only find out if you test the tigger with shadow strike as base skill :)

But if you want to use a missile then you should use this Relativistic Missiles [vJASS][LUA][GUI]

You can add the condition checks and the damage/healing to the Missile On Hit trigger then.
it works :D just need find a way to get rid of the shadow daggersound when the bolt hits the target is there avuff i can make that has no effect that will maby shot the sound ?
 
Level 12
Joined
Feb 5, 2018
Messages
521
it works :D just need find a way to get rid of the shadow daggersound when the bolt hits the target is there avuff i can make that has no effect that will maby shot the sound ?

You can try to set the sound to NONE or alternatively try to change the sound to something else like Holy Light. I think you should also make a custom buff proably with no sound and change that buff to the buff field. Some of the sounds are a bit hard to get rid of :D
 
Level 12
Joined
Feb 13, 2012
Messages
403
You can try to set the sound to NONE or alternatively try to change the sound to something else like Holy Light. I think you should also make a custom buff proably with no sound and change that buff to the buff field. Some of the sounds are a bit hard to get rid of :D
thx i alredy figerd it out :D :ogre_haosis:
 
Level 12
Joined
Feb 13, 2012
Messages
403
qustion that i just now found out , how can i make it that the spell cant by used on ally undead ?
 
Level 12
Joined
Feb 5, 2018
Messages
521
Oh just add condition here HolyBolt_Target not equal to undead. And also keep the old condition. Since this by default checks if all conditions are true.
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • empty.gif
    line.gif
    joinminus.gif
    cond.gif
    If - Conditions
    • empty.gif
      line.gif
      line.gif
      joinbottom.gif
      if.gif
      (HolyBolt_Target belongs to an ally of (Owner of HolyBolt_Caster).) Equal to True
  • empty.gif
    line.gif
    joinminus.gif
    actions.gif
    Then - Actions
    • empty.gif
      line.gif
      line.gif
      joinbottom.gif
      unit.gif
      Unit - Set life of HolyBolt_Target to ((Life of HolyBolt_Target) + 50.00)
 
Level 12
Joined
Feb 13, 2012
Messages
403
Oh just add condition here HolyBolt_Target not equal to undead. And also keep the old condition. Since this by default checks if all conditions are true.
something like this ? becuas i think i did it wrong and it dosnt work like i wanted


1701020205716.png
 
Top