Spell Desperate Explosion

Vestras

Retired
Reaction score
248
Jass/Gui: Gui
Leakless: Yes
Lagless: Should be
Mui: Negative
Import difficult: No, very easy.

This spell it from my map, Infiltration of the Mountains

Type: Explosion
Buff: None
Cooldown: 90s

Creates a massive explosion around the caster, dealing incredible damage. Very powerfull, even though the caster is weakened much.

Code:
Desperate Explosion Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Desperate Explosion 
    Actions
        Unit - Pause De_Caster[De_TempInteger]
        Set De_TempInteger = (Player number of (Owner of (Triggering unit)))
        Set De_Caster[De_TempInteger] = (Casting unit)
        Set De_CasterLoc[De_TempInteger] = (Position of De_Caster[De_TempInteger])
        Set De_Region[De_TempInteger] = (Region centered at De_CasterLoc[De_TempInteger] with size (700.00, 700.00))
        Set De_UnitGroup[De_TempInteger] = (Units within 700.00 of De_CasterLoc[De_TempInteger] matching (((Owner of (Matching unit)) is an enemy of (Owner of De_Caster[De_TempInteger])) Equal to True))
        Set De_Life[De_TempInteger] = (Percentage life of De_Caster[De_TempInteger])
        Set De_Integer[De_TempInteger] = ((Integer(De_Life[De_TempInteger])) / 2)
        Countdown Timer - Start De_Timer[De_TempInteger] as a Repeating timer that will expire in 0.30 seconds
        Wait 10.00 seconds
        Set De_TempInteger = (Player number of (Owner of (Triggering unit)))
        Countdown Timer - Pause De_Timer[De_TempInteger]
        Unit - Unpause De_Caster[De_TempInteger]
        Unit - Set life of De_Caster[De_TempInteger] to De_Life[De_TempInteger]
        Custom script:   call RemoveLocation(udg_De_CasterLoc[udg_De_TempInteger])
        Custom script:   call RemoveRect(udg_De_Region[udg_De_TempInteger])
        Custom script:   call DestroyGroup(udg_De_UnitGroup[udg_De_TempInteger])

Code:
Desperate Explosion Periodic
    Events
        Time - De_Timer[1] expires
        Time - De_Timer[2] expires
        Time - De_Timer[3] expires
        Time - De_Timer[4] expires
        Time - De_Timer[5] expires
        Time - De_Timer[6] expires
        Time - De_Timer[7] expires
        Time - De_Timer[8] expires
        Time - De_Timer[9] expires
        Time - De_Timer[10] expires
        Time - De_Timer[11] expires
        Time - De_Timer[12] expires
    Conditions
    Actions
        For each (Integer A) from 0 to 12, do (Actions)
            Loop - Actions
                Custom script:   exitwhen GetExpiredTimer() == udg_De_Timer[GetForLoopIndexA()]
        Set De_RandomPoint = (Random point in De_Region[(Integer A)])
        Set De_RandomPoint2 = (Random point in De_Region[(Integer A)])
        Set De_RandomPoint3 = (Random point in De_Region[(Integer A)])
        Unit Group - Pick every unit in De_UnitGroup[(Integer A)] and do (Actions)
            Loop - Actions
                Unit - Pause (Picked unit)
                Special Effect - Create a special effect attached to the origin of (Picked unit) using Environment\LargeBuildingFire\LargeBuildingFire1.mdl
                Unit - Cause De_Caster[(Integer A)] to damage (Picked unit), dealing 4.00 damage of attack type Spells and damage type Normal
                Special Effect - Destroy (Last created special effect)
                Unit - Unpause (Picked unit)
        Special Effect - Create a special effect at De_RandomPoint using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
        Unit - Cause De_Caster[(Integer A)] to damage circular area after 0.00 seconds of radius 700.00 at De_CasterLoc[De_TempInteger], dealing 3.00 damage of attack type Spells and damage type Normal
        Special Effect - Destroy (Last created special effect)
        Special Effect - Create a special effect at De_RandomPoint2 using Objects\Spawnmodels\Demon\InfernalMeteor\InfernalMeteor.mdl
        Unit - Cause De_Caster[(Integer A)] to damage circular area after 0.00 seconds of radius 700.00 at De_CasterLoc[De_TempInteger], dealing 3.00 damage of attack type Spells and damage type Normal
        Special Effect - Destroy (Last created special effect)
        Special Effect - Create a special effect at De_RandomPoint3 using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Unit - Cause De_Caster[(Integer A)] to damage circular area after 0.00 seconds of radius 700.00 at De_CasterLoc[De_TempInteger], dealing 3.00 damage of attack type Spells and damage type Normal
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_De_RandomPoint)
        Custom script:   call RemoveLocation(udg_De_RandomPoint2)
        Custom script:   call RemoveLocation(udg_De_RandomPoint3)

WC3ScrnShot_011708_102846_02copy.jpg


WC3ScrnShot_011708_102844_01copy.jpg


WC3ScrnShot_011708_102857_03copy.jpg

Hope you like it.

New version update! Now MPI!
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Damages everything? Well.. that can't be very nice :p
You need to destroy De_UnitGroup because it leaks. Move this
Set De_UnitGroup = (Units within 700.00 of De_CasterLoc matching (((Owner of (Matching unit)) is an enemy of (Owner of De_Caster)) Equal to True))

in the second trigger and in the end put call DestroyGroup(udg_DeUnitGroup)

EDIT: You don't need to set special effects into a variable and then destroy them. Just put Destroy (Last created special effect) after every effect and you're done! Like this:
Special Effect - Create a special effect at De_RandomPoint2 using Objects\Spawnmodels\Demon\InfernalMeteor\InfernalMeteor.mdl
Special Effect - Destroy (Last created special effect)
 

Vestras

Retired
Reaction score
248
Damages everything? Well.. that can't be very nice :p
You need to destroy De_UnitGroup because it leaks. Move this
Set De_UnitGroup = (Units within 700.00 of De_CasterLoc matching (((Owner of (Matching unit)) is an enemy of (Owner of De_Caster)) Equal to True))

in the second trigger and in the end put call DestroyGroup(udg_DeUnitGroup)

EDIT: You don't need to set special effects into a variable and then destroy them. Just put Destroy (Last created special effect) after every effect and you're done! Like this:
Special Effect - Create a special effect at De_RandomPoint2 using Objects\Spawnmodels\Demon\InfernalMeteor\InfernalMeteor.mdl
Special Effect - Destroy (Last created special effect)

They said it didn't leak.

in this thread
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Well, I guess you can leave it this way... Anyway, you can get rid of the SFX variables because they aren't needed ;)
 

Quauhtli

I have the right to remain silent.
Reaction score
62
Powerful is with one L. (just letting you know)

Exactly how does the caster get self damage? (I didn't find anything (just overlooked though) so).
 

Tom Jones

N/A
Reaction score
437
You know that the Unit - Damage Area damages everything, including allies. A better way is to pick all units in the region, and then use Unit - Damage Target on picked unit.
 

Quauhtli

I have the right to remain silent.
Reaction score
62
Well it's a Desperate Explosion, perhaps he wanted it that way?
 

0zaru

Learning vJASS ;)
Reaction score
60
Also sometimes is bugged. When I used it and test it with one Damage_Show_System then i saw that the damage was the half of the dmg that it was suppoused to deal.
 

Vestras

Retired
Reaction score
248
Also sometimes is bugged. When I used it and test it with one Damage_Show_System then i saw that the damage was the half of the dmg that it was suppoused to deal.

Woot? That is very wierd.. Why?

Tom Jones>

I know. I wanted it.

Quauhtli>

Unit - Set life of De_Caster to (Real(De_Integer))
 

Tom Jones

N/A
Reaction score
437
Use arrays for each of your variables, and use the player number of the owning player as index. You can change your periodic event to timer expires, and then use a timer for each player instead.
 
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