how to make triggered passive spells

Dakho

()[o__o]()
Reaction score
75
How would one go about making a passive spell that has a chance to do something (like critical strike) but through triggers?
 

Flare

Stops copies me!
Reaction score
662
Simplest way would be
Code:
Unit is attacked

Level of Custom Crit for attacking unit > 0
Random integer between 1 and 100 less than or equal to #

Cause attacking unit to damage attacked unit dealing X damage of attack type Y and damage type Z

You could also use gref's attack detection system (it's made in JASS, but it does all the work for you) or the GUI one I made (I need to replace orb effects since the system relies on use of an orb effect :p)
 

noworries

New Member
Reaction score
4
I wasn't quite sure what You were asking, but, here's something that I think is like what you're wanting.

Code:
A Unit Attacks
    Events
        Unit - A unit Is attacked
    Conditions
        (Level of Passive Entangle  for (Attacking unit)) Greater than 0
    Actions
        Set tempInteger = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                tempInteger Less than or equal to ((Level of Passive Entangle  for (Attacking unit)) x 5)
            Then - Actions
                Unit - Create 1 Caster for (Owner of (Attacking unit)) at (Position of (Attacked unit)) facing Default building facing degrees
                Unit - Add Entangling Roots (Neutral Hostile 1) to (Last created unit)
                Hero - Order (Last created unit) to use (Last created item) on (Attacked unit)
            Else - Actions

That's like a passive entangling roots. It goes by 5/10/15% chance to cast, easily modifiable what you multiply by, or changing the ability it casts by what you want the dummy unit to cast.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top