# [Spell]Evasion reduced by attacking hero's agility.

Status
Not open for further replies.

#### hylists

Level 3
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.

#### Weep

Level 10
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.

#### Dr Super Good

Spell Reviewer
Level 64
You need to design a formula firstly as to how it should evade for what agility.

Remember that evasion cuts average attack damage by the evasion percentage (if no splash is present like cleave or a siege weapon).

#### hylists

Level 3
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.

#### Dr Super Good

Spell Reviewer
Level 64
You would have to do the curse method with levels. The formula is simple enough if you make the levels corospond to each range (level 1 = 50%, 2 = 40% etc).

Status
Not open for further replies.

Replies
38
Views
4K
Replies
2
Views
235
Replies
5
Views
583
Replies
4
Views
2K
Replies
12
Views
1K