Stacking -armor spell

nLike

Member
Reaction score
1
I need help making a spell that will on each cast reduce armor of an enemy. It also has a bleeding effect but thats taken care off since its just a normal dot spell. But i'm having issues making the -armor thingy. So far I've made a spellbook that has 5 levels and each level has an Item bonus armor ability that reduces its armor from -2 to -10 shifting by 2 each level. This is the trigger for it

Code:
Stab
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Stab 
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Stab minus armor general  for (Target unit of ability being cast)) Equal to 0
            Then - Actions
                Game - Display to Players the text: Stab Level 0 added ...
                Unit - Add Stab minus armor general  to (Target unit of ability being cast)
            Else - Actions
                Unit - Set level of Stab minus armor general  for (Target unit of ability being cast) to ((Level of Stab minus armor general  for (Target unit of ability being cast)) + 1)
                Game - Display to Players the text: Stab Level +1 added...

It basically works but the problem is duration. I have no idea how to limit its duration and refresh it on each cast.
 

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
The easiest way I think would be to use a hashtable with a unitgroup. Any unit under the effect of Stab would be added to the unitgroup, and the hashtable used to make a timer for the duration of the debuff. Each time the unit gets Stab cast on them, reset the duration to whatever you want, and when the timer hits 0 remove the Stab debuff.
 

nLike

Member
Reaction score
1
The easiest way I think would be to use a hashtable with a unitgroup. Any unit under the effect of Stab would be added to the unitgroup, and the hashtable used to make a timer for the duration of the debuff. Each time the unit gets Stab cast on them, reset the duration to whatever you want, and when the timer hits 0 remove the Stab debuff.

Gee, i'm not that yet experienced in the world editor. This sound really comlpicated to me. If you are free I would like to listen to your solution but you have to help me do it.
 

nLike

Member
Reaction score
1
As mcuh as I appriciete your effort I would prefer a GUI variant. As I said i'm still new and introducing me right to JASS will confuse me very much. Maybe later on.

If someone has a GUI variant I would be grateful. Thanks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top