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

Bash ( auto stun to attacker ) ?

Status
Not open for further replies.
Level 5
Joined
May 8, 2020
Messages
87
bash.gif
Bash (Passive)


I want to ask How to turn this skill into a protection skill
When the owner of this skill is attacked, there will be a 25% chance of stunning the target attacking it and Deals damage equal to 100 + 1% of health of the person being attacked (even through magic resistance).
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
On version 1.31+ you can use the generic damage event:
  • Events
    • Unit - A unit Takes damage
  • Conditions
    • (Level of Bash for (Damage Target)) Greater than 0
  • Actions
    • Set Variable BashChance = (Random integer between 1 and 100)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • BashChance Less than or equal to 25
      • Then - Actions
        • Set Variable BashAttackingUnit = (Damage source)
        • Set Variable BashAttackedUnit = (Damage Target)
        • Set Variable BashDamage = (100.00 + ((Life of BashAttackedUnit x 0.01)))
        • Unit - Cause BashAttackedUnit to damage BashAttackingUnit, dealing BashDamage damage of attack type Spells and damage type Normal
        • -------- Create a dummy unit and order it to Storm Bolt the BashAttackingUnit --------
      • Else - Actions
Otherwise, use a Damage Engine which allows you to do the same thing with a few extra steps.

Notes:
  • (Damage Target) = Unit that was damaged (attacked).
  • (Damage source) = Unit that dealt the damage (attacking).
  • This deals damage equal to 1% of the attacked unit's current health. Change Life to Max Life to deal 1% of the max health.
  • The Stun uses your basic Dummy unit setup. Set point, create Dummy, Remove point, add Stun ability, add expiration timer, order to use Stun ability.
  • If both units have the Bash ability then you can create an infinite loop and crash the game. The fix is to Turn off this trigger before dealing the damage and then Turn it back on.
  • Change the Attack Type / Damage Type to manage how it interacts with different resistances.
  • This Event runs when any damage is taken. If you only want to it to work with basic attacks then add a Condition to check for that:
  • (Damage From Normal Attack) Equal to True
 
Last edited:
Status
Not open for further replies.
Top