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

Armor System v 1.3

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Small system pack that contains 2 systems. These systems can be used for creating spells ex. deal 2*your armor, or decreases enemy armor by 50%.
  • Armor Counter
  • Reduction Counter
Armor and Reduction counter
This system count units current armor and reduction.

[trigger=Armor System Event]Armor System Event
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Check Armor
Actions
Trigger - Turn on Armor System Core <gen>
-------- Set Restoring Value --------
Set Unit = (Target unit of ability being cast)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Size of inventory for (Target unit of ability being cast)) Greater than or equal to 1
Then - Actions
Hero - Create Increases Hp + 1000 and give it to (Target unit of ability being cast)
Else - Actions
Unit - Add Inventory Custom to (Target unit of ability being cast)
Hero - Create Increases Hp + 1000 and give it to (Target unit of ability being cast)
Unit - Remove Inventory Custom from (Target unit of ability being cast)
Set Real[5] = (Percentage life of (Target unit of ability being cast))
Unit - Set life of (Target unit of ability being cast) to 100.00%
Unit - Cause Unit to damage Unit, dealing 50.00 damage of attack type Chaos and damage type Normal
Set Integer = 0
[/trigger]
[trigger=Armor System Core]Armor System Core
Events
Conditions
Actions
Trigger - Turn off (This trigger)
-------- Set Damage Taken for heal --------
Set Real[1] = (Damage taken)
-------- Get unit real reduction (In %) --------
Set Real[2] = ((2.00 x (50.00 - (Damage taken))) / 100.00)
-------- Get unit Armor --------
Set Real[3] = ((Real[2] / (1.00 - Real[2])) / 0.06)
-------- Start Timer that will heal unit (Couse damage that unit have take) --------
Countdown Timer - Start Timer as a One-shot timer that will expire in 0.00 seconds
Set Real[4] = (Real[2] x 100.00)

[/trigger]
[trigger=Armor System Restore]Armor System Restore
Events
Time - Armor_Timer expires
Conditions
Actions
-------- Heal Unit --------
Unit - Set life of Armor_Unit[1] to Armor_Real[5]%
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Size of inventory for Armor_Unit[1]) Greater than or equal to 1
Then - Actions
Hero - Create Increases Hp - 1000 and give it to Armor_Unit[1]
Else - Actions
Unit - Add Inventory Custom to Armor_Unit[1]
Hero - Create Increases Hp - 1000 and give it to Armor_Unit[1]
Unit - Remove Inventory Custom from Armor_Unit[1]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Armor_Spell_ID Equal to 0
Then - Actions
Cinematic - Clear the screen of text messages for (All players)
Game - Display to (All players) the text: (|cffFFCC00Unit Armor |r: + (String(Armor_Real[3])))
Game - Display to (All players) the text: (|cffFFCC00Unit Reduction |r: + (String(Armor_Real[4])))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Armor_Spell_ID Equal to 1
Then - Actions
Countdown Timer - Start Armor_Timer_2 as a One-shot timer that will expire in 0.00 seconds
Else - Actions
[/trigger]
Example :

[trigger=Shield Bash Init]Shield Bash Init
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shield Bash
Actions
Trigger - Turn on Armor System Core <gen>
-------- Set All Informations --------
Set Armor_Unit[1] = (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Size of inventory for (Triggering unit)) Greater than or equal to 1
Then - Actions
Hero - Create Increases Hp + 1000 and give it to (Triggering unit)
Else - Actions
Unit - Add Inventory Custom to (Triggering unit)
Hero - Create Increases Hp + 1000 and give it to (Triggering unit)
Unit - Remove Inventory Custom from (Triggering unit)
Set Armor_Real[5] = (Percentage life of (Triggering unit))
Unit - Set life of (Triggering unit) to 100.00%
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 50.00 damage of attack type Chaos and damage type Normal
Set Armor_Spell_ID = 1
Set Armor_Unit[2] = (Target unit of ability being cast)

[/trigger]
[trigger=Shield Bash Effect]Shield Bash Effect
Events
Time - Armor_Timer_2 expires
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of Armor_Unit[2]) Greater than (2.00 x Armor_Real[3])
Then - Actions
-------- Direct remove Hp --------
Unit - Set life of Armor_Unit[2] to ((Life of Armor_Unit[2]) - (Armor_Real[3] x 2.00))
Else - Actions
-------- Kill unit --------
Unit - Cause Armor_Unit[1] to damage Armor_Unit[2], dealing 9999999.00 damage of attack type Spells and damage type Normal
Floating Text - Create floating text that reads (String((Integer((2.00 x Armor_Real[3]))))) above Armor_Unit[2] with Z offset 30.00, using font size 9.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 40.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds

[/trigger]
Know bugs and Limits
  • After spell you get 100% real armor value (value in UI is not 100% true)
  • Does not work for negative armor values
Notes
  • Give credit if use in your map
  • These system need to have 0.06 Armor damage reduction multiplier (you can change it)
  • There is spell Shield Bash in map that deal 2x Casting unit's armor
Plz rate and comment


Keywords:
Armor, Reduction, Armor Type, Counter
Contents

Armor System (Map)

Reviews
19:39, 12th Jul 2010 TriggerHappy: You are globally ignored. Go to admin contact to resolve this. hvo-busterkomo: The spell leaks, is not efficient, and overall is not an unacceptable iteration of an armour system.
Status
Not open for further replies.

Moderator

M

Moderator

19:39, 12th Jul 2010
TriggerHappy:

You are globally ignored.
Go to admin contact to resolve this.

hvo-busterkomo:
The spell leaks, is not efficient, and overall is not an unacceptable iteration of an armour system.
 
Status
Not open for further replies.
Top