• 🏆 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] How to create triggered evasaion??

Status
Not open for further replies.
Level 4
Joined
Jul 26, 2016
Messages
88
if (Random number between 0 and 100) less than or equal to 10 + (0.5 times (Level of Evasion for Triggering unit)) then (whatever code you use to make the evasion happen)
 
Level 39
Joined
Feb 27, 2007
Messages
5,015
Triggered evasion is a really difficult thing because you need a full damage detection system for it. It's possible that evasion abilities stack multiplicatively (dodgetotal = 1 - (1-dodge1)*(1-dodge2) instead of dodgetotal = dodge1+dodge2, which would be additive stacking) in which case you're in luck.

The reason it might possibly be multiplicative is evasion has a 100% hard cap, and capped stats don't play nice with additive scaling. To test, make 2 separate evasion abilities that each give 50% dodge. Put one on a unit and confirm that roughly 5/10 attacks miss. Then add the second ability and see if you get any misses-- if you do it's multiplicative (50%+50% should be 100% dodge). If about 5 still hit then the abilities don't stack at all and you should retry with one ability based off Drunken Brawler and one off Evasion.
 
Status
Not open for further replies.
Top