• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Evasion and Critical with agility

Level 1
Joined
Jul 1, 2020
Messages
3
Hello, i making a RPG map and i want to use agility that influence the chance of the hide passive of Evasion and Critical Strike with a trigger, i been looking but i don't find a clear solution to do this.
 
Level 3
Joined
May 24, 2017
Messages
15
How about creating an evasion with 99 levels, from 1% evasion to 99% evasion. Give to all heroes.
Then make a trigger with a periodic event to set the level of the Evasion to the % you want based on that hero's agility.
For example, if 2 agility = 1% evasion. You'd set ability level to Hero's agility / 2.
 
Level 32
Joined
Aug 29, 2012
Messages
1,477
You can trigger it all to have flexibility, here are the bare bones of a system (reforged needed for this useful event in GUI):

  • Evasion
    • Events
      • Unit - A unit About to take damage
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Damage From Normal Attack) Equal to True
    • Actions
      • Set VariableSet EvadeChances = (Real((Agility of (Triggering unit) (Include bonuses))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random real number between 0.00 and 100.00) Less than or equal to EvadeChances
        • Then - Actions
          • -------- Cancel the damage --------
          • Event Response - Set Damage of Unit Damaged Event to 0.00
          • -------- Show a little text like the real evasion --------
          • Floating Text - Create floating text that reads |c00FF0000miss!|r above (Damage source) with Z offset 0.00, using font size 9.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • 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 - Change the fading age of (Last created floating text) to 1.00 seconds
        • Else - Actions
  • Crit
    • Events
      • Unit - A unit About to take damage
    • Conditions
      • ((Damage source) is A Hero) Equal to True
      • (Damage From Normal Attack) Equal to True
    • Actions
      • Set VariableSet CritChances = (Real((Agility of (Damage source) (Include bonuses))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random real number between 0.00 and 100.00) Less than or equal to CritChances
        • Then - Actions
          • -------- Deal double damage or whatever value you want --------
          • Event Response - Set Damage of Unit Damaged Event to ((Damage taken) x 2.00)
          • -------- Show a little text like the real crit --------
          • Floating Text - Create floating text that reads (|c00FF0000 + ((String((Integer((Damage taken))))) + !|r)) above (Damage source) with Z offset 0.00, using font size 9.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • 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 - Change the fading age of (Last created floating text) to 1.00 seconds
        • Else - Actions
You can add conditions and probably array based on how many heroes can benefit from those, and do something about the text so that it doesn't overlap, but that's basically it
 

Attachments

  • Example.w3x
    18.6 KB · Views: 1
Top