Help with Spell stacking

TDN

New Member
Reaction score
3
edit: sorry, spoiler tags don't seem to work.

Kinda long time since I've last used the world editor, but it's great to mess around with if you're bored or come up with a new idea. Do note that I suck at fixing leaks, so... yeah.

Basically the map design is an open RPG, where almost everything is randomized: monsters, drops, spells, etc.

Several very rare artifacts that drop are meant to boost the power of each spell the hero has, whilst the artifact is being carried. The increase in spell-power is meant to be rather large, at least 2x, and at most 30x. The easiest way I've found to do this is to create a loop, where a variable controls the number of time the loop is run, and thus the spell's total power. Inside the loop I have a dummy unit re-casting the spell however many times as necessary. The strange thing (to me) is that it is only working with some spells. Others, such as starfall, seem to be working because when multiplied 30x, the animation becomes rather intense, however total damage output does not reflect on that.

Now most of these spells work fine when the output is doubled, ie 2x - but on 30x output, the total effect is still only doubled.

Here are some of the spells' triggers that aren't working: The variable ToviacMultiplier is currently set to 30.

Explosive Potion:
Trigger:
  • Explosive Potion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Item carried by (Triggering unit) of type |cff66cc00Toviac|r) is owned) Equal to True
        • Then - Actions
          • Set SpellMultiplier = ToviacMultiplier
        • Else - Actions
          • Set SpellMultiplier = 1
          • Skip remaining actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Explosive Potion lvl 1
        • Then - Actions
          • For each (Integer A) from 1 to (SpellMultiplier - 1), do (Actions)
            • Loop - Actions
              • Unit - Create 1 Sheep (Dummy Unit) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
              • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Explosive Potion lvl 1 to (Last created unit)
              • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets (Target point of ability being cast)
        • Else - Actions


Starfall:
Trigger:
  • Starfall
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Item carried by (Triggering unit) of type |cff66cc00Toviac|r) is owned) Equal to True
        • Then - Actions
          • Set SpellMultiplier = ToviacMultiplier
        • Else - Actions
          • Set SpellMultiplier = 1
          • Skip remaining actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Starfall lvl 1
        • Then - Actions
          • For each (Integer A) from 1 to (SpellMultiplier - 1), do (Actions)
            • Loop - Actions
              • Unit - Create 1 Sheep (Dummy Unit) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
              • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Starfall lvl 1 to (Last created unit)
              • Unit - Order (Last created unit) to Night Elf Priestess Of The Moon - Starfall
        • Else - Actions


Fireblast:
Trigger:
  • Fireblast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Item carried by (Triggering unit) of type |cff66cc00Toviac|r) is owned) Equal to True
        • Then - Actions
          • Set SpellMultiplier = ToviacMultiplier
        • Else - Actions
          • Set SpellMultiplier = 1
          • Skip remaining actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Fireblast lvl 1
        • Then - Actions
          • For each (Integer A) from 1 to (SpellMultiplier - 1), do (Actions)
            • Loop - Actions
              • Unit - Create 1 Sheep (Dummy Unit) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
              • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Fireblast lvl 1 to (Last created unit)
              • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire (Target point of ability being cast)
        • Else - Actions


Healing Ward: here you can see I modified it, somewhat randomizing placement, in the hope that the problem would be solved by preventing unit stacking in the same location.
Trigger:
  • Healing Ward
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Item carried by (Triggering unit) of type |cff66cc00Toviac|r) is owned) Equal to True
        • Then - Actions
          • Set SpellMultiplier = ToviacMultiplier
        • Else - Actions
          • Set SpellMultiplier = 1
          • Skip remaining actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Healing Ward lvl 1
        • Then - Actions
          • For each (Integer A) from 1 to (SpellMultiplier - 1), do (Actions)
            • Loop - Actions
              • Unit - Create 1 Sheep (Dummy Unit) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
              • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Healing Ward lvl 1 to (Last created unit)
              • Unit - Order (Last created unit) to Orc Witch Doctor - Healing Ward ((Target point of ability being cast) offset by (Random real number between 5.00 and 256.00) towards (Random real number between 1.00 and 359.00) degrees)
        • Else - Actions
 

tommerbob

Minecraft. :D
Reaction score
110
Try editing your post and using the
Trigger:
  • tags. It will make your triggers much easier to read, and more people are likely to help you.
 

sarkurayboy

New Member
Reaction score
7
Try editing your post and using the
Trigger:
  • tags. It will make your triggers much easier to read, and more people are likely to help you.
Trigger:
  • Explosive Potion:
    • <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_7">
    • <li class="lastopen"><span class="default">Explosive Potion</span>
    • <ul>
    • <li class="tree"><span class="events">Events</span></li>
    • <li class="tree"><span class="unit">Unit - A unit Starts the effect of an ability</span></li>
    • <li class="tree"><span class="conditions">Conditions</span></li>
    • <li class="tree"><span class="actions">Actions</span></li>
    • <li class="tree"><span class="if">If (All Conditions are True) then do (Then Actions) else do (Else Actions)</span></li>
    • <li class="tree"><span class="if">If - Conditions</span></li>
    • <li class="tree"><span class="default">((Item carried by (Triggering unit) of type |cff66cc00Toviac|r) is owned) Equal to True</span></li>
    • <li class="tree"><span class="ifthen">Then - Actions</span></li>
    • <li class="tree"><span class="set">Set SpellMultiplier = ToviacMultiplier</span></li>
    • <li class="tree"><span class="ifelse">Else - Actions</span></li>
    • <li class="tree"><span class="set">Set SpellMultiplier = 1</span></li>
    • <li class="tree"><span class="default">Skip remaining actions</span></li>
    • <li class="tree"><span class="if">If (All Conditions are True) then do (Then Actions) else do (Else Actions)</span></li>
    • <li class="tree"><span class="if">If - Conditions</span></li>
    • <li class="tree"><span class="default">(Ability being cast) Equal to Explosive Potion lvl 1</span></li>
    • <li class="tree"><span class="ifthen">Then - Actions</span></li>
    • <li class="tree"><span class="foreach">For each (Integer A) from 1 to (SpellMultiplier - 1), do (Actions)</span></li>
    • <li class="tree"><span class="loop">Loop - Actions</span></li>
    • <li class="tree"><span class="unit">Unit - Create 1 Sheep (Dummy Unit) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees</span></li>
    • <li class="tree"><span class="unit">Unit - Add a 4.00 second Generic expiration timer to (Last created unit)</span></li>
    • <li class="tree"><span class="unit">Unit - Add Explosive Potion lvl 1 to (Last created unit)</span></li>
    • <li class="tree"><span class="unit">Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets (Target point of ability being cast)</span></li>
    • <li class="lasttree"><span class="ifelse">Else - Actions</span></li>
    • </ul>
    • </li>
    • </ul>
    • </div></div>
    • Starfall:
    • <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_8">
    • <li class="lastopen"><span class="default">Starfall</span>
    • <ul>
    • <li class="tree"><span class="events">Events</span></li>
    • <li class="tree"><span class="unit">Unit - A unit Starts the effect of an ability</span></li>
    • <li class="tree"><span class="conditions">Conditions</span></li>
    • <li class="tree"><span class="actions">Actions</span></li>
    • <li class="tree"><span class="if">If (All Conditions are True) then do (Then Actions) else do (Else Actions)</span></li>
    • <li class="tree"><span class="if">If - Conditions</span></li>
    • <li class="tree"><span class="default">((Item carried by (Triggering unit) of type |cff66cc00Toviac|r) is owned) Equal to True</span></li>
    • <li class="tree"><span class="ifthen">Then - Actions</span></li>
    • <li class="tree"><span class="set">Set SpellMultiplier = ToviacMultiplier</span></li>
    • <li class="tree"><span class="ifelse">Else - Actions</span></li>
    • <li class="tree"><span class="set">Set SpellMultiplier = 1</span></li>
    • <li class="tree"><span class="default">Skip remaining actions</span></li>
    • <li class="tree"><span class="if">If (All Conditions are True) then do (Then Actions) else do (Else Actions)</span></li>
    • <li class="tree"><span class="if">If - Conditions</span></li>
    • <li class="tree"><span class="default">(Ability being cast) Equal to Starfall lvl 1</span></li>
    • <li class="tree"><span class="ifthen">Then - Actions</span></li>
    • <li class="tree"><span class="foreach">For each (Integer A) from 1 to (SpellMultiplier - 1), do (Actions)</span></li>
    • <li class="tree"><span class="loop">Loop - Actions</span></li>
    • <li class="tree"><span class="unit">Unit - Create 1 Sheep (Dummy Unit) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees</span></li>
    • <li class="tree"><span class="unit">Unit - Add a 4.00 second Generic expiration timer to (Last created unit)</span></li>
    • <li class="tree"><span class="unit">Unit - Add Starfall lvl 1 to (Last created unit)</span></li>
    • <li class="tree"><span class="unit">Unit - Order (Last created unit) to Night Elf Priestess Of The Moon - Starfall</span></li>
    • <li class="lasttree"><span class="ifelse">Else - Actions</span></li>
    • </ul>
    • </li>
    • </ul>
    • </div></div>
    • Fireblast:
    • <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_9">
    • <li class="lastopen"><span class="default">Fireblast</span>
    • <ul>
    • <li class="tree"><span class="events">Events</span></li>
    • <li class="tree"><span class="unit">Unit - A unit Starts the effect of an ability</span></li>
    • <li class="tree"><span class="conditions">Conditions</span></li>
    • <li class="tree"><span class="actions">Actions</span></li>
    • <li class="tree"><span class="if">If (All Conditions are True) then do (Then Actions) else do (Else Actions)</span></li>
    • <li class="tree"><span class="if">If - Conditions</span></li>
    • <li class="tree"><span class="default">((Item carried by (Triggering unit) of type |cff66cc00Toviac|r) is owned) Equal to True</span></li>
    • <li class="tree"><span class="ifthen">Then - Actions</span></li>
    • <li class="tree"><span class="set">Set SpellMultiplier = ToviacMultiplier</span></li>
    • <li class="tree"><span class="ifelse">Else - Actions</span></li>
    • <li class="tree"><span class="set">Set SpellMultiplier = 1</span></li>
    • <li class="tree"><span class="default">Skip remaining actions</span></li>
    • <li class="tree"><span class="if">If (All Conditions are True) then do (Then Actions) else do (Else Actions)</span></li>
    • <li class="tree"><span class="if">If - Conditions</span></li>
    • <li class="tree"><span class="default">(Ability being cast) Equal to Fireblast lvl 1</span></li>
    • <li class="tree"><span class="ifthen">Then - Actions</span></li>
    • <li class="tree"><span class="foreach">For each (Integer A) from 1 to (SpellMultiplier - 1), do (Actions)</span></li>
    • <li class="tree"><span class="loop">Loop - Actions</span></li>
    • <li class="tree"><span class="unit">Unit - Create 1 Sheep (Dummy Unit) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees</span></li>
    • <li class="tree"><span class="unit">Unit - Add a 4.00 second Generic expiration timer to (Last created unit)</span></li>
    • <li class="tree"><span class="unit">Unit - Add Fireblast lvl 1 to (Last created unit)</span></li>
    • <li class="tree"><span class="unit">Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire (Target point of ability being cast)</span></li>
    • <li class="lasttree"><span class="ifelse">Else - Actions</span></li>
    • </ul>
    • </li>
    • </ul>
    • </div></div>
    • Healing Ward: here you can see I modified it, somewhat randomizing placement, in the hope that the problem would be solved by preventing unit stacking in the same location.
    • <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_10">
    • <li class="lastopen"><span class="default">Healing Ward</span>
    • <ul>
    • <li class="tree"><span class="events">Events</span></li>
    • <li class="tree"><span class="unit">Unit - A unit Starts the effect of an ability</span></li>
    • <li class="tree"><span class="conditions">Conditions</span></li>
    • <li class="tree"><span class="actions">Actions</span></li>
    • <li class="tree"><span class="if">If (All Conditions are True) then do (Then Actions) else do (Else Actions)</span></li>
    • <li class="tree"><span class="if">If - Conditions</span></li>
    • <li class="tree"><span class="default">((Item carried by (Triggering unit) of type |cff66cc00Toviac|r) is owned) Equal to True</span></li>
    • <li class="tree"><span class="ifthen">Then - Actions</span></li>
    • <li class="tree"><span class="set">Set SpellMultiplier = ToviacMultiplier</span></li>
    • <li class="tree"><span class="ifelse">Else - Actions</span></li>
    • <li class="tree"><span class="set">Set SpellMultiplier = 1</span></li>
    • <li class="tree"><span class="default">Skip remaining actions</span></li>
    • <li class="tree"><span class="if">If (All Conditions are True) then do (Then Actions) else do (Else Actions)</span></li>
    • <li class="tree"><span class="if">If - Conditions</span></li>
    • <li class="tree"><span class="default">(Ability being cast) Equal to Healing Ward lvl 1</span></li>
    • <li class="tree"><span class="ifthen">Then - Actions</span></li>
    • <li class="tree"><span class="foreach">For each (Integer A) from 1 to (SpellMultiplier - 1), do (Actions)</span></li>
    • <li class="tree"><span class="loop">Loop - Actions</span></li>
    • <li class="tree"><span class="unit">Unit - Create 1 Sheep (Dummy Unit) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees</span></li>
    • <li class="tree"><span class="unit">Unit - Add a 4.00 second Generic expiration timer to (Last created unit)</span></li>
    • <li class="tree"><span class="unit">Unit - Add Healing Ward lvl 1 to (Last created unit)</span></li>
    • <li class="tree"><span class="unit">Unit - Order (Last created unit) to Orc Witch Doctor - Healing Ward ((Target point of ability being cast) offset by (Random real number between 5.00 and 256.00) towards (Random real number between 1.00 and 359.00) degrees)</span></li>
    • <li class="lasttree"><span class="ifelse">Else - Actions</span></li>
    • </ul>
    • </li>
    • </ul>
    • </div></div>
 

TDN

New Member
Reaction score
3
Back when I used to visit this site WC3 tags didn't exist.

OP edited to include the tags.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top