Spell Vengeance

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
Vengeance

vengeancecr3.jpg


Leakless: Yes
MUI/MPI: MUI (but not really because it only takes 2000 damage sources)
GUI/JASS: GUI

The Warden Unleashes all her power in order to revenge every unit that damaged her in the last 10 seconds. Deals 75%/100%/125%/150% of the damage taken.

Code:
Code:
Vengeance Periodic
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 2000, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        VengeanceDuration[(Integer A)] Greater than 0
                    Then - Actions
                        Set VengeanceDuration[(Integer A)] = (VengeanceDuration[(Integer A)] - 1)
                    Else - Actions
                        Set VengeanceDamage[(Integer A)] = 0.00
                        Set VengeanceUnit[(Integer A)] = No unit
                        Set VengeanceWarden[(Integer A)] = No unit


Code:
Vegeance Damage Taken
    Events
    Conditions
        (Damage taken) Greater than 0.00
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                VengeanceArray Equal to 2000
            Then - Actions
                Set VengeanceArray = 0
            Else - Actions
                Set VengeanceArray = (VengeanceArray + 1)
                Set VengeanceDamage[VengeanceArray] = (Damage taken)
                Set VengeanceDuration[VengeanceArray] = 10
                Set VengeanceUnit[VengeanceArray] = (Damage source)
                Set VengeanceWarden[VengeanceArray] = (Triggering unit)

Code:
Vengeance
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Vengeance 
    Actions
        Set temppoint = (Position of (Triggering unit))
        Unit - Create 1 Vengeance Effect for (Owner of (Triggering unit)) at temppoint facing (Facing of (Triggering unit)) degrees
        Animation - Play (Last created unit)'s spell animation
        Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        Custom script:   call RemoveLocation (udg_temppoint)
        For each (Integer A) from 1 to 2000, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        VengeanceWarden[(Integer A)] Equal to (Triggering unit)
                        VengeanceUnit[(Integer A)] Not equal to No unit
                    Then - Actions
                        Unit - Cause (Triggering unit) to damage VengeanceUnit[(Integer A)], dealing (VengeanceDamage[(Integer A)] x (0.75 + ((Real((Level of Vengeance  for (Triggering unit)))) x 0.25))) damage of attack type Chaos and damage type Normal
                        Set temppoint = (Position of VengeanceUnit[(Integer A)])
                        Special Effect - Create a special effect at temppoint using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
                        Special Effect - Destroy (Last created special effect)
                        Custom script:   call RemoveLocation (udg_temppoint)
                    Else - Actions

Code:
Vengeance Learn
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Vengeance 
        (Level of Vengeance  for (Triggering unit)) Equal to 1
    Actions
        Trigger - Add to Vegeance Damage Taken <gen> the event (Unit - (Triggering unit) Takes damage)

For implementation just copy the ability, create a dummy unit and copy the effect unit(and the triggers of course^^)

EDIT: a lil tooltip change^^
 

Attachments

  • Vengeance.w3x
    73.2 KB · Views: 531
>>(but not really because it only takes 2000 damage sources)
If I'm not mistaken, you're using global arrays, if then, why not max it up to 8190?
 
because then i have to run every second trough 8000 loops
dunno maybe that laggs for some ppl
 
Code:
Set VengeanceUnit[(Integer A)] = No unit
Set VengeanceWarden[(Integer A)] = No unit
Code:
Vengeance Periodic
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 2000, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        VengeanceDuration[(Integer A)] Greater than 0
                    Then - Actions
                        Set VengeanceDuration[(Integer A)] = (VengeanceDuration[(Integer A)] - 1)
                    Else - Actions
                        Set VengeanceDamage[(Integer A)] = 0.00
                        Custom Script: set udg_VengeanceUnit[bj_forLoopIndexA] = null
                        Custom Script: set udg_VengeanceWarden[bj_forLoopIndexA] = null
GJ on the spell by the way.
 
> Is this the DotA skill? By Spectre?

No.

> Set VengeanceUnit[(Integer A)] = No unit

Nulling a global variable is pointless.

Where are those implementation instructions?
 
> Set VengeanceUnit[(Integer A)] = No unit

Nulling a global variable is pointless.

because then i can check if the unit = no unit

Where are those implementation instructions?

i will add some

and t.s.e
whats the difference between both?
 
> because then i can check if the unit = no unit

Oh, well, usually if the variable cannot be set to a unit it will retain its "No unit" value.
 
you think of this part?:
Else - Actions
Set VengeanceDamage[(Integer A)] = 0.00
Set VengeanceUnit[(Integer A)] = No unit
Set VengeanceWarden[(Integer A)] = No unit
 
Yea, but what you did is fine. You aren't nulling in any way. :)
 
Neat spell :thup:



This is not good:
Code:
Vegeance Damage Taken
    Events
        [I][COLOR="Red"]Unit - Warden 0002 <gen> Takes damage[/COLOR][/I]
    Conditions
        (Damage taken) Greater than 0.00
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                VengeanceArray Equal to 2000
            Then - Actions
                Set VengeanceArray = 0
            Else - Actions
                Set VengeanceArray = (VengeanceArray + 1)
                Set VengeanceDamage[VengeanceArray] = (Damage taken)
                Set VengeanceDuration[VengeanceArray] = 10
                Set VengeanceUnit[VengeanceArray] = (Damage source)
                Set VengeanceWarden[VengeanceArray] = (Triggering unit)
... so delete that event and create yourself another trigger:
Code:
Vengeance Learn
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Vengeance 
        (Level of Vengeance  for (Triggering unit)) Equal to 1
    Actions
        Trigger - Add to Vegeance Damage Taken <gen> the event (Unit - (Triggering unit) Takes damage)


Also here:
Code:
Vegeance Damage Taken
    Events
    Conditions
        (Damage taken) Greater than 0.00
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                VengeanceArray Equal to 2000
            Then - Actions
                Set VengeanceArray = 0
            Else - Actions
                Set VengeanceArray = (VengeanceArray + 1)
                Set VengeanceDamage[VengeanceArray] = (Damage taken)
                [I][COLOR="Red"]Set VengeanceDuration[VengeanceArray] = 10[/COLOR][/I]
                Set VengeanceUnit[VengeanceArray] = (Damage source)
                Set VengeanceWarden[VengeanceArray] = (Triggering unit)
... that variable needs to be changed to:
Code:
Set VengeanceDuration[VengeanceArray] = ((Level of Vengeance  for (Triggering unit)) x 10)


Your "Vengeance Effect" unit should have a "flying" movement-type so it's created at the right spot as opposed to being offset slightly.
It should also not be shown on the minimap - set "Stats - Hide Minimap Display" to "true".
 
Rather than running from 1 to 2000 every time, why not just have it run to the Value of VengeanceArray?

That way, it runs to the max. And to keep it from getting anywhere near 2000, every 10 seconds that the warden is not in combat, it resets to 0. Or it could just be really late and I Could be really dumb.
 
Rather than running from 1 to 2000 every time, why not just have it run to the Value of VengeanceArray?

Won't work correctly. Once the VengeanceArray returns to 1 (after hitting 2000), you won't be able to get the loop correct (since you can't do an integer loop from 1900 to 2000 and back to 1 for example.

As I already suggested, dummy group would be the best way to go IMO (rather than checking through 2000 conditions) since it only takes the dummy units in exist (and those dummies will obviously get removed when no longer needed).
 
Neat spell :thup:




Also here:
Code:
Vegeance Damage Taken
    Events
    Conditions
        (Damage taken) Greater than 0.00
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                VengeanceArray Equal to 2000
            Then - Actions
                Set VengeanceArray = 0
            Else - Actions
                Set VengeanceArray = (VengeanceArray + 1)
                Set VengeanceDamage[VengeanceArray] = (Damage taken)
                [I][COLOR="Red"]Set VengeanceDuration[VengeanceArray] = 10[/COLOR][/I]
                Set VengeanceUnit[VengeanceArray] = (Damage source)
                Set VengeanceWarden[VengeanceArray] = (Triggering unit)
... that variable needs to be changed to:
Code:
Set VengeanceDuration[VengeanceArray] = ((Level of Vengeance  for (Triggering unit)) x 10)

why should i do that?
then the duration of the damage taken is 10*level?
i want it to be 10 seconds not 10*level

for the rest ok i change it

EDIT: edited^^
 
> why should i do that?

Because otherwise your ability has false tooltips from levels 2+;
they state that the Warden damages units in the last 20/30/40 seconds.

I forgot to mention earlier that you need to add a 'Read Me' inside the test map.
(That contains better instructions than those in your 1st post)
 
> why should i do that?

Because otherwise your ability has false tooltips from levels 2+;
they state that the Warden damages units in the last 20/30/40 seconds.

I forgot to mention earlier that you need to add a 'Read Me' inside the test map.
(That contains better instructions than those in your 1st post)

ahhhh
sry
thats because of the auto fill tool i will edit that
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      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