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

Savior's Aura v1.1

Hi, this is my first spell and is also my entry for the Zephyr Contest #11. The poll is up so i think its ok to upload it in this section. The spell is very simple i hope its approvable.



Emits an aura that heals nearby allied units whenever the bearer of the aura is attacked. Also allows you to force enemy units within 250 radius to attack you.

Level 1 - Heals nearby units based on 30% of the bearer's strength.
Level 2 - Heals nearby units based on 60% of the bearer's strength.
Level 3 - Heals nearby units based on 90% of the bearer's strength.
Level 4 - Heals nearby units based on 120% of the bearer's strength.

Area of Effect: 500
Units that has this ability will not be healed by this aura.




  • SaviorAuraTriggerConfiguration
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- set the ability that will be the basis for the aura --------
      • -------- - --------
      • Set SA_A_PassiveAbility = Savior's Aura (Container)
      • Set SA_A_ActiveAbility = Savior's Aura (Active)
      • -------- - --------
      • -------- set the buff that the ability will emit --------
      • -------- - --------
      • Set SA_BF_Buff = Savior's Aura
      • -------- - --------
      • -------- if set to true, the amount healed will be based on the percentage of strength of the hero --------
      • -------- if set to false, the number will directly heal units --------
      • -------- please note that 20% is 20.00 and not 0.2 --------
      • -------- - --------
      • Set SA_B_UseStat = True
      • -------- - --------
      • Set SA_R_Heal[1] = 30.00
      • Set SA_R_Heal[2] = 60.00
      • Set SA_R_Heal[3] = 90.00
      • Set SA_R_Heal[4] = 120.00
      • -------- - --------
      • -------- special effects configurables --------
      • -------- attachment point --------
      • -------- - --------
      • Set SA_S_Attach = origin
      • -------- - --------
      • -------- special effects attached to unit --------
      • -------- - --------
      • Set SA_S_SFX = Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
      • -------- - --------
      • -------- Area of effect of the aura --------
      • -------- - --------
      • Set SA_R_AoE[1] = 500.00
      • Set SA_R_AoE[2] = 500.00
      • Set SA_R_AoE[3] = 500.00
      • Set SA_R_AoE[4] = 500.00
      • -------- - --------
      • -------- list abilities that unlearns all hero skills --------
      • -------- SA_A_Total is the total number of abilities that can unlearn the spell --------
      • -------- - --------
      • Set SA_I_Total = 1
      • -------- - --------
      • Set SA_A_Unlearn[1] = Tome of Retraining
      • -------- - --------
      • -------- Disable spellbook --------
      • -------- - --------
      • For each (Integer SA_I_TempInt) from 1 to 12, do (Actions)
        • Loop - Actions
          • -------- - --------
          • -------- Disable the spellbook --------
          • -------- - --------
          • Player - Disable SA_A_PassiveAbility for (Player(SA_I_TempInt))
      • Custom script: set bj_wantDestroyGroup=true
      • -------- - --------
      • -------- Check if any there are units that already learnt the ability --------
      • -------- - --------
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • -------- - --------
          • -------- add the picked unit into a variable --------
          • -------- - --------
          • Set SA_U_Picked = (Picked unit)
          • -------- - --------
          • -------- Check if the unit has leveled the ability --------
          • -------- - --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of SA_A_ActiveAbility for SA_U_Picked) Greater than 0
            • Then - Actions
              • -------- - --------
              • -------- add the actual aura to the picked unit --------
              • -------- - --------
              • Unit - Add SA_A_PassiveAbility to SA_U_Picked
            • Else - Actions
  • SaviorAuraEffect
    • Events
      • Game - damageEventTrigger becomes Equal to 1.00
    • Conditions
      • (Level of SA_A_ActiveAbility for target) Greater than 0
      • (source belongs to an enemy of (Owner of target)) Equal to True
    • Actions
      • -------- - --------
      • -------- Set the attacked unit --------
      • -------- - --------
      • Set SA_U_AtkUnit = target
      • -------- - --------
      • -------- Determine the owner of the unit --------
      • -------- - --------
      • Set SA_PL_Player = (Owner of SA_U_AtkUnit)
      • -------- - --------
      • -------- set the level of the ability into a variable --------
      • -------- - --------
      • Set SA_I_Level = (Level of SA_A_ActiveAbility for SA_U_AtkUnit)
      • -------- - --------
      • -------- Checks on what value should be applied on the aura's healing effect --------
      • -------- - --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SA_B_UseStat Equal to True
        • Then - Actions
          • -------- - --------
          • -------- if this is applied then the heal value is equal to a certain percentage of the attacked unit's strength --------
          • -------- - --------
          • Set SA_R_HealAmt = ((Real((Strength of SA_U_AtkUnit (Include bonuses)))) x (SA_R_Heal[SA_I_Level] x 0.01))
        • Else - Actions
          • -------- - --------
          • -------- if this is applied, then the heal amount is equal to the predefined value in the trigger configuration --------
          • -------- - --------
          • Set SA_R_HealAmt = SA_R_Heal[SA_I_Level]
      • -------- - --------
      • -------- sets the position of the attacked units into a variable --------
      • -------- - --------
      • Set SA_P_AtkPos = (Position of SA_U_AtkUnit)
      • -------- - --------
      • -------- selects the valid units that can be healed --------
      • -------- - --------
      • Set SA_UG_UnitGroup = (Units within SA_R_AoE[SA_I_Level] of SA_P_AtkPos)
      • -------- - --------
      • -------- heals the picked units --------
      • -------- - --------
      • Unit Group - Pick every unit in SA_UG_UnitGroup and do (Actions)
        • Loop - Actions
          • Set SA_U_Picked = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SA_U_Picked is dead) Equal to False
              • (SA_U_Picked belongs to an ally of SA_PL_Player) Equal to True
              • (SA_U_Picked is A structure) Equal to False
              • (SA_U_Picked is Magic Immune) Equal to False
              • (SA_U_Picked has buff SA_BF_Buff) Equal to True
              • (Level of SA_A_PassiveAbility for SA_U_Picked) Less than 1
            • Then - Actions
              • -------- - --------
              • -------- sets the picked unit into a variable --------
              • -------- its ok to recycle this variable isn't it? --------
              • -------- - --------
              • -------- - --------
              • -------- Heals the picked unit --------
              • -------- - --------
              • Unit - Set life of SA_U_Picked to ((Life of SA_U_Picked) + SA_R_HealAmt)
              • -------- - --------
              • -------- Add some visuals --------
              • -------- - --------
              • Special Effect - Create a special effect attached to the SA_S_Attach of SA_U_Picked using SA_S_SFX
              • -------- - --------
              • -------- destroy visuals to prevent leaks --------
              • -------- - --------
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
          • Set SA_U_Picked = No unit
      • -------- - --------
      • -------- Clean up --------
      • -------- - --------
      • -------- SA_UG_UnitGroup.Clear(); --------
      • -------- Clear the unit group --------
      • -------- - --------
      • Unit Group - Remove all units from SA_UG_UnitGroup
      • -------- - --------
      • -------- Destroy the instance of the unit group --------
      • -------- - --------
      • Custom script: call DestroyGroup(udg_SA_UG_UnitGroup)
      • -------- - --------
      • -------- Destroy the point --------
      • -------- - --------
      • Custom script: call RemoveLocation(udg_SA_P_AtkPos)



Dat-C3 - for adding damage detection and for helping on a lot of stuff.
looking_for_help aka eey - for his damage detection system.


Keywords:
holy,passive,savior,aura,human,heal
Contents

Savior's Aura (Map)

Reviews
19:33, 9th Jan 2015 IcemanBo: Simple concept. Code works fine. Approved. http://www.hiveworkshop.com/forums/spells-569/saviors-aura-v1-1-a-256071/index2.html#post2638132
I figured while I am at it fixing your other spell, I hope you don't mind if I help you here as well. :thumbs_up:

Was it your intention so whenever a unit is about to hit a unit under this aura that it triggers? I think its better if they were damaged first then start it because someone can spam stop and force your triggers to run even though no damage was taken at all. A nasty bug with unit is attacked since it catches the unit "as" it is attacking and not when it actually attacked.

Damage Detection systems fix this bug
 
if u do that its actually ur disadvantage since the spell is only triggered when attacked by enemy unit. but yeah a DDS will surely fix it.

Accidents happen and sometimes the unit might attack twice just for targeting purposes or stuns.

Like I said about that example, here it is.

[trigger=]
Events
Conditions
Actions
Set SA_UG_UnitGroup = (Units within SA_R_AoE[SA_I_Level] of SA_P_AtkPos)
-------- heals the picked units --------
Unit Group - Pick every unit in SA_UG_UnitGroup and do (Actions)
Loop - Actions
Set SA_U_Picked = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SA_U_Picked is dead) Equal to False
(SA_U_Picked belongs to an ally of SA_PL_Player) Equal to True
(SA_U_Picked is A structure) Equal to False
(SA_U_Picked is Magic Immune) Equal to False
(SA_U_Picked has buff SA_BF_Buff) Equal to True
(Level of SA_A_PassiveAbility for SA_U_Picked) Less than 1
Then - Actions
-------- - --------
-------- sets the picked unit into a variable --------
-------- its ok to recycle this variable isn't it? --------
-------- - --------
-------- - --------
-------- Heals the picked unit --------
-------- - --------
Unit - Set life of SA_U_Picked to ((Life of SA_U_Picked) + SA_R_HealAmt)
-------- - --------
-------- Add some visuals --------
-------- - --------
Special Effect - Create a special effect attached to the SA_S_Attach of SA_U_Picked using SA_S_SFX
-------- - --------
-------- destroy visuals to prevent leaks --------
-------- - --------
Special Effect - Destroy (Last created special effect)
Else - Actions
Set SA_U_Picked = No unit
[/trigger]

I have also uploaded the fixed version of your aura if you'd or anyone else would like it.
 

Attachments

  • Dat Savior's Aura.w3x
    56.7 KB · Views: 185
[trigger=]
SaviorAuraEffect
Events
Game - damageEventTrigger becomes Equal to 1.00
Conditions
(Level of SA_A_ActiveAbility for target) Greater than 0
(source belongs to an enemy of (Owner of target)) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
damageType Equal to PHYSICAL
Then - Actions
-------- Actions for PHYSICAL damage --------
-------- - --------
-------- Set the attacked unit --------
-------- - --------
Set SA_U_AtkUnit = target
-------- - --------
-------- Determine the owner of the unit --------
-------- - --------
Set SA_PL_Player = (Owner of SA_U_AtkUnit)
-------- - --------
-------- set the level of the ability into a variable --------
-------- - --------
Set SA_I_Level = (Level of SA_A_ActiveAbility for SA_U_AtkUnit)
-------- - --------
-------- Checks on what value should be applied on the aura's healing effect --------
-------- - --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SA_B_UseStat Equal to True
Then - Actions
-------- - --------
-------- if this is applied then the heal value is equal to a certain percentage of the attacked unit's strength --------
-------- - --------
Set SA_R_HealAmt = ((Real((Strength of SA_U_AtkUnit (Include bonuses)))) x (SA_R_Heal[SA_I_Level] x 0.01))
Else - Actions
-------- - --------
-------- if this is applied, then the heal amount is equal to the predefined value in the trigger configuration --------
-------- - --------
Set SA_R_HealAmt = SA_R_Heal[SA_I_Level]
-------- - --------
-------- sets the position of the attacked units into a variable --------
-------- - --------
Set SA_P_AtkPos = (Position of SA_U_AtkUnit)
-------- - --------
-------- selects the valid units that can be healed --------
-------- - --------
Set SA_UG_UnitGroup = (Units within SA_R_AoE[SA_I_Level] of SA_P_AtkPos)
-------- - --------
-------- heals the picked units --------
-------- - --------
Unit Group - Pick every unit in SA_UG_UnitGroup and do (Actions)
Loop - Actions
Set SA_U_Picked = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SA_U_Picked is dead) Equal to False
(SA_U_Picked belongs to an ally of SA_PL_Player) Equal to True
(SA_U_Picked is A structure) Equal to False
(SA_U_Picked is Magic Immune) Equal to False
(SA_U_Picked has buff SA_BF_Buff) Equal to True
(Level of SA_A_PassiveAbility for SA_U_Picked) Less than 1
Then - Actions
-------- - --------
-------- sets the picked unit into a variable --------
-------- its ok to recycle this variable isn't it? --------
-------- - --------
-------- - --------
-------- Heals the picked unit --------
-------- - --------
Unit - Set life of SA_U_Picked to ((Life of SA_U_Picked) + SA_R_HealAmt)
-------- - --------
-------- Add some visuals --------
-------- - --------
Special Effect - Create a special effect attached to the SA_S_Attach of SA_U_Picked using SA_S_SFX
-------- - --------
-------- destroy visuals to prevent leaks --------
-------- - --------
Special Effect - Destroy (Last created special effect)
Else - Actions
Set SA_U_Picked = No unit
-------- - --------
-------- Clean up --------
-------- - --------
-------- SA_UG_UnitGroup.Clear(); --------
-------- Clear the unit group --------
-------- - --------
Unit Group - Remove all units from SA_UG_UnitGroup
-------- - --------
-------- Destroy the instance of the unit group --------
-------- - --------
Custom script: call DestroyGroup(udg_SA_UG_UnitGroup)
-------- - --------
-------- Destroy the point --------
-------- - --------
Custom script: call RemoveLocation(udg_SA_P_AtkPos)
-------- End of Actions for PHYISCAL damage --------
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
damageType Equal to SPELL
Then - Actions
-------- Actions for SPELL damage --------
-------- End of Actions for SPELL damage --------
Else - Actions
-------- Actions for CODE damage --------
-------- End of Actions for CODE damage --------

[/trigger]


Shouldn't double-run now.
 

Attachments

  • Dat Savior's Aura2.w3x
    56.7 KB · Views: 163

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
Review emerges!

Trigger:

    • Time - Elapsed game time is 0.00 seconds
    Personally, I would prefer to follow the convention to preload everything at the loading screen:
    • Map initialization

    • Set SA_U_AtkUnit = target
    I think you can just use variable target.

    • Unit Group - Remove all units from SA_UG_UnitGroup
    Unneeded because you are destroying the group afterwards.

    • SaviorAuraLearn
      • Events
        • Unit - A unit Learns a skill
      • Conditions
        • (Level of SA_A_ActiveAbility for (Triggering unit)) Greater than (>) 0
        • (Learned Hero Skill) Equal to (==) Savior's Aura (Active)
      • Actions
        • ...
    =>

    • SaviorAuraLearn
      • Events
        • Unit - A unit Learns a skill
      • Conditions
        • (Level of SA_A_ActiveAbility for (Triggering unit)) Equal to (==) 1
        • (Learned Hero Skill) Equal to (==) SA_A_ActiveAbility
      • Actions
        • ...
    Check the condition.

Object datas & miscs:
  • I don't get how this ability can even be categorized as an "aura". This doesn't directly affect units around the Hero, doesn't give any buff/effect to those units. This is more like a just another passive ability. Not being harsh, but I will disqualify this entry if I was a judge there.
    But actually, that's not a matter for now.
  • This ability is way too overpowered. You should add something like a chance for the effect to be triggered. As example, Hero has 5% to heal nearby allies when attacked.
    I believe this is one big minus to your score in the contest.
  • Using two additional dummy abilities (passive and disabled spellbook) is a neat method how to add buff to all units around easily. Nice one!
  • There is nothing wrong with object datas

Rating:
I don't think the concept is that outstanding. But I like your clean coding style, and it's rather flawless. It's MUI, leakless, and well-coded with some neat additional tricks to avoid extra bunch of codes.

3/5 for now and vote for Approved
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
But the condition being == 1 will block out the skill on levels 2-4.

If I remember it correctly, he is just adding spellbook ability on that trigger. You only need to add it once at ability level 1. Except if he is adding different abilities and assigning different values/datas on each level, then the first condition shouldn't be changed.
 
  • Only need to add the passive ability once. Not each level.
  • User could be warned in config the AOE to be exactly the same as the AOE of the passive in object editor.
    Else the buff check could fail.
  • In your filter for healing, you could check if the unit is in UnitGroup (boolean), instead of checking for ability level. (integer) Result is same, but for me it's simpler and clear.

Approved (please add the warning in a short comment)

@Maker, it's checked if it's dead equals to false:

  • (SA_U_Picked is dead) == False
  • ....
  • (SA_U_Picked has buff SA_BF_Buff) == True
 
Top