• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

Increasing X/Y/Z chance per hit

Status
Not open for further replies.
Level 2
Joined
Mar 8, 2011
Messages
9
Hello currently I'm trying to create some custom skills that involve increasing attack/attack speed/critical and movement speed per hit, something along the lines of ursa/troll warlord from dota. I've tried to do it via triggers but I can't seem to find any solution. (I don't know anything of JASS/scripting/coding)

What I'm trying to do is something like this:
lvl1 - Each time hero hits, critical chance increases 1%, attack increases 1%, attack speed increases 1%, movespeed increases 1%. Buffs are lost if Hero changes target or doesn't attack target for.. let's say 5 seconds.
lvl2 - 2%... lvl3 - 3% etc.

Any toughts?

(Btw I've searched for "ursa" and found about incinerate, but I'm looking for %, not +X damage)
 
Level 6
Joined
Dec 9, 2010
Messages
121
More specifically, what you should do is create a disabled spellbook with the abilities you want inside of it, put 100 levels of each of those abilities, and then implement a damage detection system, and every time a damage instance is received from the unit with that ability (I take it the ability is passive?), you increase the level of the ability inside the disabled spell book, with your passive Crit, + Damage, etc, abilities. If you really don't want to implement a damage detection system, you could do it via the "A unit is attacked" event, with the condition that the Attacking Unit has the ability. Then, it's a simple matter of using timers to remove the disabled spell book ability. If you want, I can make a demo map. Hope this helps!
 
Level 2
Joined
Mar 8, 2011
Messages
9
Thanks, I've +rep to you guys.
Btw, is there a way to make spellbooks non-clickable? (I added an spellbook directly into the hero skills and when you click you can see the skills inside) And there seems to be a loop in my trigger, when the skill reaches lvl 100, the next hit makes it go back to lvl 1, any workarounds or is this some unfortunate limitation we just have to live with?

edit: okay I think I found a solution for the loop problem.
 
Status
Not open for further replies.
Top