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

Simple protoss shield system

This bundle is marked as pending. It has not been reviewed by a staff member yet.
A simple Brood War protoss shield-like system (including shield armour and regeneration boni) along with some abilities (passive and active) which affect both positively and negatively the shields.

What it offers:
  • a StarCraft-like shield system using the 1.32+ inbuilt GUI damage events and conditions that ignores or not (depending on the user's desire) unit armour
  • value based shield regeneration, percentage based shield and value based armour upgrades; these then become base values
  • auras: value shield regeneration and degeneration, value shield increase and decrease, percentage shield armour increase and decrease; these abilities are based on dummy tech to track the level of the caster's ability
  • AoE abilities: percentage shield regeneration and degeneration (based on Silence which triggers a buff but cannot be simultaneously used on the same unit/hero caster due to the same order id; the first can be dispelled, the second cannot as it uses a dummy buff ability based on Cloak of Flames but also requires a dummy cooldown ability which was based on a huge amount of mana costing Berserk); the rest are based on Channel (different order ids so they can be used on the same unit/hero caster) and cannot be dispelled as they follow the same deal as shield degeneration: percentage shield increase and decrease, value shield armour increase and decrease

Limitations:
  • shield regeneration takes place once in 1 second; there's no sophisticated formula to calculate regeneration for milliseconds depending on how big the regeneration or decrease is
  • the game also lags quite badly if the shield carrying units are hit very fast and all at the same time like when being damaged by multiple Mutalisk/Huntress type units or by very fast attacking area splash damage units; possibly mostly due to the shield hit FX rendering
  • there is no custom UI to show the shield other than clicking on the unit and reading it near its name; there's a shield hit FX though so if it triggers it means the unit still has shields on
  • the |n feature is broken in 1.32+ and the shield and shield armour values can't be put under the unit name and are after (rather, in) it which necessitates using a short unit name for all the text to show
  • in 1.32+ hero proper and unit name changing is bugged so sadly, the shield doesn't work/show on heroes
  • custom abilities with percentage value increase or decrease act on base real values rather than being dynamic; I tried but I kept getting wrong values and soon lost interest or I'd have lost my sanity
  • the (original) game's auras are in a way bugged as they do not perfectly apply or deactivate; there's a lag with the latter and they don't always if ever apply or deactivate at the same time when coming from the same caster
  • the shield FX might remain behind when very fast moving shield using units are hit

Additional info:
  • there are two units to test the shield with: the Footman and Dragonhawk.
  • can be tested against blue marines shooting one target at a time (left upper corner of the map), vs Hydralisks with Moon Glaive (upper right corner) who shoot as Mutalisks hitting 2 random targets in a row after the first damaged one, or by attacking with the splash damage red marines

  • Shield On
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Entering unit)) Equal to Footman
          • (Unit-type of (Entering unit)) Equal to Dragonhawk
    • Actions
      • Set VariableSet ShieldUnitVar = (Entering unit)
      • Set VariableSet ShieldIndex = (Custom value of ShieldUnitVar)
      • -------- Check Dead Indexed to Replace --------
      • -------- SHIELDS ON --------
      • -------- Add to Main Group --------
      • Unit Group - Add ShieldUnitVar to ShieldGroup
      • -------- Add and Hide Shield Abilities --------
      • Unit - Add Protoss Shields and Armour (Dummy Ability) to ShieldUnitVar
      • Unit - For ShieldUnitVar, Ability Protoss Shields and Armour (Dummy Ability), Hide ability: True
      • -------- Zealot Shield - Max Value (+shield value upgrade) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of ShieldUnitVar) Equal to Footman
        • Then - Actions
          • Set VariableSet ShieldValueDefaultMax[ShieldIndex] = 300.00
          • -------- Shield FX Offset, Height and Scale --------
          • Set VariableSet ShieldFXOffset[ShieldIndex] = 50.00
          • Set VariableSet ShieldFXHeight[ShieldIndex] = 50.00
          • Set VariableSet ShieldFXScale[ShieldIndex] = 0.50
        • Else - Actions
          • -------- Scout Shield - Max Value (+shield value upgrade) --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of ShieldUnitVar) Equal to Dragonhawk
            • Then - Actions
              • Set VariableSet ShieldValueDefaultMax[ShieldIndex] = 400.00
              • -------- Shield FX Offset, Height and Scale --------
              • Set VariableSet ShieldFXOffset[ShieldIndex] = 75.00
              • Set VariableSet ShieldFXHeight[ShieldIndex] = 50.00
              • Set VariableSet ShieldFXScale[ShieldIndex] = 1.00
            • Else - Actions
              • -------- Tassadar Shield - Max Value (+shield value upgrade) --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of ShieldUnitVar) Equal to Far Seer
                • Then - Actions
                  • Set VariableSet ShieldValueDefaultMax[ShieldIndex] = 600.00
                  • -------- Shield FX Offset, Height and Scale --------
                  • Set VariableSet ShieldFXOffset[ShieldIndex] = 75.00
                  • Set VariableSet ShieldFXHeight[ShieldIndex] = 50.00
                  • Set VariableSet ShieldFXScale[ShieldIndex] = 1.00
                • Else - Actions
      • Set VariableSet ShieldValueDefaultMaxNUpg[ShieldIndex] = (ShieldValueDefaultMax[ShieldIndex] + ((ShieldValueDefaultMax[ShieldIndex] / 100.00) x (10.00 x (Real((Current research level of Protoss Shields Value Upgrade for (Owner of ShieldUnitVar)))))))
      • Set VariableSet ShieldValueMax[ShieldIndex] = ShieldValueDefaultMaxNUpg[ShieldIndex]
      • -------- Shield Armour (+upgrade/research bonus) and Unit Name --------
      • Set VariableSet ShieldArmourDefault[ShieldIndex] = (5.00 x (Real((Current research level of Protoss Shields Armour Upgrade for (Owner of ShieldUnitVar)))))
      • Set VariableSet ShieldArmourMax[ShieldIndex] = ShieldArmourDefault[ShieldIndex]
      • Set VariableSet ShieldValueCurrent[ShieldIndex] = ShieldValueMax[ShieldIndex]
      • Set VariableSet ShieldUnitNameStr[ShieldIndex] = (Name of ShieldUnitVar)
      • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
  • Shield Units Exclude on Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Protoss Shields and Armour (Dummy Ability) for (Dying unit)) Equal to 1
    • Actions
      • Set VariableSet ShieldUnitVar = (Dying unit)
      • Unit Group - Remove ShieldUnitVar from ShieldGroup.
  • Shield PreDamage
    • Events
      • Unit - A unit About to take damage
    • Conditions
      • (Level of Protoss Shields and Armour (Dummy Ability) for (Damage Target)) Equal to 1
      • (Damage taken) Less than or equal to ShieldValueCurrent[(Custom value of (Damage Target))]
    • Actions
      • Event Response - Set Damage Type of Unit Damaged Event to Magic
  • Shield Damage
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Level of Protoss Shields and Armour (Dummy Ability) for (Damage Target)) Equal to 1
    • Actions
      • Set VariableSet ShieldUnitVar = (Damage Target)
      • Set VariableSet ShieldIndex = (Custom value of ShieldUnitVar)
      • Set VariableSet DamageSourceVar = (Damage source)
      • -------- SHIELD DAMAGED --------
      • -------- Damage Lesser than Shield Armour --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Damage taken) Less than or equal to ShieldArmourMax[ShieldIndex]
          • ShieldValueCurrent[ShieldIndex] Greater than or equal to (Damage taken)
        • Then - Actions
          • Event Response - Set Damage of Unit Damaged Event to 0.00
        • Else - Actions
          • -------- Damage Greater than Shield Armour --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Damage taken) Greater than ShieldArmourMax[ShieldIndex]
              • ShieldValueCurrent[ShieldIndex] Greater than or equal to ShieldArmourMax[ShieldIndex]
            • Then - Actions
              • Event Response - Set Damage of Unit Damaged Event to ((Damage taken) - ShieldArmourMax[ShieldIndex])
            • Else - Actions
      • -------- Damage Greater than Shield Value --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Damage taken) Greater than ShieldValueCurrent[ShieldIndex]
          • ShieldValueCurrent[ShieldIndex] Greater than or equal to 0.00
        • Then - Actions
          • Event Response - Set Damage of Unit Damaged Event to ((Damage taken) - ShieldValueCurrent[ShieldIndex])
          • Set VariableSet ShieldValueCurrent[ShieldIndex] = 0.00
        • Else - Actions
          • -------- Damage Lesser than Shield Value --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Damage taken) Less than or equal to ShieldValueCurrent[ShieldIndex]
              • ShieldValueCurrent[ShieldIndex] Greater than or equal to 0.00
            • Then - Actions
              • Set VariableSet ShieldValueCurrent[ShieldIndex] = (ShieldValueCurrent[ShieldIndex] - (Damage taken))
              • Event Response - Set Damage of Unit Damaged Event to 0.00
            • Else - Actions
      • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
      • -------- Shield FX --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShieldValueCurrent[ShieldIndex] Greater than 0.00
        • Then - Actions
          • Set VariableSet ShieldFXPoint = ((Position of ShieldUnitVar) offset by ShieldFXOffset[ShieldIndex] towards (Angle from (Position of ShieldUnitVar) to (Position of DamageSourceVar)) degrees.)
          • Special Effect - Create a special effect at ShieldFXPoint using BoneArmorCasterTC.mdx
          • Set VariableSet ShieldFX01 = (Last created special effect)
          • Special Effect - Create a special effect at ShieldFXPoint using HexagonShield.mdx
          • Set VariableSet ShieldFX02 = (Last created special effect)
          • Special Effect - Set Height of ShieldFX01 to: ((Default flying height of ShieldUnitVar) + ShieldFXHeight[ShieldIndex])
          • Special Effect - Set Height of ShieldFX02 to: ((Default flying height of ShieldUnitVar) + ShieldFXHeight[ShieldIndex])
          • Special Effect - Set Scale of ShieldFX01 to ShieldFXScale[ShieldIndex]
          • Special Effect - Set Scale of ShieldFX02 to ShieldFXScale[ShieldIndex]
          • Set VariableSet DamageSourcePoint = (Position of DamageSourceVar)
          • Set VariableSet DamageTargetPoint = (Position of ShieldUnitVar)
          • Special Effect - Set Yaw of ShieldFX01 to: (Radians((Angle from DamageTargetPoint to DamageSourcePoint)))
          • Special Effect - Set Yaw of ShieldFX02 to: (Radians((Angle from DamageTargetPoint to DamageSourcePoint)))
          • Special Effect - Set Alpha of ShieldFX01 to 255
          • Special Effect - Set Alpha of ShieldFX02 to 255
          • Special Effect - Set Color of ShieldFX01 to color of (Player((Random integer number between 1 and 28)))
          • Special Effect - Set Color of ShieldFX02 to color of (Player((Random integer number between 1 and 28)))
          • Special Effect - Set Time Scale of ShieldFX01 to 8.00
          • Special Effect - Set Time Scale of ShieldFX02 to 8.00
          • Special Effect - Set Time of ShieldFX01 to 0.10
          • Special Effect - Set Time of ShieldFX02 to 0.10
          • Special Effect - Destroy ShieldFX01
          • Special Effect - Destroy ShieldFX02
          • Custom script: call RemoveLocation (udg_ShieldFXPoint)
          • Custom script: call RemoveLocation (udg_DamageSourcePoint)
          • Custom script: call RemoveLocation (udg_DamageTargetPoint)
        • Else - Actions
  • Shield Regenerate
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- Shield Regeneration --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • -------- Shield Group --------
          • Unit Group - Pick every unit in ShieldGroup and do (Actions)
            • Loop - Actions
              • Set VariableSet ShieldUnitVar = (Picked unit)
              • Set VariableSet ShieldIndex = (Custom value of ShieldUnitVar)
              • -------- Value over Shield Fix --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ShieldValueCurrent[ShieldIndex] Greater than ShieldValueMax[ShieldIndex]
                • Then - Actions
                  • Set VariableSet ShieldValueCurrent[ShieldIndex] = ShieldValueMax[ShieldIndex]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                • Then - Actions
                  • -------- Plus Regeneration Upgrade Bonus --------
                  • Set VariableSet ShieldValueCurrent[ShieldIndex] = ((ShieldValueCurrent[ShieldIndex] + 1.00) + (1.00 x (Real((Current research level of Protoss Shields Regeneration Upgrade for (Owner of ShieldUnitVar))))))
                  • -------- Shield Regeneration Value Tracker --------
                  • Set VariableSet ShieldReDegeneraionTracker[ShieldIndex] = (1.00 + (1.00 x (Real((Current research level of Protoss Shields Regeneration Upgrade for (Owner of ShieldUnitVar))))))
                  • -------- Aura Bonus --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (ShieldUnitVar has buff Shield Regeneration Aura ) Equal to True
                    • Then - Actions
                      • Set VariableSet ShieldValueCurrent[ShieldIndex] = (ShieldValueCurrent[ShieldIndex] + (1.00 x (Real((Current research level of Shield Regeneration Aura (Dummy Research) for (Owner of ShieldUnitVar))))))
                      • -------- Shield Regeneration Value Tracker --------
                      • Set VariableSet ShieldReDegeneraionTracker[ShieldIndex] = (ShieldReDegeneraionTracker[ShieldIndex] + (1.00 x (Real((Current research level of Shield Regeneration Aura (Dummy Research) for (Owner of ShieldUnitVar))))))
                    • Else - Actions
                  • -------- Aura Bonus Substraction --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (ShieldUnitVar has buff |cffff0000Shield Degeneration Aura|r ) Equal to True
                    • Then - Actions
                      • Set VariableSet ShieldValueCurrent[ShieldIndex] = (ShieldValueCurrent[ShieldIndex] - (1.00 x (Real((Current research level of Shield Degeneration Aura (Dummy Research) for (Owner of ShieldUnitVar))))))
                      • -------- Shield Regeneration Value Tracker --------
                      • Set VariableSet ShieldReDegeneraionTracker[ShieldIndex] = (ShieldReDegeneraionTracker[ShieldIndex] - (1.00 x (Real((Current research level of Shield Degeneration Aura (Dummy Research) for (Owner of ShieldUnitVar))))))
                    • Else - Actions
                  • -------- AoE Increase Ability Bonus --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (ShieldUnitVar has buff |cff00ff00Shield Regeneration Increase AoE|r ) Equal to True
                    • Then - Actions
                      • Set VariableSet ShieldValueCurrent[ShieldIndex] = (ShieldValueCurrent[ShieldIndex] + ((ShieldReDegeneraionTracker[ShieldIndex] / 100.00) x (50.00 x ShieldAoERegenBonus[ShieldIndex])))
                    • Else - Actions
                  • -------- AoE Decrease Ability Bonus --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (ShieldUnitVar has buff |cffff0000Shield Degeneration AoE|r ) Equal to True
                    • Then - Actions
                      • Set VariableSet ShieldValueCurrent[ShieldIndex] = (ShieldValueCurrent[ShieldIndex] - ((ShieldReDegeneraionTracker[ShieldIndex] / 100.00) x (100.00 x ShieldAoEDegenBonus[ShieldIndex])))
                    • Else - Actions
                  • -------- Reset Shield Regeneration Value Tracker --------
                  • Set VariableSet ShieldReDegeneraionTracker[ShieldIndex] = 0.00
                  • -------- Value under Shield Fix --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ShieldValueCurrent[ShieldIndex] Less than 0.00
                    • Then - Actions
                      • Set VariableSet ShieldValueCurrent[ShieldIndex] = 0.00
                    • Else - Actions
                  • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
                • Else - Actions
              • -------- Current Shield Value Below 0 -> Show text as 0 --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ShieldValueCurrent[ShieldIndex] Less than or equal to 0.00
                • Then - Actions
                  • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + (0 + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
                • Else - Actions
                  • -------- Current Shield Value above Max Value --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ShieldValueCurrent[ShieldIndex] Greater than ShieldValueMax[ShieldIndex]
                    • Then - Actions
                      • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueMax[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
                    • Else - Actions
              • -------- Max Shield Value Below 0 -> Show text as 0 --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ShieldValueMax[ShieldIndex] Less than or equal to 0.00
                • Then - Actions
                  • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + (0 + (/ + (0 + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
                • Else - Actions
        • Else - Actions
  • Shield and Shield Armour Upgrade
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Researched tech-type) Equal to Protoss Shields Armour Upgrade
          • (Researched tech-type) Equal to Protoss Shields Value Upgrade
    • Actions
      • -------- Shield Upgrades Group --------
      • Unit Group - Pick every unit in ShieldGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Set VariableSet ShieldUnitVar = (Picked unit)
              • Set VariableSet ShieldIndex = (Custom value of ShieldUnitVar)
              • -------- Shield Value Upgrade --------
              • Set VariableSet ShieldValueDefaultMaxNUpg[ShieldIndex] = ShieldValueDefaultMax[ShieldIndex]
              • Set VariableSet ShieldValueDefaultMaxNUpg[ShieldIndex] = (ShieldValueDefaultMaxNUpg[ShieldIndex] + ((ShieldValueDefaultMaxNUpg[ShieldIndex] / 100.00) x (10.00 x (Real((Current research level of Protoss Shields Value Upgrade for (Owner of ShieldUnitVar)))))))
              • Set VariableSet ShieldValueMax[ShieldIndex] = ShieldValueDefaultMaxNUpg[ShieldIndex]
              • -------- Shield Armour Upgrade --------
              • Set VariableSet ShieldArmourDefault[ShieldIndex] = (5.00 x (Real((Current research level of Protoss Shields Armour Upgrade for (Owner of ShieldUnitVar)))))
              • Set VariableSet ShieldArmourMax[ShieldIndex] = ShieldArmourDefault[ShieldIndex]
              • -------- Shield Increase Aura Bonus --------
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] + ShieldValueAuraIncreaseBonus[ShieldIndex])
              • -------- Shield Decrease Aura Bonus --------
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] + ShieldValueAuraDecreaseBonus[ShieldIndex])
              • -------- Shield Armour Increase Aura Bonus --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ShieldUnitVar has buff Shield Armour Increase Aura ) Equal to True
                • Then - Actions
                  • Set VariableSet ShieldArmourAuraIncreaseBonus[ShieldIndex] = ((ShieldArmourDefault[ShieldIndex] / 100.00) x (10.00 x (Real((Current research level of Shield Armour Increase Aura (Dummy Research) for (Owner of ShieldUnitVar))))))
                  • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] + ShieldArmourAuraIncreaseBonus[ShieldIndex])
                • Else - Actions
              • -------- Shield Armour Decrease Aura Bonus --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ShieldUnitVar has buff |cffff0000Shield Armour Decrease Aura|r ) Equal to True
                • Then - Actions
                  • Set VariableSet ShieldArmourAuraDecreaseBonus[ShieldIndex] = ((ShieldArmourDefault[ShieldIndex] / 100.00) x (-50.00 x (Real((Current research level of Shield Armour Decrease Aura (Dummy Research) for (Owner of ShieldUnitVar))))))
                  • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] + ShieldArmourAuraDecreaseBonus[ShieldIndex])
                • Else - Actions
              • -------- Shield Value Increase AoE Bonus --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ShieldUnitVar has buff Shield Value Increase AoE ) Equal to True
                • Then - Actions
                  • Set VariableSet ShieldAoEValueIncreBonusTrack[ShieldIndex] = ((ShieldValueDefaultMaxNUpg[ShieldIndex] / 100.00) x (50.00 x ShieldAoEValueIncreBonus[ShieldIndex]))
                  • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] + ShieldAoEValueIncreBonusTrack[ShieldIndex])
                • Else - Actions
              • -------- Shield Value Decrease AoE Bonus --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ShieldUnitVar has buff |cffff0000Shield Value Decrease AoE|r ) Equal to True
                • Then - Actions
                  • Set VariableSet ShieldAoEValueDecreBonusTrack[ShieldIndex] = ((ShieldValueDefaultMaxNUpg[ShieldIndex] / 100.00) x (-50.00 x ShieldAoEValueDecreBonus[ShieldIndex]))
                  • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] + ShieldAoEValueDecreBonusTrack[ShieldIndex])
                • Else - Actions
              • -------- Shield Armour Increase AoE Bonus --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff Shield Armour Increase AoE ) Equal to True
                • Then - Actions
                  • Set VariableSet ShieldAoEArmourIncreBonusTrack[ShieldIndex] = (1.00 x ShieldAoEArmourIncreBonus[ShieldIndex])
                  • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] + ShieldAoEArmourIncreBonusTrack[ShieldIndex])
                • Else - Actions
              • -------- Shield Armour Decrease AoE Bonus --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ShieldUnitVar has buff |cffff0000Shield Armour Decrease AoE|r ) Equal to True
                • Then - Actions
                  • Set VariableSet ShieldAoEArmourDecreBonusTrack[ShieldIndex] = (1.00 x ShieldAoEArmourDecreBonus[ShieldIndex])
                  • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] - ShieldAoEArmourDecreBonusTrack[ShieldIndex])
                • Else - Actions
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- Max Shield Value Below 0 -> Show text as 0 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ShieldValueMax[ShieldIndex] Less than or equal to 0.00
            • Then - Actions
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + (0 + (/ + (0 + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
  • Shield Auras and Abilities Upgrades
    • Events
      • Unit - A unit Learns a skill
    • Conditions
    • Actions
      • Set VariableSet LearningHeroVar = (Learning Hero)
      • -------- Shield Regeneration Aura --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned Hero Skill) Equal to Shield Regeneration Aura
        • Then - Actions
          • Player - Set the current research level of Shield Regeneration Aura (Dummy Research) to ((Current research level of Shield Regeneration Aura (Dummy Research) for (Owner of LearningHeroVar)) + 1) for (Owner of LearningHeroVar)
        • Else - Actions
          • -------- Shield Degeneration Aura --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Learned Hero Skill) Equal to Shield Degeneration Aura
            • Then - Actions
              • Player - Set the current research level of Shield Degeneration Aura (Dummy Research) to ((Current research level of Shield Degeneration Aura (Dummy Research) for (Owner of LearningHeroVar)) + 1) for (Owner of LearningHeroVar)
            • Else - Actions
              • -------- Shield Value Increase Aura --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Learned Hero Skill) Equal to Shield Increase Aura
                • Then - Actions
                  • Player - Set the current research level of Shield Value Increase Aura - Shield Max Value (Dummy Research) to ((Current research level of Shield Value Increase Aura - Shield Max Value (Dummy Research) for (Owner of LearningHeroVar)) + 1) for (Owner of LearningHeroVar)
                • Else - Actions
                  • -------- Shield Value Decrease Aura --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Learned Hero Skill) Equal to Shield Decrease Aura
                    • Then - Actions
                      • Player - Set the current research level of Shield Value Decrease Aura - Shield Max Value (Dummy Research) to ((Current research level of Shield Value Decrease Aura - Shield Max Value (Dummy Research) for (Owner of LearningHeroVar)) + 1) for (Owner of LearningHeroVar)
                    • Else - Actions
                      • -------- Shield Armour Increase Aura --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Learned Hero Skill) Equal to Shield Armour Increase Aura
                        • Then - Actions
                          • Player - Set the current research level of Shield Armour Increase Aura (Dummy Research) to ((Current research level of Shield Armour Increase Aura (Dummy Research) for (Owner of LearningHeroVar)) + 1) for (Owner of LearningHeroVar)
                        • Else - Actions
                          • -------- Shield Armour Decrease Aura --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Learned Hero Skill) Equal to Shield Armour Decrease Aura
                            • Then - Actions
                              • Player - Set the current research level of Shield Armour Decrease Aura (Dummy Research) to ((Current research level of Shield Armour Decrease Aura (Dummy Research) for (Owner of LearningHeroVar)) + 1) for (Owner of LearningHeroVar)
                            • Else - Actions
  • Shield Auras and Abilities Effect
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • -------- Shield Abilities Group --------
      • Unit Group - Pick every unit in ShieldGroup and do (Actions)
        • Loop - Actions
          • Set VariableSet ShieldUnitVar = (Picked unit)
          • Set VariableSet ShieldIndex = (Custom value of ShieldUnitVar)
          • -------- SHIELD DECREASE AURA --------
          • -------- Check if Bonus is not there Already --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff |cffff0000Shield Decrease Aura|r ) Equal to False
              • ShieldValueAuraDecreaseBonus[ShieldIndex] Equal to (-150.00 x (Real((Current research level of Shield Value Decrease Aura - Shield Max Value (Dummy Research) for (Owner of ShieldUnitVar)))))
              • ShieldValueAuraDecreaseBonus[ShieldIndex] Less than 0.00
            • Then - Actions
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] - ShieldValueAuraDecreaseBonus[ShieldIndex])
              • Set VariableSet ShieldValueAuraDecreaseBonus[ShieldIndex] = 0.00
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- Check if Bonus is there Already --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff |cffff0000Shield Decrease Aura|r ) Equal to True
              • ShieldValueAuraDecreaseBonus[ShieldIndex] Greater than (-150.00 x (Real((Current research level of Shield Value Decrease Aura - Shield Max Value (Dummy Research) for (Owner of ShieldUnitVar)))))
            • Then - Actions
              • -------- Fix Surplus Value --------
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] - ShieldValueAuraDecreaseBonus[ShieldIndex])
              • -------- Add Research/Aura Level Based Value --------
              • Set VariableSet ShieldValueAuraDecreaseBonus[ShieldIndex] = (-150.00 x (Real((Current research level of Shield Value Decrease Aura - Shield Max Value (Dummy Research) for (Owner of ShieldUnitVar)))))
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] + ShieldValueAuraDecreaseBonus[ShieldIndex])
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- SHIELD INCREASE AURA --------
          • -------- Check if Bonus is not there Already --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff Shield Increase Aura ) Equal to False
              • ShieldValueAuraIncreaseBonus[ShieldIndex] Greater than 0.00
            • Then - Actions
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] - ShieldValueAuraIncreaseBonus[ShieldIndex])
              • Set VariableSet ShieldValueAuraIncreaseBonus[ShieldIndex] = 0.00
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- Check if Bonus is there Already --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff Shield Increase Aura ) Equal to True
              • ShieldValueAuraIncreaseBonus[ShieldIndex] Less than (50.00 x (Real((Current research level of Shield Value Increase Aura - Shield Max Value (Dummy Research) for (Owner of ShieldUnitVar)))))
            • Then - Actions
              • -------- Fix Surplus Value --------
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] - ShieldValueAuraIncreaseBonus[ShieldIndex])
              • -------- Add Research/Aura Level Based Value --------
              • Set VariableSet ShieldValueAuraIncreaseBonus[ShieldIndex] = (50.00 x (Real((Current research level of Shield Value Increase Aura - Shield Max Value (Dummy Research) for (Owner of ShieldUnitVar)))))
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] + ShieldValueAuraIncreaseBonus[ShieldIndex])
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- SHIELD ARMOUR INCREASE AURA --------
          • -------- Check if Bonus is not there Already --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff Shield Armour Increase Aura ) Equal to False
              • ShieldArmourAuraIncreaseTrack[ShieldIndex] Greater than 0.00
            • Then - Actions
              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] - ShieldArmourAuraIncreaseBonus[ShieldIndex])
              • Set VariableSet ShieldArmourAuraIncreaseBonus[ShieldIndex] = 0.00
              • -------- Ability Level Tracker --------
              • Set VariableSet ShieldArmourAuraIncreaseTrack[ShieldIndex] = 0.00
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- Check if Bonus is there Already --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff Shield Armour Increase Aura ) Equal to True
              • ShieldArmourAuraIncreaseTrack[ShieldIndex] Less than (10.00 x (Real((Current research level of Shield Armour Increase Aura (Dummy Research) for (Owner of ShieldUnitVar)))))
            • Then - Actions
              • -------- Fix Surplus Value --------
              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] - ShieldArmourAuraIncreaseBonus[ShieldIndex])
              • -------- Add Research/Aura Level Based Value --------
              • Set VariableSet ShieldArmourAuraIncreaseBonus[ShieldIndex] = ((ShieldArmourDefault[ShieldIndex] / 100.00) x (10.00 x (Real((Current research level of Shield Armour Increase Aura (Dummy Research) for (Owner of ShieldUnitVar))))))
              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] + ShieldArmourAuraIncreaseBonus[ShieldIndex])
              • -------- Ability Level Tracker --------
              • Set VariableSet ShieldArmourAuraIncreaseTrack[ShieldIndex] = (10.00 x (Real((Current research level of Shield Armour Increase Aura (Dummy Research) for (Owner of ShieldUnitVar)))))
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- SHIELD ARMOUR DECREASE AURA --------
          • -------- Check if Bonus is not there Already --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff |cffff0000Shield Armour Decrease Aura|r ) Equal to False
              • ShieldArmourAuraDecreaseTrack[ShieldIndex] Less than 0.00
            • Then - Actions
              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] - ShieldArmourAuraDecreaseBonus[ShieldIndex])
              • Set VariableSet ShieldArmourAuraDecreaseBonus[ShieldIndex] = 0.00
              • -------- Ability Level Tracker --------
              • Set VariableSet ShieldArmourAuraDecreaseTrack[ShieldIndex] = 0.00
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- Check if Bonus is there Already --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff |cffff0000Shield Armour Decrease Aura|r ) Equal to True
              • ShieldArmourAuraDecreaseTrack[ShieldIndex] Greater than (-50.00 x (Real((Current research level of Shield Armour Decrease Aura (Dummy Research) for (Owner of ShieldUnitVar)))))
            • Then - Actions
              • -------- Fix Surplus Value --------
              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] - ShieldArmourAuraDecreaseBonus[ShieldIndex])
              • -------- Add Research/Aura Level Based Value --------
              • Set VariableSet ShieldArmourAuraDecreaseBonus[ShieldIndex] = ((ShieldArmourDefault[ShieldIndex] / 100.00) x (-50.00 x (Real((Current research level of Shield Armour Decrease Aura (Dummy Research) for (Owner of ShieldUnitVar))))))
              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] + ShieldArmourAuraDecreaseBonus[ShieldIndex])
              • -------- Ability Level Tracker --------
              • Set VariableSet ShieldArmourAuraDecreaseTrack[ShieldIndex] = (-50.00 x (Real((Current research level of Shield Armour Decrease Aura (Dummy Research) for (Owner of ShieldUnitVar)))))
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- SHIELD REGENERATIION DECREASE ABILITY AOE --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff |cffff0000Shield Degeneration AoE|r ) Equal to True
              • (Ability Cooldown Remaining of ShieldUnitVar for ability Shield Degeneration AoE (Cooldown Dummy Ability) ..) Equal to 0.00
            • Then - Actions
              • Unit - Remove Shield Degeneration AoE (Buff Dummy) from ShieldUnitVar
              • Unit - Remove Shield Degeneration AoE (Cooldown Dummy Ability) from ShieldUnitVar
              • Unit - Remove |cffff0000Shield Degeneration AoE|r buff from ShieldUnitVar
            • Else - Actions
          • -------- SHIELD VALUE INCREASE ABILITY AOE --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff Shield Value Increase AoE ) Equal to True
              • (Ability Cooldown Remaining of ShieldUnitVar for ability Shield Increase AoE (Cooldown Dummy Ability) ..) Equal to 0.00
            • Then - Actions
              • Unit - Remove Shield Value Increase AoE (Buff Dummy) from ShieldUnitVar
              • Unit - Remove Shield Increase AoE (Cooldown Dummy Ability) from ShieldUnitVar
              • Unit - Remove Shield Value Increase AoE buff from ShieldUnitVar
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] - ShieldAoEValueIncreBonusTrack[ShieldIndex])
              • Set VariableSet ShieldAoEValueIncreBonusTrack[ShieldIndex] = 0.00
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- SHIELD VALUE DECREASE ABILITY AOE --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff |cffff0000Shield Value Decrease AoE|r ) Equal to True
              • (Ability Cooldown Remaining of ShieldUnitVar for ability Shield Decrease AoE (Cooldown Dummy Ability) ..) Equal to 0.00
            • Then - Actions
              • Unit - Remove Shield Value Decrease AoE (Buff Dummy) from ShieldUnitVar
              • Unit - Remove Shield Decrease AoE (Cooldown Dummy Ability) from ShieldUnitVar
              • Unit - Remove |cffff0000Shield Value Decrease AoE|r buff from ShieldUnitVar
              • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] - ShieldAoEValueDecreBonusTrack[ShieldIndex])
              • Set VariableSet ShieldAoEValueDecreBonusTrack[ShieldIndex] = 0.00
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- SHIELD ARMOUR INCREASE ABILITY AOE --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff Shield Armour Increase AoE ) Equal to True
              • (Ability Cooldown Remaining of ShieldUnitVar for ability Shield Armour Increase AoE (Cooldown Dummy Ability) ..) Equal to 0.00
            • Then - Actions
              • Unit - Remove Shield Armour Increase AoE (Buff Dummy) from ShieldUnitVar
              • Unit - Remove Shield Armour Increase AoE (Cooldown Dummy Ability) from ShieldUnitVar
              • Unit - Remove Shield Armour Increase AoE buff from ShieldUnitVar
              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] - ShieldAoEArmourIncreBonusTrack[ShieldIndex])
              • Set VariableSet ShieldAoEArmourIncreBonusTrack[ShieldIndex] = 0.00
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- SHIELD ARMOUR DECREASE ABILITY AOE --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (ShieldUnitVar has buff |cffff0000Shield Armour Decrease AoE|r ) Equal to True
              • (Ability Cooldown Remaining of ShieldUnitVar for ability Shield Armour Decrease AoE (Cooldown Dummy Ability) ..) Equal to 0.00
            • Then - Actions
              • Unit - Remove Shield Armour Decrease AoE (Buff Dummy) from ShieldUnitVar
              • Unit - Remove Shield Armour Decrease AoE (Cooldown Dummy Ability) from ShieldUnitVar
              • Unit - Remove |cffff0000Shield Armour Decrease AoE|r buff from ShieldUnitVar
              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] + ShieldAoEArmourDecreBonusTrack[ShieldIndex])
              • Set VariableSet ShieldAoEArmourDecreBonusTrack[ShieldIndex] = 0.00
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
          • -------- Current Shield Value Below 0 -> Show text as 0 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ShieldValueCurrent[ShieldIndex] Less than or equal to 0.00
            • Then - Actions
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + (0 + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
              • -------- Current Shield Value above Max Value --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ShieldValueCurrent[ShieldIndex] Greater than ShieldValueMax[ShieldIndex]
                • Then - Actions
                  • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueMax[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
                • Else - Actions
          • -------- Max Shield Value Below 0 -> Show text as 0 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ShieldValueMax[ShieldIndex] Less than or equal to 0.00
            • Then - Actions
              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + (0 + (/ + (0 + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
            • Else - Actions
  • Shield Abilities
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Shield Regeneration Increase AoE
          • (Ability being cast) Equal to Shield Degeneration AoE
          • (Ability being cast) Equal to Shield Value Increase AoE
          • (Ability being cast) Equal to Shield Value Decrease AoE
          • (Ability being cast) Equal to Shield Armour Increase AoE
          • (Ability being cast) Equal to Shield Armour Decrease AoE
    • Actions
      • Set VariableSet CastingUnitVar = (Casting unit)
      • -------- Shield Abilities Target Group --------
      • Set VariableSet ShieldAbilitiesTargetPoint = (Target point of ability being cast)
      • Set VariableSet ShieldAbilitiesTargetGroup = (Units within 331.00 of ShieldAbilitiesTargetPoint matching (((Level of Protoss Shields and Armour (Dummy Ability) for (Matching unit)) Equal to 1) and (((Matching unit) is alive) Equal to True)).)
      • Unit Group - Pick every unit in ShieldAbilitiesTargetGroup and do (Actions)
        • Loop - Actions
          • Set VariableSet ShieldUnitVar = (Picked unit)
          • Set VariableSet ShieldIndex = (Custom value of ShieldUnitVar)
          • -------- SHIELD REGENERATION AOE ABILITY --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Equal to Shield Regeneration Increase AoE
            • Then - Actions
              • Set VariableSet ShieldAoERegenBonus[ShieldIndex] = (Real((Level of Shield Regeneration Increase AoE for CastingUnitVar)))
            • Else - Actions
              • -------- SHIELD DEGENERATION AOE ABILITY --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to Shield Degeneration AoE
                • Then - Actions
                  • Set VariableSet ShieldAoEDegenBonus[ShieldIndex] = (Real((Level of Shield Degeneration AoE for CastingUnitVar)))
                  • -------- Removing Previous/Current Level Dummy Buff and Adding New/Current Level One +Removing Unnecessary Ability Buff --------
                  • Unit - Remove |cffff0000Shield Degeneration AoE|r buff from ShieldUnitVar
                  • Unit - Remove Shield Degeneration AoE (Buff Dummy) from ShieldUnitVar
                  • Unit - Add Shield Degeneration AoE (Buff Dummy) to ShieldUnitVar
                  • Unit - For ShieldUnitVar, Ability Shield Degeneration AoE (Buff Dummy) , Hide ability: True
                  • -------- Add-Remove Dummy Cooldown --------
                  • Unit - Remove Shield Degeneration AoE (Cooldown Dummy Ability) from ShieldUnitVar
                  • Unit - Add Shield Degeneration AoE (Cooldown Dummy Ability) to ShieldUnitVar
                  • Unit - For ShieldUnitVar, Ability Shield Degeneration AoE (Cooldown Dummy Ability) , Hide ability: True
                  • Unit - For Unit ShieldUnitVar, start cooldown of ability Shield Degeneration AoE (Cooldown Dummy Ability) " over "10.00 seconds.
                • Else - Actions
                  • -------- SHIELD VALUE INCREASE AOE ABILITY --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Ability being cast) Equal to Shield Value Increase AoE
                    • Then - Actions
                      • Set VariableSet ShieldAoEValueIncreBonus[ShieldIndex] = (Real((Level of Shield Value Increase AoE for CastingUnitVar)))
                      • -------- Remove Previous Bonus --------
                      • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] - ShieldAoEValueIncreBonusTrack[ShieldIndex])
                      • -------- Removing Previous/Current Level Dummy Buff and Adding New/Current Level One +Removing Unnecessary Ability Buff --------
                      • Unit - Remove Shield Value Increase AoE buff from ShieldUnitVar
                      • Unit - Remove Shield Value Increase AoE (Buff Dummy) from ShieldUnitVar
                      • Unit - Add Shield Value Increase AoE (Buff Dummy) to ShieldUnitVar
                      • Unit - For ShieldUnitVar, Ability Shield Value Increase AoE (Buff Dummy) , Hide ability: True
                      • -------- Add-Remove Dummy Cooldown --------
                      • Unit - Remove Shield Increase AoE (Cooldown Dummy Ability) from ShieldUnitVar
                      • Unit - Add Shield Increase AoE (Cooldown Dummy Ability) to ShieldUnitVar
                      • Unit - For ShieldUnitVar, Ability Shield Increase AoE (Cooldown Dummy Ability) , Hide ability: True
                      • Unit - For Unit ShieldUnitVar, start cooldown of ability Shield Increase AoE (Cooldown Dummy Ability) " over "10.00 seconds.
                      • -------- Apply Bonus --------
                      • Set VariableSet ShieldAoEValueIncreBonusTrack[ShieldIndex] = ((ShieldValueDefaultMaxNUpg[ShieldIndex] / 100.00) x (50.00 x ShieldAoEValueIncreBonus[ShieldIndex]))
                      • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] + ShieldAoEValueIncreBonusTrack[ShieldIndex])
                      • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
                    • Else - Actions
                      • -------- SHIELD VALUE DECREASE AOE ABILITY --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Ability being cast) Equal to Shield Value Decrease AoE
                        • Then - Actions
                          • Set VariableSet ShieldAoEValueDecreBonus[ShieldIndex] = (Real((Level of Shield Value Decrease AoE for CastingUnitVar)))
                          • -------- Remove Previous Bonus --------
                          • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] - ShieldAoEValueDecreBonusTrack[ShieldIndex])
                          • -------- Removing Previous/Current Level Dummy Buff and Adding New/Current Level One +Removing Unnecessary Ability Buff --------
                          • Unit - Remove |cffff0000Shield Value Decrease AoE|r buff from ShieldUnitVar
                          • Unit - Remove Shield Value Decrease AoE (Buff Dummy) from ShieldUnitVar
                          • Unit - Add Shield Value Decrease AoE (Buff Dummy) to ShieldUnitVar
                          • Unit - For ShieldUnitVar, Ability Shield Value Decrease AoE (Buff Dummy) , Hide ability: True
                          • -------- Add-Remove Dummy Cooldown --------
                          • Unit - Remove Shield Decrease AoE (Cooldown Dummy Ability) from ShieldUnitVar
                          • Unit - Add Shield Decrease AoE (Cooldown Dummy Ability) to ShieldUnitVar
                          • Unit - For ShieldUnitVar, Ability Shield Decrease AoE (Cooldown Dummy Ability) , Hide ability: True
                          • Unit - For Unit ShieldUnitVar, start cooldown of ability Shield Decrease AoE (Cooldown Dummy Ability) " over "10.00 seconds.
                          • -------- Apply Bonus --------
                          • Set VariableSet ShieldAoEValueDecreBonusTrack[ShieldIndex] = ((ShieldValueDefaultMaxNUpg[ShieldIndex] / 100.00) x (-50.00 x ShieldAoEValueDecreBonus[ShieldIndex]))
                          • Set VariableSet ShieldValueMax[ShieldIndex] = (ShieldValueMax[ShieldIndex] + ShieldAoEValueDecreBonusTrack[ShieldIndex])
                          • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
                        • Else - Actions
                          • -------- SHIELD ARMOUR INCREASE AOE ABILITY --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Ability being cast) Equal to Shield Armour Increase AoE
                            • Then - Actions
                              • Set VariableSet ShieldAoEArmourIncreBonus[ShieldIndex] = (Real((Level of Shield Armour Increase AoE for CastingUnitVar)))
                              • -------- Remove Previous Bonus --------
                              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] - ShieldAoEArmourIncreBonusTrack[ShieldIndex])
                              • -------- Removing Previous/Current Level Dummy Buff and Adding New/Current Level One +Removing Unnecessary Ability Buff --------
                              • Unit - Remove Shield Armour Increase AoE buff from ShieldUnitVar
                              • Unit - Remove Shield Armour Increase AoE (Buff Dummy) from ShieldUnitVar
                              • Unit - Add Shield Armour Increase AoE (Buff Dummy) to ShieldUnitVar
                              • Unit - For ShieldUnitVar, Ability Shield Armour Increase AoE (Buff Dummy) , Hide ability: True
                              • -------- Add-Remove Dummy Cooldown --------
                              • Unit - Remove Shield Armour Increase AoE (Cooldown Dummy Ability) from ShieldUnitVar
                              • Unit - Add Shield Armour Increase AoE (Cooldown Dummy Ability) to ShieldUnitVar
                              • Unit - For ShieldUnitVar, Ability Shield Armour Increase AoE (Cooldown Dummy Ability) , Hide ability: True
                              • Unit - For Unit ShieldUnitVar, start cooldown of ability Shield Armour Increase AoE (Cooldown Dummy Ability) " over "10.00 seconds.
                              • -------- Apply Bonus --------
                              • Set VariableSet ShieldAoEArmourIncreBonusTrack[ShieldIndex] = (1.00 x ShieldAoEArmourIncreBonus[ShieldIndex])
                              • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] + ShieldAoEArmourIncreBonusTrack[ShieldIndex])
                              • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
                            • Else - Actions
                              • -------- SHIELD ARMOUR DECREASE AOE ABILITY --------
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Ability being cast) Equal to Shield Armour Decrease AoE
                                • Then - Actions
                                  • Set VariableSet ShieldAoEArmourDecreBonus[ShieldIndex] = (Real((Level of Shield Armour Decrease AoE for CastingUnitVar)))
                                  • -------- Remove Previous Bonus --------
                                  • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] + ShieldAoEArmourDecreBonusTrack[ShieldIndex])
                                  • -------- Removing Previous/Current Level Dummy Buff and Adding New/Current Level One +Removing Unnecessary Ability Buff --------
                                  • Unit - Remove |cffff0000Shield Armour Decrease AoE|r buff from (Picked unit)
                                  • Unit - Remove Shield Armour Decrease AoE (Buff Dummy) from (Picked unit)
                                  • Unit - Add Shield Armour Decrease AoE (Buff Dummy) to (Picked unit)
                                  • Unit - For (Picked unit), Ability Shield Armour Decrease AoE (Buff Dummy) , Hide ability: True
                                  • -------- Add-Remove Dummy Cooldown --------
                                  • Unit - Remove Shield Armour Decrease AoE (Cooldown Dummy Ability) from (Picked unit)
                                  • Unit - Add Shield Armour Decrease AoE (Cooldown Dummy Ability) to (Picked unit)
                                  • Unit - For (Picked unit), Ability Shield Armour Decrease AoE (Cooldown Dummy Ability) , Hide ability: True
                                  • Unit - For Unit (Picked unit), start cooldown of ability Shield Armour Decrease AoE (Cooldown Dummy Ability) " over "10.00 seconds.
                                  • -------- Apply Bonus --------
                                  • Set VariableSet ShieldAoEArmourDecreBonusTrack[ShieldIndex] = (1.00 x ShieldAoEArmourDecreBonus[ShieldIndex])
                                  • Set VariableSet ShieldArmourMax[ShieldIndex] = (ShieldArmourMax[ShieldIndex] - ShieldAoEArmourDecreBonusTrack[ShieldIndex])
                                  • Unit - Set Name of ShieldUnitVar to (ShieldUnitNameStr[ShieldIndex] + ( ( + ((String((Integer(ShieldValueCurrent[ShieldIndex])))) + (/ + ((String((Integer(ShieldValueMax[ShieldIndex])))) + ( + + ((String((Integer(ShieldArmourMax[ShieldIndex])))) + ))))))))
                                • Else - Actions
      • Custom script: call DestroyGroup(udg_ShieldAbilitiesTargetGroup)
      • Custom script: call RemoveLocation (udg_ShieldAbilitiesTargetPoint)

Uncle made a loyal StarCraft II version->post.

This is more of a proto-template one could modify with UI changes and whatever one desires. However, for instance, adding custom shield bars or floating text above units to display their current shield values slows down the game if more than or around 50 units have that at a time on screen (game engine limitation I presume).

Credits
Much love for Uncle for constant help and patience in the development thread->post.
Bribe for the fantastic Unit Indexer
Devalut for inspiration and FX model suggestion
Hermit for the shield FX model: post 1 & 2.
Previews
Contents

StarCraft-like Systems (Map)

Can one use mana as the shield resource? That seems to me like the more natural choice for a lot of maps.

I've only skimmed over the triggers yet. The implementation of the core system looks quite solid, but I think you need to make some architectural changes to get your resource approved.

In general, you want to split your code into three parts. A configurable part that the user can safely edit to customize the system to his or her needs. A core part that the user better not touch and a part for your test map, where you show possible applications of your systems and give examples of how to make it work. This is not always possible, especially in GUI, but it is something to aim towards.

From skimming over your triggers, I didn't really get a sense which parts I'm supposed to configure. The registering of unit types, for example, could be achieved by setting up an array of units in the config section. If you want your system to be slightly faster, you could then transform that list into a hashtable with a boolean set to true for unit ids that were added.

The shield effect doesn't appear to be perfectly centered to me (but I couldn't tell you why).
 

deepstrasz

Map Reviewer
Level 70
Joined
Jun 4, 2009
Messages
18,995
Using mana as the shield would render mana as the energy source for StarCraft-like (and generally, all) abilities unusable and would disable abilities like Mana Shield. The way it is now lets one have more layers of protection. It's just that there's no nice way to show the values but UI edits could do that, basically add another n / n under mana for instance. I'm not a coding-savvy so not quite sure how to achieve this myself but it's definitly possible from what I've seen people do.
Hashtables is a field I never understood. I tried to be as GUI as possible with this without getting into sophistication.
Yes, it's quite messy overall but so is my way of triggering and understanding, sadly.
Yeah, the shield FX needs adjustments for each unit size (some like the fliers or mounted ones, are longer rather than taller).
Thanks for the heads-up!
 
Using mana as the shield would render mana as the energy source for StarCraft-like (and generally, all) abilities unusable and would disable abilities like Mana Shield.
I get that, but maybe someone doesn't need mana as a resource in his map. It would be nice to have the option. Some users might also be fine with just not having a UI for the shield value at all.

Hashtables is a field I never understood. I tried to be as GUI as possible with this without getting into sophistication.
Hashtables are very confusing for GUI users, partly because the syntax when you go into the hashtable actions makes little sense. "Save Value as Value of Value in (Last created hashtable)." What the hell is that supposed to mean? But the concept is actually not that hard to grasp if you think of the hashtable as an Excel table and rewrite the above statement into "Save myVariable at column myInteger1 and row myInteger2 in (Last created hashtable)."

Now you can read the value stored at that "cell" (using the Excel analogy) if you can retrieve the correct column and row where it was stored. Here, I was suggesting you use Unit Ids as columns and whatever constant as the row (not important) and write into the cells "true" for all unit types that were added to the system. This lets you just do one look-up to check if a unit has a shield instead of having to iterate over the entire list each time.

But I just found out that this is not possible with GUI (someone correct me if I'm wrong), so you'd have to use custom code. Don't worry about it for now and focus on organizing your code. But hashtables are a very useful concept to learn in general.
 
Top