• 🏆 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!

[Solved] Passive Ability trigger fixing

Status
Not open for further replies.
Level 4
Joined
Jan 14, 2017
Messages
75
Hello,
I (tried to) create a trigger for a passive ability I made, but it doesn't seem to work. The passive ability is as follows:

Gives the Blood Mage the ability Flame Armor; a passive ability that damages enemies near him and, when he attempts to attack, there is a 10/20/30% chance (depending on level) that he hurls a fireball at the target, dealing extra damage.

Here is the trigger I made:

  • FA
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Flame Armor (Neutral Hostile) for (Attacked unit)) Greater than 0
      • (Random integer number between 1 and 100) Equal to (15 x (Level of Flame Armor (Neutral Hostile) for (Attacking unit)))
      • Or - Any (Conditions) are true
        • Conditions
          • (Random integer number between 1 and 100) Less than or equal to (10 x (Level of Flame Armor (Neutral Hostile) for (Attacking unit)))
    • Actions
      • Unit - Create 1 Dummy for Neutral Passive at (Position of (Attacking unit)) facing (Position of (Attacked unit))
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Fireball for Flame Armor to (Last created unit)
      • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Attacked unit)
      • If ((Level of Flame Armor (Neutral Hostile) for (Triggering unit)) Greater than or equal to 1) then do (Unit - Add Permanent Immolation (Neutral Hostile 2) to (Triggering unit)) else do (Unit - Set level of Permanent Immolation (Neutral Hostile 2) for (Triggering unit) to (Level of Flame Armor (Neutral Hostile) for (Triggering unit)))
How do I fix this in order for it to work?
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
You need to check the level of flame armor for the attacking unit (the bloodmage).
In the random condition it must be less than or equal to.
Why do you have two random conditions?

The last line should not be in this trigger. The permanent immolation has nothing to do with the bloodmage attacking.
You should make a trigger, that adds immolation when he learns the skill flame armor.
 
Status
Not open for further replies.
Top