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

Special tower hitting immunes

Status
Not open for further replies.
Level 6
Joined
Sep 24, 2015
Messages
174
Hi, I have an issue with a trigger...
I want that if a unit has the " ghostly key of the damned" then it creates a special effect under the unit and reduce his mana by -35% at level 6, i tested the level 6 part in a test trigger and it worked but somehow when i implement it in the main trigger it doesn't work properly...May you guys take a look and maybe help me find a solution please :)

Thanks !

  • Special towers
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget is A Hero) Equal to True
      • (DamageEventTarget has buff Berserk) Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of DamageEventSource) Equal to Special Tower 1
          • (Random integer number between 1 and 2) Equal to 1
        • Then - Actions
          • Unit - Set mana of DamageEventSource to ((Mana of DamageEventSource) + 1.00)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of DamageEventSource) Equal to Special Tower 2
              • (Random integer number between 1 and 3) Equal to 1
            • Then - Actions
              • Unit - Set mana of DamageEventSource to ((Mana of DamageEventSource) + 1.00)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of DamageEventSource) Equal to Special Tower 3
                  • (Random integer number between 1 and 3) Equal to 1
                • Then - Actions
                  • Unit - Set mana of DamageEventSource to ((Mana of DamageEventSource) + 1.00)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of DamageEventSource) Equal to Special Tower 4
                      • (Random integer number between 1 and 3) Equal to 1
                    • Then - Actions
                      • Unit - Set mana of DamageEventSource to ((Mana of DamageEventSource) + 1.00)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of DamageEventSource) Equal to Special Tower 5
                          • (Random integer number between 1 and 3) Equal to 1
                        • Then - Actions
                          • Unit - Set mana of DamageEventSource to ((Mana of DamageEventSource) + 1.00)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of DamageEventSource) Equal to Special Tower 6
                              • (Random integer number between 1 and 3) Equal to 1
                            • Then - Actions
                              • Unit - Set mana of DamageEventSource to ((Mana of DamageEventSource) + 1.00)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of DamageEventSource) Equal to Special Tower 7
                                  • (Random integer number between 1 and 4) Equal to 1
                                • Then - Actions
                                  • Unit - Set mana of DamageEventSource to ((Mana of DamageEventSource) + 1.00)
                                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of DamageEventSource) Equal to Special Tower 1
          • (Mana of DamageEventSource) Greater than or equal to 30.00
        • Then - Actions
          • Unit - Order DamageEventSource to Orc Troll Berserker - Berserk
          • Unit - Set mana of DamageEventSource to 30.00
          • Unit Group - Order (Units owned by (Owner of DamageEventSource) of type Special Tower 1) to Night Elf Demon Hunter - Mana Burn DamageEventTarget
          • Unit - Set mana of DamageEventSource to 0.00
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of DamageEventSource) Equal to Special Tower 2
              • (Mana of DamageEventSource) Greater than or equal to 30.00
            • Then - Actions
              • Unit - Order DamageEventSource to Orc Troll Berserker - Berserk
              • Unit - Set mana of DamageEventSource to 30.00
              • Unit Group - Order (Units owned by (Owner of DamageEventSource) of type Special Tower 2) to Night Elf Demon Hunter - Mana Burn DamageEventTarget
              • Unit - Set mana of DamageEventSource to 0.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of DamageEventSource) Equal to Special Tower 3
                  • (Mana of DamageEventSource) Greater than or equal to 30.00
                • Then - Actions
                  • Unit - Order DamageEventSource to Orc Troll Berserker - Berserk
                  • Unit - Set mana of DamageEventSource to 30.00
                  • Unit Group - Order (Units owned by (Owner of DamageEventSource) of type Special Tower 3) to Night Elf Demon Hunter - Mana Burn DamageEventTarget
                  • Unit - Set mana of DamageEventSource to 0.00
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of DamageEventSource) Equal to Special Tower 4
                      • (Mana of DamageEventSource) Greater than or equal to 30.00
                    • Then - Actions
                      • Unit - Order DamageEventSource to Orc Troll Berserker - Berserk
                      • Unit - Set mana of DamageEventSource to 30.00
                      • Unit Group - Order (Units owned by (Owner of DamageEventSource) of type Special Tower 4) to Night Elf Demon Hunter - Mana Burn DamageEventTarget
                      • Unit - Set mana of DamageEventSource to 0.00
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of DamageEventSource) Equal to Special Tower 5
                          • (Mana of DamageEventSource) Greater than or equal to 30.00
                        • Then - Actions
                          • Unit - Order DamageEventSource to Orc Troll Berserker - Berserk
                          • Unit - Set mana of DamageEventSource to 30.00
                          • Unit Group - Order (Units owned by (Owner of DamageEventSource) of type Special Tower 5) to Night Elf Demon Hunter - Mana Burn DamageEventTarget
                          • Unit - Set mana of DamageEventSource to 0.00
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of DamageEventSource) Equal to Special Tower 6
                              • (Mana of DamageEventSource) Greater than or equal to 30.00
                            • Then - Actions
                              • For each (Integer A) from 1 to 6, do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Item-type of (Item carried by DamageEventTarget in slot (Integer A))) Equal to |c008000ffGhostly Key of the Damned|r
                                    • Then - Actions
                                      • Unit - Order DamageEventSource to Orc Troll Berserker - Berserk
                                      • Special Effect - Create a special effect at (Position of DamageEventTarget) using Abilities\Weapons\ChimaeraLightningMissile\ChimaeraLightningMissile.mdl
                                      • Unit - Set mana of DamageEventTarget to ((Mana of DamageEventTarget) x 0.75)
                                      • Unit - Set mana of DamageEventSource to 0.00
                                      • Special Effect - Destroy (Last created special effect)
                                      • Game - Display to (Player group((Owner of DamageEventSource))) the text: part1 works
                                    • Else - Actions
                                      • Unit - Order DamageEventSource to Orc Troll Berserker - Berserk
                                      • Unit - Set mana of DamageEventSource to 30.00
                                      • Unit Group - Order (Units owned by (Owner of DamageEventSource) of type Special Tower 6) to Night Elf Demon Hunter - Mana Burn DamageEventTarget
                                      • Unit - Set mana of DamageEventSource to 0.00
                                      • Game - Display to (Player group((Owner of DamageEventSource))) the text: part2 works
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of DamageEventSource) Equal to Special Tower 7
                                  • (Mana of DamageEventSource) Greater than or equal to 30.00
                                • Then - Actions
                                  • For each (Integer A) from 1 to 6, do (Actions)
                                    • Loop - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Item-type of (Item carried by DamageEventTarget in slot (Integer A))) Equal to |c008000ffGhostly Key of the Damned|r
                                        • Then - Actions
                                          • Unit - Order DamageEventSource to Orc Troll Berserker - Berserk
                                          • Special Effect - Create a special effect at (Position of DamageEventTarget) using Abilities\Weapons\ChimaeraLightningMissile\ChimaeraLightningMissile.mdl
                                          • Unit - Set mana of DamageEventTarget to ((Mana of DamageEventTarget) x 0.65)
                                          • Unit - Set mana of DamageEventSource to 0.00
                                          • Special Effect - Destroy (Last created special effect)
                                          • Game - Display to (Player group((Owner of DamageEventSource))) the text: part1 works
                                        • Else - Actions
                                          • Unit - Order DamageEventSource to Orc Troll Berserker - Berserk
                                          • Unit - Set mana of DamageEventSource to 30.00
                                          • Unit Group - Order (Units owned by (Owner of DamageEventSource) of type Special Tower 7) to Night Elf Demon Hunter - Mana Burn DamageEventTarget
                                          • Unit - Set mana of DamageEventSource to 0.00
                                          • Game - Display to (Player group((Owner of DamageEventSource))) the text: part2 works
                                • Else - Actions
 
An unit can have more than 1 key? If not I would remove that loops and transform it into has hero item of type (boolean).
Currently for any non "Ghostly Key of the Damned" in the heroes inventory he procs the else actions.

I think its kinda wierd that main conditions filters out targets with berserk.
(DamageEventTarget has buff Berserk) Equal to False​
but the damage source casts berserk.
 
Status
Not open for further replies.
Top