How to cast paladin's Divine Shield on other allied units?

Zerox

Ultra Cool Member
Reaction score
28
Hey I'm trying to recreate a the Unholy Armor skill from wc2 which grants temporary invulnerability to one unit but isn't usable on the caster. To do this I thought why not just use Divine Shield and make it castable onto other allied units but not the caster themself.

Only problem is I can't figure out how to do this. Can anyone help me? I'll give +rep to anyone who tries to help. :thup:

Zerox
 

Skippy

Active Member
Reaction score
39
Use trigger:
Trigger:
  • TRIGGER
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Unit - Make (Target unit of ability being cast) Invulnerable
      • Wait 10.00 game-time seconds
      • Unit - Make (Target unit of ability being cast) Vulnerable
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
Use trigger:
Trigger:
  • TRIGGER
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Unit - Make (Target unit of ability being cast) Invulnerable
      • Wait 10.00 game-time seconds
      • Unit - Make (Target unit of ability being cast) Vulnerable

That's a bad trigger. Waits never work that well, plus I think that leaks. Also there is no special effect or buff to show the unit is invulnerable.

When you get the unit to cast a dummy spell, add a disabled spell book to the hero. Put the divine shield spell in there and get the target to cast it.
 

Moridin

Snow Leopard
Reaction score
144
I suggest you don't use divine shield as a base spell. Divine shield has a buff called divine shield I think (or maybe invulnerability). Take an allied target casting spell like....Regeneration (Druid of the Claw), set the amount regened to 0, and give it the same buff as divine shield would. Then just alter the art.
 

Skippy

Active Member
Reaction score
39
My trigger works, but it schould be upgraded. It probably leaks, so add point variable and set it to Target of ability being cast. And replace wait with timer.
 

Bloodydood

New Member
Reaction score
14
Trigger:
  • Test
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Unit - Add Divine Shield to (Target unit of ability being cast)
      • Unit - Order (Target unit of ability being cast) to Human Paladin - Activate Divine Shield
      • Unit - Remove Divine Shield from (Target unit of ability being cast)
 

Skippy

Active Member
Reaction score
39
That will add icon of Divine Shield to target unit for a period of duration.
 

Rainther

I guess I should write something of value here...
Reaction score
61
Not visually. It uses it the same second it dissapears since divine shield is instant and have time to be used during. It may however interrupt channels etc.
 

lh2705

Just another Helper
Reaction score
111
Event
A unit starts the effect of an ability
Condition
Ability being cast equal to Something
Actions
Set Target = Target Unit of ability being cast
Make Target Invulnerable
<<Add the divine shield special effect to the origin of the target>>(Sorry forgot the command)
Set Effect = Last Created Special Effect
Wait 10 game time seconds
Make Target Vulnerable
Destroy Effect

Something = A dummy ability with no buffs and effects. Chain Lightning is a good dummy ability base.

This is one way you can do it. Its not very good as its not so effective if you want to cast it within the time period given as the unit stored into variable changes. Hence it will cause more problems.

Here is another way for you to do it.
Base a dummy spell of rejuvenation.
Set the amount healed to 0.
Set the duration(How long the divine shield would last)
Create a new positive buff(based off rejuvenation or even divine shield would be fine), this makes the description of the buffs come out green instead of red on a negative buff. Change the effect to the divine shield effect, change the description to whatever you like.
Go back to your ability and set the buff to the new buff you created.

Make a trigger like this.
Code:
Trigger
    Events
        Time - Every 0.25 seconds of game time
    Conditions
    Actions
        Custom script:   set bj_wantDestroyGroup=true
        Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
            Loop - Actions
                If (((Picked unit) has buff Divine Shield** ) Equal to False) then do Unit - Make Picked Unit Vulnerable else Unit - Make Picked Unit Invulnerable

The divine shield buff is the new buff you created.

This trigger is much better as it doesn't involve any variables. The spell would then be MUI, you could continuously cast it as many times as you like without any problems.

Hope it helps :D
 

Zerox

Ultra Cool Member
Reaction score
28
I appreciate all of your help and I think they all made sense and would work to an extent but lh2705's second method seems to be the best way we've figured out and so I'll use that. Thanks everyone. The simpler stuff helped me understand his to an extent more and I appreciate it. I'll give +rep to all as promised.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top