• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Solved] Need help with an ability that empowers next attack

Status
Not open for further replies.
Level 5
Joined
Jun 26, 2016
Messages
60
Need help with an ability that empowers next attack based on your hero attribute and restores % of hero's mana

  • Frostmourne Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frostmourne Hungers
    • Actions
      • Set VariableSet Frostmourne_Stats = (Real((Strength of (Triggering unit) (Include bonuses))))
      • Set VariableSet Frostmourne_Level = (Real((Level of Frostmourne Hungers for (Triggering unit))))
  • Frostmourne Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Frostmourne Hungers ) Equal to True
    • Actions
      • Set VariableSet Frostmourne_Mana = (Percentage mana of (Attacking unit))
      • Special Effect - Create a special effect attached to the chest of (Attacked unit) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Frostmourne_Level x Frostmourne_Stats) damage of attack type Hero and damage type Normal
      • Unit - Set mana of (Attacking unit) to (Frostmourne_Mana + 25.00)%
      • Unit - Remove Frostmourne Hungers buff from (Attacking unit)
 
Last edited:
Level 24
Joined
Feb 9, 2009
Messages
1,786
I'd consider using DDS at the very least, the "ATTACK(ED/ING)" trigger fires upon wind up instead of upon damage.
Then the trigger is as simply as giving the casting unit something like berserk, and removing the buff when their next attack hits.

  • Necro Teachings Damage
    • Events
      • Game - AfterDamageEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to False
      • (DamageEventSource has buff Necromantic Teachings ) Equal to True
    • Actions
      • Unit - Remove Necromantic Teachings buff from DamageEventSource
      • Do Your thing
 
Level 5
Joined
Jun 26, 2016
Messages
60
I'd consider using DDS at the very least, the "ATTACK(ED/ING)" trigger fires upon wind up instead of upon damage.
Then the trigger is as simply as giving the casting unit something like berserk, and removing the buff when their next attack hits.

  • Necro Teachings Damage
    • Events
      • Game - AfterDamageEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to False
      • (DamageEventSource has buff Necromantic Teachings ) Equal to True
    • Actions
      • Unit - Remove Necromantic Teachings buff from DamageEventSource
      • Do Your thing
thanks it works really well now :)
 
Status
Not open for further replies.
Top