• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Shield of Just [v1.1]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
MUI: Yes
GUI: Yes

spells_3501_screenshot.jpg


Shield of Just

Creates a Shield of Just effect on the target character. This effect will block physical damage for 3-10 hits that last 15-30 seconds. Any Magic attack will do full damage to the affected target. When the shield was broken, an explosion will cause by it, silence and damage units in an AOE of 300.

* Level 1 - 3 blocks, last 15 seconds.
* Level 2 - 5 blocks, last 20 seconds.
* Level 3 - 7 blocks, last 25 seconds.
* Level 4 - 10 blocks, last 30 seconds.

Cooldown: 30/25/20/15


  • Shield of Just
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shield of Just
    • Actions
      • Set Shield_Unit = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Unit_Counts Equal to 100
        • Then - Actions
          • Set Unit_Counts = (Unit_Counts - 100)
        • Else - Actions
          • Set Unit_Counts = (Unit_Counts + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Shield of Just for Shield_Unit) Equal to 1
        • Then - Actions
          • Set Shield_BlockedHits[Unit_Counts] = 3
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Shield of Just for Shield_Unit) Equal to 2
            • Then - Actions
              • Set Shield_BlockedHits[Unit_Counts] = 5
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Shield of Just for Shield_Unit) Equal to 3
                • Then - Actions
                  • Set Shield_BlockedHits[Unit_Counts] = 7
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Shield of Just for Shield_Unit) Equal to 4
                    • Then - Actions
                      • Set Shield_BlockedHits[Unit_Counts] = 10
                    • Else - Actions
      • Unit - Set the custom value of Shield_Unit to Unit_Counts
      • Set Shield_Unit = No unit

  • Shield Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff Shield of Just ) Equal to True
    • Actions
      • Set Attacking = (Attacking unit)
      • Set Attacked = (Attacked unit)
      • Set Shield_BlockedHits[(Custom value of Attacked)] = (Shield_BlockedHits[(Custom value of Attacked)] - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Shield_BlockedHits[(Custom value of Attacked)] Less than or equal to 0
        • Then - Actions
          • Unit - Remove Shield of Just buff from Attacked
          • Set Attacked_Position = (Position of Attacked)
          • Set Attacking_Position = (Position of Attacking)
          • Floating Text - Create floating text that reads Shield Broke! at Attacked_Position with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 90.00 degrees
          • Set Shield_DummyPoint = (Attacked_Position offset by 50.00 towards (Angle from Attacked_Position to Attacking_Position) degrees)
          • Unit - Create 1 Dummy (The Holy Bomb) for (Owner of Attacked) at Shield_DummyPoint facing (Angle from Attacked_Position to Attacking_Position) degrees
          • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence Attacked_Position
          • Unit - Create 1 Dummy (The Holy Bomb) for (Owner of Attacked) at Shield_DummyPoint facing (Angle from Attacked_Position to Attacking_Position) degrees
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
          • Custom script: call RemoveLocation(udg_Shield_DummyPoint)
          • Custom script: call RemoveLocation(udg_Attacked_Position)
          • Custom script: call RemoveLocation(udg_Attacking_Position)
        • Else - Actions
          • Set Attacked_Position = (Position of Attacked)
          • Set Attacking_Position = (Position of Attacking)
          • Set Shield_DummyPoint = (Attacked_Position offset by 50.00 towards (Angle from Attacked_Position to Attacking_Position) degrees)
          • Unit - Create 1 Dummy (Shield of Just) for (Owner of Attacked) at Shield_DummyPoint facing (Angle from Attacked_Position to Attacking_Position) degrees
          • Custom script: call RemoveLocation(udg_Shield_DummyPoint)
          • Floating Text - Create floating text that reads Blocked! at Attacked_Position with Z offset 0.00, using font size 5.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 90.00 degrees
          • Custom script: call RemoveLocation(udg_Attacked_Position)
          • Custom script: call RemoveLocation(udg_Attacking_Position)
      • Set Attacked = No unit
      • Set Attacking = No unit
Versions
v1.1 - Rewrote some codings

v1.0 - Spell uploaded
Keywords:
shield, just, kyrie, eleison, block, silence, of, holy, gold, yellow, barrier, repel, reflect, absorb, damage
Contents

Contest Entry - Ribenamania (Map)

Reviews
12th Dec 2015 IcemanBo: Too long time as NeedsFix. Rejected. 13:22, 28th Aug 2010 TriggerHappy: Use some sort of equation to determine Shield_BlockedHits. As of now it's really ugly and only supports a few levels. Also, don't use custom...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long time as NeedsFix. Rejected.

13:22, 28th Aug 2010
TriggerHappy:

Use some sort of equation to determine Shield_BlockedHits.
As of now it's really ugly and only supports a few levels.

Also, don't use custom value, use hashtables. Custom value should be used for the indexing of all units in the map.

There's also no need to null your variables.
 
Level 7
Joined
Jun 6, 2010
Messages
224
uhm... not to be mean but i think you should not mess up with the custom values of units.
At least thats what "they say"

Edit: How does it block the attacks? All i see is a dummy created in the trigger.
Edit: oh... it's a wc3 ability that does the job
 
Last edited:

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
woah, first post after more than 2 yrs...

Heh :grin:
meaby i wasnt posting, but for sure i was here quite ofen, and last times even every day. I made a decision to start posting although i'm here since 2006 hive/wc3.search ;)

Errr, thank you? I do know that.
Unfortunately it uses GUI friendly damage system.
 
Last edited:
Level 7
Joined
Oct 13, 2008
Messages
300
Can't you just add an timer that turns off the spell after being attacked? For example, after executing the event where you get attacked, you could start an 0.20 Second timer. When the timer expires, it would turn the trigger back on so that you cannot spam stop... =P
 
Top