• 🏆 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] Evasion reduced by attacking hero's agility.

Status
Not open for further replies.
Level 3
Joined
Mar 29, 2011
Messages
38
Can i make a Evasion spell for a unit that reducing based on attacking hero's agility?

That's means the more agility the attacking hero have, the little evasion rate of the attacked unit.

sorry for my bad English.
 
Level 10
Joined
Jul 12, 2009
Messages
318
You might want to instead base it on Cursing the attacking unit (making it miss), rather than giving the target unit some Evasion. This is because a unit will only be attacking one target, but a target may be under attack from many units. This way, every attacker can have the correct (different) chance to miss.

With the event Unit is attacked, do whatever kind of calculation you want to compare the attacker and the triggering unit's agility, and use a dummy caster to Curse the attacking unit. The Curse spell can have multiple levels for different chance to miss. This will always work because the event Unit is attacked runs before the attack actually happens. The drawback is that it would conflict if any unit in your map has a spell based on Curse, or if any unit is able to dispel magic.
 
Level 3
Joined
Mar 29, 2011
Messages
38
Sorry for slow reply, my house has some electrical problem.

Agility ; evasion
0 - 10 ; 50%
11 - 20 ; 40%
21 - 30 ; 30%
31 - 40 ; 20%
41 - 50 ; 10%
51 - ... ; 0%

Does it make sense?

Remember that evasion cuts average attack damage by the evasion percentage (if no splash is present like cleave or a siege weapon).
Sorry but i don't understand, my English is really bad.
 
Status
Not open for further replies.
Top