• 🏆 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] Temporary Lifesteal and AS Speed Bug

Status
Not open for further replies.
Level 2
Joined
Aug 16, 2013
Messages
6
Hello everyone,

I've created an ability, which temporary grants AS and Lifesteal, which I have implemented as follows:

Hint of the Ability:
"When activating Sharp Blade you gain +(Level)*10 AD and (Level)% Bonus Lifesteal. This Bonus is doubled, when you are below 50%. And 1% Attackspeed for each 1% missing life."
  • Sharpen Blade
    • Events
      • Unit - A unit starts the effects of an ability
    • Conditions
      • (Ability being cast) Gleich Sharp Blade
    • Actions
      • Unit- Add SharpenBlade Spellbook (neu) to (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • (Percentage life of (Triggering unit)) Kleiner gleich 50.00
        • 'THEN'-Actions
          • Unit - Set level of Adaptive Lifesteal Boost 1% for (Triggering unit) to ((Level of Sharp Blade for (Triggering unit)) x 2)
        • 'ELSE'-Actions
          • Unit - Set level of Adaptive Lifesteal Boost 1% for (Triggering unit) to (Level of Sharp Blade for (Triggering unit))
      • Unit- Set level of Adaptive (AS) Boost 1% for (Triggering unit) to (Integer((100.00 - (Percentage life of (Triggering unit)))))
      • Wait 10.00 game-time seconds
      • Unit- Remove SharpenBlade Spellbook (neu) from (Triggering unit)
Note: I use the German Editor and have translated the commands by hand so their may be some differences to the original syntax.

The ability "Sharp Blade" is based on "Battleroar"
The ability "Adaptive Lifesteal Boost 1%"is based on the item ability lifesteal and has 100 levels having 0.01 - 1.00 lifesteal.
The ability "Adaptive (AS) Boost 1%" is based on the item ability attackspeed increment and also has 100 levels ranging from 0.01 - 1.00 boost.

My problem is, that in game the ability only works sometimes. Yes "sometimes". There is about a 70% ratio that the AS buff works and about 70% ratio that the Lifesteal part works. And they are independent, so sometimes it occurs that both work, only one of them works or neither of them works.

Do you see any bugs with the given trigger? Or do you have any ideas, what could be the cause? The cooldown of the ability is about twice its duration so the use of wait shouldn't be the cause of this IMO. If you need any more information, I can provide it of course.

Thanks in advance! :)

Greets Knittel

EDIT: Changed [ code ] to [ trigger ]
 
Last edited:
Level 13
Joined
Oct 16, 2010
Messages
731
You could try saving the casting unit into a variable at the start of the spell and call that where relevant. If the spell is only for 1 unit in the game then the wait shouldn't be a problem, but you could try using a timer or something.

I personally like to use things like "TempInt" and "TempReal" to calculate the levels of spells before setting them on the unit, just makes it easier to adjust for me, could be worth a shot though!
 
Status
Not open for further replies.
Top