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

How do I make the damage of a skill that has been edited be affected by the level of another skill?

Level 2
Joined
Sep 11, 2022
Messages
14
Greetings, in the past few days, I have tried a trigger that makes the damage of blizzard skills equal to 100% of Archmage's intelligence. It worked.
  • [LIST]
  • [*]Event:
  • [LIST]
  • [*]Unit - Any unit starts casting a spell
  • [/LIST]
  • [*]Conditions:
  • [LIST]
  • [*](Spell being cast) Equal to Blizzard (Antonidas)
  • [/LIST]
  • [*]Actions:
  • [LIST]
  • [*]Ability - Set (Blizzard (Antonidas))'s (damage per wave) at level 0 for (Real((Intelligence of (Casting unit)) (including bonus)))
  • [*]Ability - Set (Blizzard (Antonidas))'s (damage per wave) at level 1 for (Real((Intelligence of (Casting unit)) (including bonus)))
  • [*]Ability - Set (Blizzard (Antonidas))'s (damage per wave) at level 2 for (Real((Intelligence of (Casting unit)) (including bonus)))
  • [/LIST]
  • [/LIST]
I then tried to write another trigger that would give Blizzard 5%/25%/50% extra damage based on level of Brilliance Aura. Therefore, Level 3 Brilliance Aura will cause Blizzard's damage each wave be 150% of the hero's intelligence. However, I tried many ways and still couldn't achieve this. I turned to another forum and an expert tried to write the following triggers and variables, but it didn't work. This trigger changes the original value of damage each wave, not the changed value. (100% intelligence)
  • [B]Untitled Trigger 002[/B]
  • [LIST]
  • [*]AHbz_B=Boolean value, initial value FALSE
  • [*]Event:
  • [LIST]
  • [*]Time - Elapsed game time 0.00 seconds
  • [/LIST]
  • [*]Conditions:
  • [*]Actions:
  • [LIST]
  • [*]Set A_Hbz2_add[0] to 0.05
  • [*]Set A_Hbz2_add[1] to 0.25
  • [*]Set A_Hbz2_add[2] to 0.50
  • [*]Set AHbz_B to TRUE
  • [/LIST]
  • [/LIST]
  • [LIST]
  • [*]ability=skill
  • [*]A_Hbz2=Real numbers, array size 1
  • [*]A_Hbz2_add=Real numbers, array size 1
  • [*]A_lvl=Integer
  • [*]A_lvl_2=Integer
  • [B]Untitled Trigger 003[/B]
  • [*][LIST]
  • [*]Event:
  • [LIST]
  • [*]Unit - Any unit learns a skill
  • [/LIST]
  • [*]Conditions:
  • [*]Actions:
  • [LIST]
  • [*]Set A_lvl to ((Blizzard (Antonidas) level, for (hero who learned the skill)) - 1)
  • [*]Set A_lvl_2 to ((Brilliance Aura (Antonidas) level, for (hero who learned the skill)) - 1)
  • [*]Set ability to (Blizzard (Antonidas) of triggering unit)
  • [*]If all conditions are true, then do action 1, else do action 2
  • [LIST]
  • [*]If - Conditions
  • [LIST]
  • [*](Learned skill by hero) equal to Blizzard (Antonidas)
  • [*]Set AHbz_B to TRUE
  • [/LIST]
  • [*]Then - Actions
  • [LIST]
  • [*]Set AHbz_B to FALSE
  • [*]For each integer A from 0 to 2, do multiple actions
  • [LIST]
  • [*]Loop - Actions
  • [LIST]
  • [*]Set A_Hbz2[(A)] to (damage per wave of (ability) at level (A))
  • [/LIST]
  • [/LIST]
  • [*]Else - Actions
  • [/LIST]
  • [/LIST]
  • [*]If all conditions are true, then do action 1, else do action 2
  • [LIST]
  • [*]If - Conditions
  • [LIST]
  • [*]A_lvl_2 greater than or equal to 0
  • [/LIST]
  • [*]Then - Actions
  • [LIST]
  • [*]Ability - Set (damage per wave of (ability) to (A_Hbz2[A_lvl] * (1.00 + A_Hbz2_add[A_lvl_2])) at level A_lvl)
  • [*]Unit - Increase Blizzard (Antonidas) level for (hero who learned the skill)
  • [*]Unit - Decrease Blizzard (Antonidas) level for (hero who learned the skill)
  • [/LIST]
  • [*]Else - Actions
  • [/LIST]
  • [/LIST]
  • [/LIST]
This trigger still doesn't work, how should I achieve making Brilliance Aura's level increase Blizzard's damage?
[/LIST]
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,550
Make sure to wrap your triggers with the word trigger, not LIST.

Here's how you can do it with two Integer variables for tracking both ability levels, a Real array variable for tracking Brilliance damage multiplier, and a Real variable for tracking Blizzard's final damage:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Blizzard
  • Actions
    • Set Variable Blizzard_Lvl = (Level of (Ability being cast)) - 1)
    • Set Variable Brilliance_Lvl = (Level of Brilliance Aura for (Triggering unit))
    • Set Variable Brilliance_Dmg[0] = 1.00
    • Set Variable Brilliance_Dmg[1] = 1.05
    • Set Variable Brilliance_Dmg[2] = 1.25
    • Set Variable Brilliance_Dmg[3] = 1.50
    • Set Variable Blizzard_Dmg = (Real((Intelligence of (Triggering unit)) (including bonus))
    • Set Variable Blizzard_Dmg = (Blizzard_Dmg x Brilliance_Dmg[Brilliance_Lvl])
    • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage Per Second ('Hbz5') of Level: Blizzard_Lvl to Blizzard_Dmg
People generally create a "Setup" trigger to initialize their Arrays since you only need to Set the values for Brilliance_Dmg[] once. It's not the end of the world to put it in the Cast trigger but it is less efficient.
 
Last edited:
Level 2
Joined
Sep 11, 2022
Messages
14
Make sure to wrap your triggers with the word trigger, not LIST.

Here's how you can do it with two Integer variables for tracking both ability levels, a Real array variable for tracking Brilliance damage multiplier, and a Real variable for tracking Blizzard's final damage:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Blizzard
  • Actions
    • Set Variable Blizzard_Lvl = (Level of (Ability being cast)) - 1)
    • Set Variable Brilliance_Lvl = (Level of Brilliance Aura for (Triggering unit))
    • Set Variable Brilliance_Dmg[0] = 1.00
    • Set Variable Brilliance_Dmg[1] = 1.05
    • Set Variable Brilliance_Dmg[2] = 1.25
    • Set Variable Brilliance_Dmg[3] = 1.50
    • Set Variable Blizzard_Dmg = (Real((Intelligence of (Triggering unit)) (including bonus))
    • Set Variable Blizzard_Dmg = (Blizzard_Dmg x Brilliance_Dmg[Brilliance_Lvl])
    • Ability - Set (Blizzard (Antonidas))'s (damage per wave) at level Blizzard_Lvl to Blizzard_Dmg
People generally create a "Setup" trigger to initialize their Arrays since you only need to Set the values for Brilliance_Dmg[] once. It's not the end of the world to put it in the Cast trigger but it is less efficient.
Thanks uncle I will try it soon
 
Top