• 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.

[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 45
Joined
Feb 27, 2007
Messages
5,578
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