Ability: Dance of Shadow (Hyped-up Evasion)

San-D

New Member
Reaction score
15
The idea is to create a ability which gives the learning hero a chance to evade an attack, but instead of just missing it, the evader has to be moved instantly to a random location within range of the attacker. The trigger shoul be non JASS/MUI, and should look something like:
Even
A unit (starts the effect of an ability)
Condition
??? equal to Dance of Shadow
Action
Variable - Set ??? unit as (Evader)
Variable - Set ??? unit as (Attacker)
Unit - move (Evader) instantly to random point in (region converted at (position of (Attacker)) 600, 600))

So the problem is what is the response to starts the effect of an ability, what should the comparison be, and, as a passive ability, is missing an attack due to Evasion counted as a "started effect of an ability" 600,600 ofcourse is the higth/weigth of the region
 

Exide

I am amazingly focused right now!
Reaction score
448
No, no. :p
What you do is to make the ability a fake one, a display one. With all the tooltips like: 'Gives your hero 15% evasion, blabla' - but really set the evade to 0.
Then make a trigger like:

A unit is attacked
Attacked Unit has *your ability buff* equal to true
Set random number between 1 and 100
if random number is less than or equal to 15 then do... *your move actions*

Although, that won't make the unit actually dodge the attack..
I guess you need to add a trigger so that the attacked unit recieves hp equal to damage dealt, and a floating text above the attackers head, saying 'miss'.
 

0zaru

Learning vJASS ;)
Reaction score
60
I just read this: >A unit (starts the effect of an ability)
and this
>So the problem is what is the response to starts the effect of an ability, what should the comparison be

so i answer that :p

If you want to do a passive ability then you will have to trigger when the unit moves, if a unit was attacking it etc..
 
Reaction score
333
What do you mean "evade". If you want the evasion to work like actual evasion, then you will NEED jass.
 

San-D

New Member
Reaction score
15
Yes, but how to tell the computer to move only when the attack misses?

EDIT: Here is exactly what I want - a custom ability based on EVASION. Lets say it has 1 level. there is 30% miss chance - a footman attacks the hero. first hit is landed- hero -10 HP.The next , the hero evades (30% speak up), a "miss" floating text appears above footmen. in that instant, move the hero to a random location within a rgeion. If the footman lands a hit - nothing happens, if the footman misses-move instantly!!!
 

Goober4473

TH.net Regular
Reaction score
7
I just made an ability almost exactly like this, but the unit will teleport regardless of weather or not it actually evaded, and it's an active ability. The problem is, after a unit is moved by a trigger, it stops and cancels any order it had. I'm considering making it 100% evasion, and explaining that the flickering is disorienting, and may cause a unit to stop its current action.

What I would suggest is copy evasion, and set it up how you want with percentage and levels, then have a trigger with the event that a unit learns an ability, and the condition that it's the ability learned is your evasion. Add the unit to a unit group. Then when you have a "unit is attacked" event, check to see if the attacked unit is in the group. The thing I'm not sure is how do you detect if the attacked was evaded?

Also, suggestion: Give the unit blink or the equivalent too, or give the player a zeplin, unless you want it getting stuck on the other side of a wall or up a cliff.
 

San-D

New Member
Reaction score
15
1. No walls or "stuckable" terrain on that map
2. You still don't understnd the concept (exept for the guy 1 post up)
Look my post before this one fo "detailed info"
 

MoonSlinger

I Love using Cheap Tricks... only Results matters
Reaction score
74
First,
passive skills like critical or evasion do not get detected as "casting ability"

Back to your question:
There are 2 ways of working for your case:

Method 1
You detect when your unit takes damage, and do a random check, if it passes, adjust the HP to avoid the damage and do your dance. One problem with this, spells are also treated as damage.

You need is 2 triggers. The first one adds the Unit/Hero to the event of the second:

Trigger 1
E- Unit learns a skill
C- Skill learn = dance of shadows
A-
Add to Trigger 2, event: (Triggering unit takes damage)

Trigger 2
E- <nothing>
C- (Random number between 1-100) less then X //The X is the % evasion you want
A-
set Life of triggering unit = Life of triggering unit + damage taken
move triggering unit instantly to random location within region
display "Miss"


Method 2
Stop the attack before damage is dealt. So if you avoid, the attacker would be forced to "Stop" and no damage would be dealt.

E- Unit is attacked
C- Attacked Unit has ability dance of shadow
C - (Random number between 1-100) less then X //The X is the % evasion you want
A-
Order attacking unit to "Stop"
Animation - attacking unit plays attack animation << optional
move attacked unit instantly to random location within region
display "Miss"
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top