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

[Spell] Can anyone recreate this broken ability?

Level 14
Joined
Jul 19, 2007
Messages
772
I have a hero ability in my map named "Untouchable" that works like this "Gives Galadriel a chance to damage enemies that attack her and slow their attack and movement speed by 35% for 2.5 seconds. |n|n|cffffcc00Level 1|r - 10% chance to deal 20 damage. |n|cffffcc00Level 2|r - 15% chance to deal 40 damage. |n|cffffcc00Level 3|r - 20% chance to deal 60 damage. |n|cffffcc00Level 4|r - 25% chance to deal 80 damage." I didn't make this ability myself. I got it from a spellpack but the ability is kinda broken because it has a chance to damage and slow enemies when Galadriel is hit by a spell or damage-overtime effect too but it's meant to only have chance to damage and slow enemies that are physically attacking her, not from spells. To bad the GDD system doesn't seems to be able to check if damage was done by normal attack so I can't fix this ability myself and I think it needs to be recreated. I hope someone will make it for me.

Here is the current triggers of the broken ability.
  • Thorn Armor Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Set the base damage (Level 1) --------
      • Set VariableSet TA_BaseDamage = 20.00
      • -------- Set the damage growth per each additional level --------
      • Set VariableSet TA_DamageGrowth = 20.00
      • -------- Set the base chance (Level 1) --------
      • Set VariableSet TA_BaseChance = 10
      • -------- Set the chance growth per each additional level --------
      • Set VariableSet TA_ChanceGrowth = 5
      • -------- Set the special effect --------
      • Set VariableSet TA_SFX = Shot II Blue.mdx
  • Thorn Armor
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget has buff Untouchable (Armor)) Equal to True
    • Actions
      • Set VariableSet TA_Levels = (Level of Untouchable for DamageEventTarget)
      • Set VariableSet TA_ThornSpawn = (Position of DamageEventTarget)
      • Set VariableSet TA_ThornEffect = (Position of DamageEventSource)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to (TA_BaseChance + (TA_ChanceGrowth x (TA_Levels - 1)))
          • (DamageEventSource is A structure) Not equal to True
          • (DamageEventSource is A flying unit) Not equal to True
        • Then - Actions
          • Special Effect - Create a special effect at TA_ThornEffect using TA_SFX
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause DamageEventTarget to damage DamageEventSource, dealing (TA_BaseDamage + (TA_DamageGrowth x ((Real(TA_Levels)) - 1.00))) damage of attack type Spells and damage type Magic
          • Unit - Create 1 Thorn Armor Dummy for (Owner of DamageEventTarget) at TA_ThornSpawn facing Default building facing degrees
          • Set VariableSet Thorn_Dummy = (Last created unit)
          • Unit - Add a 1.00 second Generic expiration timer to Thorn_Dummy
          • Unit - Add Untouchable (slow) to Thorn_Dummy
          • Unit - Order Thorn_Dummy to Human Sorceress - Slow DamageEventSource
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TA_ThornSpawn)
      • Custom script: call RemoveLocation(udg_TA_ThornEffect)
  • Remove Dummy Leak
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Thorn Armor Dummy
    • Actions
      • Unit - Remove (Triggering unit) from the game
 
Level 12
Joined
Feb 5, 2018
Messages
521
Try adding these
  • xxxxxx
    • Events
    • Conditions
      • IsDamageMelee Equal to True
      • DamageEventAttackT Equal to ATTACK_TYPE_NORMAL
    • Actions
You can also add other condtion checks, like isdamage code and stuff. :)
EDIT: You can also add isdamageranged true, the everything should be in check
 
Level 14
Joined
Jul 19, 2007
Messages
772
Try adding these
  • xxxxxx
    • Events
    • Conditions
      • IsDamageMelee Equal to True
      • DamageEventAttackT Equal to ATTACK_TYPE_NORMAL
    • Actions
You can also add other condtion checks, like isdamage code and stuff. :)
EDIT: You can also add isdamageranged true, the everything should be in check
Doesn't work. I tried to make it check if attack type is normal and then it will only work against units with normal attacks, not hero attacks, pierce or chaos and more... I want it to work against all attacks that is physically but not spells or poison effects for example.
 
Level 12
Joined
Feb 5, 2018
Messages
521
Ok here is a simplified trigger for you which sould work like how you want. If you are on latest patch I can give you a testmap.


  • xxxxxx
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageMelee Equal to True
      • IsDamageRanged Equal to True
      • DamageEventAttackT Equal to ATTACK_TYPE_NORMAL
      • DamageEventAttackT Equal to ATTACK_TYPE_PIERCE
      • DamageEventAttackT Equal to ATTACK_TYPE_SIEGE
      • DamageEventAttackT Equal to ATTACK_TYPE_HERO
      • DamageEventAttackT Equal to ATTACK_TYPE_CHAOS
      • (DamageEventSource is A structure) Equal to False
      • (DamageEventSource is A flying unit) Equal to False
      • (DamageEventTarget has buff Thorn Armor ) Equal to True
    • Actions
      • Set VariableSet TA_Level = (Level of Thorn Armor for DamageEventTarget)
      • Set VariableSet TA_Chance = (5 + (TA_Level x 5))
      • Set VariableSet TA_Damage = ((Real(TA_Level)) x 20.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to TA_Chance
        • Then - Actions
          • Unit - Cause DamageEventTarget to damage DamageEventSource, dealing TA_Damage damage of attack type Normal and damage type Normal
          • -------- Do dummy stuff here --------
        • Else - Actions
 
Level 14
Joined
Jul 19, 2007
Messages
772
Ok here is a simplified trigger for you which sould work like how you want. If you are on latest patch I can give you a testmap.


  • xxxxxx
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageMelee Equal to True
      • IsDamageRanged Equal to True
      • DamageEventAttackT Equal to ATTACK_TYPE_NORMAL
      • DamageEventAttackT Equal to ATTACK_TYPE_PIERCE
      • DamageEventAttackT Equal to ATTACK_TYPE_SIEGE
      • DamageEventAttackT Equal to ATTACK_TYPE_HERO
      • DamageEventAttackT Equal to ATTACK_TYPE_CHAOS
      • (DamageEventSource is A structure) Equal to False
      • (DamageEventSource is A flying unit) Equal to False
      • (DamageEventTarget has buff Thorn Armor ) Equal to True
    • Actions
      • Set VariableSet TA_Level = (Level of Thorn Armor for DamageEventTarget)
      • Set VariableSet TA_Chance = (5 + (TA_Level x 5))
      • Set VariableSet TA_Damage = ((Real(TA_Level)) x 20.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to TA_Chance
        • Then - Actions
          • Unit - Cause DamageEventTarget to damage DamageEventSource, dealing TA_Damage damage of attack type Normal and damage type Normal
          • -------- Do dummy stuff here --------
        • Else - Actions
Yes pls give a testmap. I have the latest patch.
 
Level 25
Joined
Sep 26, 2009
Messages
2,381
  • Conditions
    • IsDamageMelee Equal to True
    • IsDamageRanged Equal to True
    • DamageEventAttackT Equal to ATTACK_TYPE_NORMAL
    • DamageEventAttackT Equal to ATTACK_TYPE_PIERCE
    • DamageEventAttackT Equal to ATTACK_TYPE_SIEGE
    • DamageEventAttackT Equal to ATTACK_TYPE_HERO
    • DamageEventAttackT Equal to ATTACK_TYPE_CHAOS
I doubt all of these can be true at the same time
 
Level 12
Joined
Feb 5, 2018
Messages
521
Here you go and here is the final trigger
  • Thorn Armor
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource is A flying unit) Equal to False
      • (DamageEventSource is A structure) Equal to False
      • (DamageEventTarget has buff Thorns Aura) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • DamageEventAttackT Equal to ATTACK_TYPE_NORMAL
          • DamageEventAttackT Equal to ATTACK_TYPE_HERO
          • DamageEventAttackT Equal to ATTACK_TYPE_CHAOS
          • DamageEventAttackT Equal to ATTACK_TYPE_SIEGE
          • DamageEventAttackT Equal to ATTACK_TYPE_PIERCE
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEventAttackT Not equal to ATTACK_TYPE_SPELLS
          • DamageEventAttackT Not equal to ATTACK_TYPE_MAGIC
        • Then - Actions
          • Set VariableSet Ta_Chance = (5 + (Ta_Level x 5))
          • Game - Display to (All players) the text: (String(Ta_Chance))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to Ta_Chance
            • Then - Actions
              • Set VariableSet Ta_Level = (Level of Thorns Aura for DamageEventTarget)
              • Set VariableSet Ta_Damage = (20.00 x (Real(Ta_Level)))
              • Game - Display to (All players) the text: (String((Integer(Ta_Damage))))
              • Unit - Cause DamageEventTarget to damage DamageEventSource, dealing Ta_Damage damage of attack type Normal and damage type Normal
              • -------- TEST MAP --------
              • Floating Text - Create floating text that reads (String((Integer(Ta_Damage)))) above DamageEventSource with Z offset 0.00, using font size 7.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
              • -------- DO DUMMY UNIT HERE --------
            • Else - Actions
        • Else - Actions
 

Attachments

  • TATestMap.w3m
    67.3 KB · Views: 1
Level 14
Joined
Jul 19, 2007
Messages
772
Here you go and here is the final trigger
  • Thorn Armor
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource is A flying unit) Equal to False
      • (DamageEventSource is A structure) Equal to False
      • (DamageEventTarget has buff Thorns Aura) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • DamageEventAttackT Equal to ATTACK_TYPE_NORMAL
          • DamageEventAttackT Equal to ATTACK_TYPE_HERO
          • DamageEventAttackT Equal to ATTACK_TYPE_CHAOS
          • DamageEventAttackT Equal to ATTACK_TYPE_SIEGE
          • DamageEventAttackT Equal to ATTACK_TYPE_PIERCE
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEventAttackT Not equal to ATTACK_TYPE_SPELLS
          • DamageEventAttackT Not equal to ATTACK_TYPE_MAGIC
        • Then - Actions
          • Set VariableSet Ta_Chance = (5 + (Ta_Level x 5))
          • Game - Display to (All players) the text: (String(Ta_Chance))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to Ta_Chance
            • Then - Actions
              • Set VariableSet Ta_Level = (Level of Thorns Aura for DamageEventTarget)
              • Set VariableSet Ta_Damage = (20.00 x (Real(Ta_Level)))
              • Game - Display to (All players) the text: (String((Integer(Ta_Damage))))
              • Unit - Cause DamageEventTarget to damage DamageEventSource, dealing Ta_Damage damage of attack type Normal and damage type Normal
              • -------- TEST MAP --------
              • Floating Text - Create floating text that reads (String((Integer(Ta_Damage)))) above DamageEventSource with Z offset 0.00, using font size 7.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
              • -------- DO DUMMY UNIT HERE --------
            • Else - Actions
        • Else - Actions
Still doesn't work. I imported the ability into my map and edited the triggers so it creates the dummy unit to slow the damaged enemies but it doesn't damage or slow the attack enemies at all, only the special effect is shown on them. I made it 100% chance so I could more easily check if the trigger works or not...
  • Untouchable
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource is A flying unit) Equal to False
      • (DamageEventSource is A structure) Equal to False
      • (DamageEventTarget has buff Untouchable (Armor)) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • DamageEventAttackT Equal to ATTACK_TYPE_NORMAL
          • DamageEventAttackT Equal to ATTACK_TYPE_HERO
          • DamageEventAttackT Equal to ATTACK_TYPE_CHAOS
          • DamageEventAttackT Equal to ATTACK_TYPE_SIEGE
          • DamageEventAttackT Equal to ATTACK_TYPE_PIERCE
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEventAttackT Not equal to ATTACK_TYPE_SPELLS
          • DamageEventAttackT Not equal to ATTACK_TYPE_MAGIC
        • Then - Actions
          • Set VariableSet Ta_Chance = (100 + (Ta_Level x 5))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to Ta_Chance
            • Then - Actions
              • Set VariableSet TA_ThornEffect = (Position of DamageEventSource)
              • Set VariableSet Ta_Level = (Level of Thorns Aura for DamageEventTarget)
              • Set VariableSet Ta_Damage = (20.00 x (Real(Ta_Level)))
              • Unit - Cause DamageEventTarget to damage DamageEventSource, dealing Ta_Damage damage of attack type Normal and damage type Normal
              • -------- DO DUMMY UNIT HERE --------
              • Unit - Create 1 Thorn Armor Dummy for (Owner of DamageEventTarget) at TA_ThornSpawn facing Default building facing degrees
              • Set VariableSet Thorn_Dummy = (Last created unit)
              • Unit - Add a 1.00 second Generic expiration timer to Thorn_Dummy
              • Unit - Add Untouchable (slow) to Thorn_Dummy
              • Unit - Order Thorn_Dummy to Human Sorceress - Slow DamageEventSource
              • Special Effect - Create a special effect at TA_ThornEffect using Shot II Blue.mdx
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
        • Else - Actions
          • Custom script: call RemoveLocation(udg_TA_ThornEffect)
 
Level 12
Joined
Feb 5, 2018
Messages
521
Set VariableSet Ta_Chance = (100 + (Ta_Level x 5))
It won't run cause the math random number between 1 and 100 is always over 100 now.
Just do TA_Chance = 100 and revert it back after testing.

I ran the testmap multiple times and can with a confidence say it worked properly.
 
Level 12
Joined
Feb 5, 2018
Messages
521
Well it doesn't work for me. It just shows the special-effect but no damage or slow :-/
Did you try the trigger in the test map? It could be that something is interfering with the trigger in your map. Also previously you had DamageModifier event becomes equal to 1 instead of DamageEvent. Maybe try this trigger with the DamageModifierEvent.
 
Level 14
Joined
Jul 19, 2007
Messages
772
Did you try the trigger in the test map? It could be that something is interfering with the trigger in your map. Also previously you had DamageModifier event becomes equal to 1 instead of DamageEvent. Maybe try this trigger with the DamageModifierEvent.
I tried it without any result... It's wierd how it refuses to damage and slow the attackers but still it creates the special effect on them.
 
Level 12
Joined
Feb 5, 2018
Messages
521
I tried it without any result... It's wierd how it refuses to damage and slow the attackers but still it creates the special effect on them.
I noticed that the TA_Level variable uses Thorns Aura instead of your custom skill.
Set VariableSet Ta_Level = (Level of Thorns Aura for DamageEventTarget)
Try fixing this to your custom skill. Then lets investigate further.
 
Top