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

Aura - inc. damage based on agility {aura that increases damage based on agility}

Status
Not open for further replies.
Level 5
Joined
Mar 27, 2008
Messages
107
Hey :) Im making an aura spell thats going to increase all units affecteds damage based on their agility, for example: Increases a units damage by 200% of its agility.

I've worked on this sum time now but now I give up ;/ im completely stuck, I have no idea really how to do this. Anyone got a solution? =)

+rep for any helpfull answers!

Thanks
 
Level 9
Joined
Oct 17, 2007
Messages
547
All i can think off is making several versions of the damage increase aura and replace it with the appropriate one everytime your agility increases; of course the aura skill that the hero learn has to be a dummy skill with only the buff to show that hes the source of the aura. Place the actual auras into a book and disable it.
 
Well, have a damage increase ability, e.g. Claws of attack and do:

First off, define three ~ five abilities based on Claws of attack. Make the trick so that if a hero has 50 agility, the level of claws of attack to be set at 50/2=25, so the basic formula will be (Agility/2) * 2 (from the 200%) = Agility. In each level of ability for Claws of attack, don't increase damage by 1, but by 2. So, level 1 Claws of Attack (20-50) = 40 bonus damage, level 2 = 42 bonus damage, level 3 = 44 bonus damage, and so on. The parenthesis 20-50 is the minimum agility one can have. Of course it depends on your map, but i think no map can have a hero with 1 agility, so i started off 20's. If you have a hero with agility less than 20, then make the first damage bonus equal to the least agility amount a hero has in your map. As you see, the level 1 gives 40 bonus damage, wich is theoritically agility*2 (=200% of agility). This is a trick to avoid reaching too many levels of the ability.

Events
Map initialization
Conditions
Actions
Set Ability [1] = (Claws of Attack (20-50))
Set Ability [2] = (Claws of Attack (51-90))
Set Ability [3] = (Claws of Attack (91-120))
(And so on)

Then, you will need to count the agility:

Trigger 1

Events
A unit learns a skill
Conditions
(Hero learned skill) Equal to X
Actions
Set Hero1 = (Learning Hero)
Trigger - Turn on (Trigger 2 <gen>)

Trigger 2

Events
Every 0.3 seconds of game-time
Conditions
Actions
Set Unit_Group = (Units within X.00 of (Hero1) matching ((Matching unit) belongs to an ally of (Owner of (Hero1))) and ((Matching unit) is a Hero Equal to True))
Unit Group - Pick up every unit in (Unit_Group) and do (Actions)
Loop (Actions)
Set Picked = (Picked unit)
If/ Then/ Else
If (Conditions)
(Agility of (Picked)) Less than or Equal to 50
Then (Actions)
Set Formula = ((Agility) of (Picked))
Unit - Add (Ability[1]) to (Picked)
Unit - Set level of (Ability[1]) for (Picked) to (Formula)
Else (Actions)
If / Then/ Else
If (Conditions)
And (Conditions)
(Agility of (Picked)) Greater than or Equal to 51
(Agility of (Picked)) Less than or Equal to 90
Then (Actions)
Unit - Add (Ability[2]) to (Picked)
Unit - Set level of (Ability[2]) for (Picked) to (Formula)
Else (Actions)
[And so on]
Custom script: call DestroyGroup (udg_Unit_Group)

Now have an IF/Then/Else action to detect when a unit is no longer within range of (Hero1) and remove its ability given. [Sorry too tired to keep on writing]. This is no MUI, tired of doing such thing now. I give you an idea just to work on this issue.
 
Level 5
Joined
Mar 27, 2008
Messages
107
Wow thx :) Just looked thrue it now quickly cos Im in a rush but it looks really good, I'll try it out later tonight ;) thx alot + rep!
 
Status
Not open for further replies.
Top