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

Divine Judgement v1.2.1

  • Like
Reactions: deepstrasz
[Divine Judgement]
INTRO :
An entry for GUI Challenge against @Rheiko
I don't change anything much except adding slightly more documentation. Well, we could discuss the damage problem but I want it to stay for now. Pure and out of influence.

ABILITY :
Unleash a powerful light force into a position. The bolt ignites all nearby souls in 400 range, dealing damage proportional to health. Afterwards, any allied unit struck will be healed both health and mana and enemy unit will lose hit and mana point per second for 20 seconds. Always left 1 HP. Initial damage is spell and the interval effect is pure.
Level 1 - up to 1/5 max health, 10 points.
Level 2 - up to 2/5 max health, 20 points.
Level 3 - up to 3/5 max health, 30 points.

USABILITY :
In combat, this ability is a powerful double edged sword. The initial damage effect can shut almost all opponents in both sides and the healing can grant a recovery advantage. It also mutes healing effect for enemy party with a long DoT. However, an incorrect timing of ability usage can kill allied forces from enemy fire due to initial damage burst it applies.

IMPORT GUIDE :
1. Make sure preference for auto create variable is on
2. Import the Divine Judgment ability and set them properly.
3. Import the whole Divine Judgment folder
4. You can set the power and other stuffs related to the ability by going to the config trigger
5. If you found bugs, show me the triggers in your map at this thread so I can pinpoint the problem. This spell uses Hashtables, so make sure your total hashtables is below 255.

TRIGGERS :
  • Judge Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Ability --------
      • Set Judge_Ability = Divine Judgement
      • -------- Area of effect --------
      • Set Judge_AoE[1] = 400.00
      • Set Judge_AoE[2] = 400.00
      • Set Judge_AoE[3] = 400.00
      • -------- Initial health percentage lost (max 100.00) --------
      • Set Judge_PercentDamage[1] = 20.00
      • Set Judge_PercentDamage[2] = 40.00
      • Set Judge_PercentDamage[3] = 60.00
      • -------- Initial effect : Attack Type --------
      • Set Judge_AttackType = Spells
      • -------- Initial effect : Damage Type --------
      • Set Judge_DamageType = Normal
      • -------- Heal rate per second --------
      • Set Judge_HPS[1] = 10.00
      • Set Judge_HPS[2] = 20.00
      • Set Judge_HPS[3] = 30.00
      • -------- Damage rate per second --------
      • Set Judge_DPS[1] = 10.00
      • Set Judge_DPS[2] = 20.00
      • Set Judge_DPS[3] = 30.00
      • -------- Effect duration --------
      • Set Judge_Duration[1] = 20.00
      • Set Judge_Duration[2] = 20.00
      • Set Judge_Duration[3] = 20.00
      • -------- Area blast SFX --------
      • Set Judge_ActiveSFX = Units\NightElf\Wisp\WispExplode.mdl
      • -------- Effect SFX --------
      • Set Judge_EffectSFX = Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
      • -------- Looping SFX --------
      • Set Judge_LoopSFX = Abilities\Spells\Items\StaffOfSanctuary\Staff_Sanctuary_Target.mdl
      • -------- SFX Position (Looping and Effect only) --------
      • Set Judge_EffectPos = overhead
      • -------- END CONFIG --------
      • Set Judge_LOOPTIME = 0.03
      • Set Judge_LoopTrigger = Judge Loop <gen>
      • Trigger - Add to Judge_LoopTrigger the event (Time - Every Judge_LOOPTIME seconds of game time)
      • Hashtable - Create a hashtable
      • Set Judge_HASH = (Last created hashtable)
      • Set Judge_COUNT = 0
      • Set Judge_KEYDUR = 1
      • Set Judge_KEYLEVEL = 2
      • Set Judge_KEYDAMAGE = 3
      • Set Judge_KEYHEAL = 4
  • Judge Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Judge_Ability
    • Actions
      • -------- Variables setup --------
      • Set Judge_Source = (Triggering unit)
      • Set Judge_Point = (Target point of ability being cast)
      • Set Judge_Level = (Level of Judge_Ability for Judge_Source)
      • Set Judge_Group = (Units within Judge_AoE[Judge_Level] of Judge_Point)
      • -------- Field SFX --------
      • Special Effect - Create a special effect at Judge_Point using Judge_ActiveSFX
      • Special Effect - Destroy (Last created special effect)
      • -------- Damage and Group Setup --------
      • Unit Group - Pick every unit in Judge_Group and do (Actions)
        • Loop - Actions
          • Set Judge_Victim = (Picked unit)
          • Set Judge_KEY = (Key (Picked unit))
          • -------- Insert conditions here --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Judge_Victim is A structure) Equal to False
              • (Judge_Victim is Mechanical) Equal to False
              • (Judge_Victim is Magic Immune) Equal to False
              • (Judge_Victim is dead) Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Judge_Victim is in Judge_MainGroup) Equal to False
                • Then - Actions
                  • Set Judge_COUNT = (Judge_COUNT + 1)
                • Else - Actions
              • Unit - Cause Judge_Source to damage Judge_Victim, dealing ((Life of Judge_Victim) x (Judge_PercentDamage[Judge_Level] / 100.00)) damage of attack type Judge_AttackType and damage type Judge_DamageType
              • Special Effect - Create a special effect attached to the Judge_EffectPos of Judge_Victim using Judge_EffectSFX
              • Special Effect - Destroy (Last created special effect)
              • Unit Group - Add Judge_Victim to Judge_MainGroup
              • Hashtable - Save Judge_Duration[Judge_Level] as Judge_KEYDUR of Judge_KEY in Judge_HASH
              • Hashtable - Save Judge_Level as Judge_KEYLEVEL of Judge_KEY in Judge_HASH
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Judge_Victim belongs to an ally of (Owner of Judge_Source)) Equal to True
                • Then - Actions
                  • Hashtable - Save (Judge_HPS[Judge_Level] x Judge_LOOPTIME) as Judge_KEYHEAL of Judge_KEY in Judge_HASH
                  • Hashtable - Save 0.00 as Judge_KEYDAMAGE of Judge_KEY in Judge_HASH
                • Else - Actions
                  • Hashtable - Save (Judge_DPS[Judge_Level] x Judge_LOOPTIME) as Judge_KEYDAMAGE of Judge_KEY in Judge_HASH
                  • Hashtable - Save 0.00 as Judge_KEYHEAL of Judge_KEY in Judge_HASH
            • Else - Actions
      • Custom script: call RemoveLocation(udg_Judge_Point)
      • Custom script: call DestroyGroup(udg_Judge_Group)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Judge_COUNT Equal to 1
        • Then - Actions
          • Trigger - Turn on Judge_LoopTrigger
        • Else - Actions
  • Judge Loop
    • Events
    • Conditions
    • Actions
      • -------- DoT and HoT --------
      • Unit Group - Pick every unit in Judge_MainGroup and do (Actions)
        • Loop - Actions
          • Set Judge_Victim = (Picked unit)
          • Set Judge_KEY = (Key (Picked unit))
          • Set Judge_CurrentDuration = (Load Judge_KEYDUR of Judge_KEY from Judge_HASH)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Judge_CurrentDuration Equal to Judge_Duration[(Load Judge_KEYLEVEL of Judge_KEY from Judge_HASH)]
            • Then - Actions
              • -------- For safety reason, I would go with this. I tried to avoid any instance of spell causing a SFX left-over --------
              • Special Effect - Destroy (Load Judge_KEYEFFECT of Judge_KEY in Judge_HASH)
              • Special Effect - Create a special effect attached to the Judge_EffectPos of Judge_Victim using Judge_LoopSFX
              • Hashtable - Save Handle Of(Last created special effect) as Judge_KEYEFFECT of Judge_KEY in Judge_HASH
            • Else - Actions
          • Set Judge_Modifier = ((Load Judge_KEYDAMAGE of Judge_KEY from Judge_HASH) - (Load Judge_KEYHEAL of Judge_KEY from Judge_HASH))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Judge_Modifier Greater than or equal to ((Life of Judge_Victim) - 1.00)
            • Then - Actions
              • Unit - Set life of Judge_Victim to 1.00
            • Else - Actions
              • Unit - Set life of Judge_Victim to ((Life of Judge_Victim) - Judge_Modifier)
          • Unit - Set mana of Judge_Victim to ((Mana of Judge_Victim) - Judge_Modifier)
          • Set Judge_CurrentDuration = (Judge_CurrentDuration - Judge_LOOPTIME)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • Judge_CurrentDuration Less than or equal to 0.00
                  • (Judge_Victim is alive) Equal to False
            • Then - Actions
              • Special Effect - Destroy (Load Judge_KEYEFFECT of Judge_KEY in Judge_HASH)
              • Hashtable - Clear all child hashtables of child Judge_KEY in Judge_HASH
              • Unit Group - Remove Judge_Victim from Judge_MainGroup
              • Set Judge_COUNT = (Judge_COUNT - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Judge_COUNT Equal to 0
                • Then - Actions
                  • Trigger - Turn off Judge_LoopTrigger
                • Else - Actions
            • Else - Actions
              • Hashtable - Save Judge_CurrentDuration as Judge_KEYDUR of Judge_KEY in Judge_HASH

LOG :
Import Guide
Addressed some issues in @KILLCIDE review (2/3 out of 6)
Fixed the math algorithm
New screenshot


If you like this work and wish to support me financially, you can support me via Ko-fi.
Previews
Contents

TestMap (Map)

Reviews
KILLCIDE
Not the most interesting spell concept / effects, but useful nonetheless. I can easily see this in an altered melee project. Needs Fixed Nothing Suggestions Please add import instructions. It would be great if you can add configurables for the...
Level 37
Joined
Jul 22, 2015
Messages
3,485
Not the most interesting spell concept / effects, but useful nonetheless. I can easily see this in an altered melee project.

Needs Fixed

  • Nothing

Suggestions

  • Please add import instructions.
  • It would be great if you can add configurables for the attachment points for EffectSFX and LoopSFX. As I mentioned in the challenge thread, some effects dont look good on some points.
  • There is no need to use CreateGroup() on nonarray group variables. They are created automatically before any of the triggers are executed. With what you are doing, that is technically a leak
  • On cast, you aren't filtering out dead units
  • JudgePercentDamage[] / 100 is a constant which could have been calculated on map init
  • When you are turning on the loop trigger, change Judge_LoopTrigger is on to Judge_COUNT == 1

Status

Approved
 

Deleted member 247165

D

Deleted member 247165

It's like the Reaper Scythe ability from dota with AoE. It is a very useful spell, despite it doesn't use a giant load of effects.
 
Top