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: 522

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>(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?
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
because then i have to run every second trough 8000 loops
dunno maybe that laggs for some ppl
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
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.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> 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?
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
> 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?
 

Sim

Forum Administrator
Staff member
Reaction score
534
> 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.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
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
 

Sim

Forum Administrator
Staff member
Reaction score
534
Yea, but what you did is fine. You aren't nulling in any way. :)
 

Tinki3

Special Member
Reaction score
418
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".
 

noworries

New Member
Reaction score
4
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.
 

Flare

Stops copies me!
Reaction score
662
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).
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
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^^
 

Tinki3

Special Member
Reaction score
418
> 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)
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
> 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.

      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