[Spell] Resurrection Aura

Status
Not open for further replies.

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
Type: JASS(2)/GUI(1)
Thread-Safe/MultiInstancable: No
Triggers: 3

Import Difficulty: Easy

Resurrection Aura

PASBTNReincarnation.jpg


Units Affected: Allied, Friend, Hero, Self

Gives friendly heroes in range a chance to be resurrected when they die.

Level 1 - Gives a 10% chance for resurrection in a 500 AOE.
Level 2 - Gives a 15% chance for resurrection in a 600 AOE.
Level 3 - Gives a 20% chance for resurrection in a 700 AOE.
Level 4 - Gives a 25% chance for resurrection in a 800 AOE.
Level 5 - Gives a 30% chance for resurrection in a 900 AOE.

Thanks To ~ Duwenbasden, Tom Jones, Doom-Angel, AceHart and Mase.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Yes, even i could have made this MUI in GUI.. What can I say? It also lags alot...

But nice terrain? ;)
Cheerio
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Hm... I didn't actually see this in action, but I did see the triggers which look pretty nice. I think there isn't leaks, but I think I might've found one, but I accidently exited WE to see if I was right or wrong. Anyways, good job! :D

@People who say it can be done in GUI: Doesn't MUI require no globals?
 

Sim

Forum Administrator
Staff member
Reaction score
534
MUI requires no waits along with global variables.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
k here's a few things:

1) it's not MUI since u used a unit variable to put in the one who holds the resurrection aura so only 1 unit can hold on to this variable.
2)
Code:
All Units
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Add all units of (Units in (Playable map area) matching (((Matching unit) has buff Resurrection Aura ) Equal to True)) to BU
leaks a unit group and also u never removed those unit who actually don't have any buff (lost it) so u would revive those who are already at the second side of the map if they just went by....
to fix it simply add this:
Code:
All Units
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Custom script:    set bj_wantDestroyGroup = true
        Unit Group - Add all units of (Units in (Playable map area) matching (((Matching unit) has buff Resurrection Aura ) Equal to True)) to BU
        Unit Group - Pick every unit in BU and do (Actions)
           Loop - Actions
             If (All Conditions are True) then do (Then Actions) else do (Else Actions)
             If - Conditions
                  ((Matching unit) has buff Resurrection Aura ) Equal to False 
             Then - Actions
                  Remove (Picked Unit) from BU
             Else - Actions
and to make it MUI simply add array and use Integer A\ loop
 
D

Down

Guest
why doesnt anyone use conditions when you dont need a else


Action a unit dies
Condition Dieing Unit has aura equal to true
Condition Random number between Level of 1 and 100 greater than Level of buff equal to 5+(5Xskill Level)

If/the/else
If] unit is a hero equal to true
then]Revive hero instantly at at posistion of dieing unit
else]Unit create one unit, unit of type dieing unit at posistion of dieing unit


if you dont want to create a replacement unit.... when the unit dies add tarum to its unit class then move a dummy with ancenstor spirits to the units corpse and have it cast the spell then remove tarum class after it revives
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
Globals are used because....
1. When a unit dies it loses the buff.
2. You can't get the unit whos the spell is orginating from.
Its kinda MUI because 2 units can die and rez at the same time I believe.
As for the removing units from the group, I didn't think of it till now and it hand already been said.
Uploading a new version.

Edit: Not sure how to use the 'set bj_wantDestroyGroup = true' thing so please correct me if I'm wrong.

Code:
Actions
    Custom script:   set bj_wantDestroyGroup = true
    Unit Group - Add all units of (Units in (Playable map area) matching (((Matching unit) has buff Resurrection Aura ) Equal to True)) to BU
    Custom script:   set bj_wantDestroyGroup = true
    Unit Group - Remove all units of (Units in (Playable map area) matching (((Matching unit) has buff Resurrection Aura ) Equal to False)) from BU
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
2. You can't get the unit whos the spell is orginating from.
Its kinda MUI because 2 units can die and rez at the same time I believe.
no it's not MUI
since u based the succes % to be of that unit variable ability level multiply by 5 which means that if u chose this spell 2 times it would give 10% but if after it some other player choose it 1 time then when u cast it u would have 5%
so that's makes ur trigger not MUI, just add array and use Integer A loop (i hope u know how to do that)
Edit: Not sure how to use the 'set bj_wantDestroyGroup = true' thing so please correct me if I'm wrong.
it's fine :p
 

worldofDeath

New Member
Reaction score
47
You guys may not really like it. But hey its good to me nice job +rep..

Can we use this in other maps?
 

Omni

Ultra Cool Member
Reaction score
37
Code:
Events
-unit a unit dies
Conditions
-unit has buff :...
Actions
ifthenelse
 if
  -random nr between 1 and 100 less than (level of your aura X 10)
 then
  -set revivepoint = (unit position of(dying unit))
  -hero - revive (dying unit) at revivepoint show eyecandy
  -call RemoveLocation (udg_revivpoint)
 else
  -FIN
otherwise (if the hero - revive wont work) create 1 unit-type of dying unit and create a sfx
thats what i can imagine about ressurecion aura
why 3 triggers?
 
I

IKilledKEnny

Guest
Becuase when units die they lose their buffes.

However this could be done pretty easily, checking when a hero dies if there is a friendly caster with that ability.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
no it's not MUI
since u based the succes % to be of that unit variable ability level multiply by 5 which means that if u chose this spell 2 times it would give 10% but if after it some other player choose it 1 time then when u cast it u would have 5%
so that's makes ur trigger not MUI, just add array and use Integer A loop (i hope u know how to do that)
No, it takes a random number and if its under the chance then it will work.

Can we use this in other maps?
Sure, I'm going to add implementation instructions when I upload an updated version.

Code:
Events
-unit a unit dies
Conditions
-unit has buff :...
Actions
ifthenelse
 if
  -random nr between 1 and 100 less than (level of your aura X 10)
 then
  -set revivepoint = (unit position of(dying unit))
  -hero - revive (dying unit) at revivepoint show eyecandy
  -call RemoveLocation (udg_revivpoint)
 else
  -FIN
otherwise (if the hero - revive wont work) create 1 unit-type of dying unit and create a sfx
thats what i can imagine about ressurecion aura
why 3 triggers?
Dead units don't have buffs.

However this could be done pretty easily, checking when a hero dies if there is a friendly caster with that ability.
E - A unit dies
C -
A - if/then/else
pick all units in range of dying unit and if picked unit has buff = to true
and
random # between 1 and 100 less than 5 + (5*lvl of aura)
Then
rez hero
else
do nothing

^I'ma try that when I get on my home computer.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> 2. I didn't make it.

What do you mean? You didn't make this spell?

BTW the group leak is still there.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
> 2. I didn't make it.

What do you mean? You didn't make this spell?

BTW the group leak is still there.
Not that I didn't make the spell, its that I didn't make that trigger.

Edit: I probably forgot to upload the latest version, no group leak should be there.
 

Sim

Forum Administrator
Staff member
Reaction score
534
1. To advanced for me.
2. I didn't make it.

Do it. Even if it's too advanced, an ability like that needs to be MUI. You have nothing to do anyway he did it all for you ;)

Better than doing it in 3 triggers without MUI!

> Not that I didn't make the spell, its that I didn't make that trigger.

Well, there's not much left once the main trigger is done. :p
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
Just a question, how is mine not MUI in terms of rez.
I know not more then 1 hero can have this work but not many maps allow duplicate heroes.
I don't see how the global screws it up, its not changing it, just using it as a reference.
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      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