Arcane Bomb v1.02

This bundle is marked as approved. It works and satisfies the submission rules.

Spell Preview

Spell Description

Requirements

AB_GIF.jpg
AB_ICON.jpg
Arcane Bomb
Lobs a ball of arcane energy towards the target location. The
bomb will then bounce up to a number of times or until it hits
terrain, losing height and distance overtime. On every bounce,
the bomb will deal damage to nearby enemy units. If the bomb
kills a certain amount of units, the last bounce will emit a
shockwave that will pull nearby enemy units to the center.​

Triggers

How to Install

Credits

Changelog

  • AB Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- !! CONFIG START !! --------
      • -------- Ability & Dummy --------
      • Set AB_Ability = Arcane Bomb
      • -------- Order ID for AB_Ability --------
      • Set AB_Order_ID = channel
      • -------- Dummy Unit --------
      • -------- NOTE: The dummy unit in Arcane Bomb test map has shadow enabled for added special effects --------
      • -------- You can either just use your default global dummy unit, or have a special one with shadow enabled for this spell --------
      • Set AB_Dummy = Dummy (Arcane Bomb)
      • -------- --------
      • -------- Max Level AB_Ability Will Have --------
      • -------- NOTE: THIS IS REALLY IMPORTANT IF YOU WANT THE BOUNCE TO WORK PROPERLY --------
      • Set AB_MaxLevel = 3
      • -------- --------
      • -------- Damage of Bounce Per Level --------
      • Set AB_Damage[1] = 150.00
      • Set AB_Damage[2] = 175.00
      • Set AB_Damage[3] = 225.00
      • -------- --------
      • -------- Bomb Jump Stuff --------
      • -------- Minimum Cast Range Bomb Will Start --------
      • -------- NEVER make this value 0 --------
      • Set AB_MinCastRange = 250.00
      • -------- What Will Be the Distance of the Next Jump Based on the Current Jump Distance (percentage based) --------
      • Set AB_JumpDistance = 80.00
      • -------- How Much of the Distance Will Be Adjusted for the Arc (percentage based) --------
      • Set AB_Arc = 75.00
      • -------- How Long it Will Take for Bomb to Reach Target Point Per Level --------
      • Set AB_TravelTime[1] = 1.00
      • Set AB_TravelTime[2] = 1.00
      • Set AB_TravelTime[3] = 1.00
      • -------- Radius Bomb Will Deal Damage on Every Landing --------
      • Set AB_BounceAoE = 100.00
      • -------- Maximum Number of Times Bomb Will Jump Per Level --------
      • Set AB_MaxBounce[1] = 4
      • Set AB_MaxBounce[2] = 4
      • Set AB_MaxBounce[3] = 4
      • -------- Special Effect for Bounce --------
      • Set AB_SFXBounce = Abilities\Spells\Undead\OrbOfDeath\OrbOfDeathMissile.mdl
      • -------- --------
      • -------- Shockwave Stuff --------
      • -------- How Many Units Bomb has to Kill for Shockwave --------
      • Set AB_RequiredKills[1] = 4
      • Set AB_RequiredKills[2] = 3
      • Set AB_RequiredKills[3] = 2
      • -------- Special Effect to Indicate Players Bomb Will Emit Shockwave --------
      • Set AB_SFX_KillCountIndicator = Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • -------- Radius of Shockwave --------
      • Set AB_SW_AoE = 250.00
      • -------- Knockback Stuff for Shockwave --------
      • Set AB_SW_KBDistance = 200.00
      • Set AB_SW_KBTime = 0.50
      • -------- Special Effect for Shockwave --------
      • Set AB_SFXExplode = units\nightelf\SpiritOfVengeance\SpiritOfVengeance.mdl
      • -------- Lightning Type --------
      • Set AB_L_SFX = Chain Lightning - Primary
      • -------- How Long L_SFX Will Last --------
      • Set AB_L_Duration = 0.50
      • -------- How High L_SFX Will Be --------
      • Set AB_L_Height = 1500.00
      • -------- Vertex Color Percentage for L_SFX --------
      • Set AB_L_Red = 1.00
      • Set AB_L_Green = 0.00
      • Set AB_L_Blue = 1.00
      • Set AB_L_Alpha = 1.00
      • -------- --------
      • -------- Knockback Stuff --------
      • Set AB_KBDistance = 200.00
      • -------- KBAoE refers to the minimum height difference between the air unit and current height of the bomb --------
      • Set AB_KBAoE = 75.00
      • Set AB_KBTime = 1.25
      • Set AB_SFX_KB = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
      • -------- --------
      • -------- How Far in Front of Caster Bomb Will Spawn --------
      • Set AB_SpawnDistance = 50.00
      • -------- Special Effect for Bomb --------
      • Set AB_SFXBomb = Abilities\Spells\Undead\FrostArmor\FrostArmorTarget.mdl
      • -------- Attachment Point for SFXBomb --------
      • Set AB_Attach_SFXBomb = chest
      • -------- 2nd Special Effect for Bomb --------
      • -------- NOTE: You don't need both SFXs; I only used two to make it more aesthetically pleasing --------
      • -------- Also keep in mind that this will be the "death sound" effect --------
      • Set AB_SFXBomb2 = Abilities\Spells\Orc\LightningBolt\LightningBoltMissile.mdl
      • -------- Attachment Point for SFXBomb2 --------
      • Set AB_Attach_SFXBomb2 = origin
      • -------- Special Effect for Bomb "Trail" --------
      • Set AB_SFXTail = Abilities\Weapons\SludgeMissile\SludgeMissile.mdl
      • -------- Vertex Color Percentage for Bomb --------
      • Set AB_Red = 100.00
      • Set AB_Green = 0.00
      • Set AB_Blue = 100.00
      • -------- --------
      • -------- Other Damage Configurables --------
      • Set AB_AttackType = Spells
      • Set AB_DamageType = Normal
      • -------- !! CONFIG END !! --------
      • -------- --------
      • Set AB_PeriodicTimer = 0.03
      • Set AB_L_PeriodicTimer = (Min(AB_L_Duration, 0.10))
      • Trigger - Add to AB Loop <gen> the event (Time - Every AB_PeriodicTimer seconds of game time)
      • Trigger - Add to AB L Loop <gen> the event (Time - Every AB_L_PeriodicTimer seconds of game time)
      • Set AB_JD_Percent = (AB_JumpDistance / 100.00)
      • Set AB_Arc_Percent = (AB_Arc / 100.00)
      • For each (Integer AB_TempInt) from 1 to AB_MaxLevel, do (Actions)
        • Loop - Actions
          • Set AB_Time[AB_TempInt] = (AB_TravelTime[AB_TempInt] / AB_PeriodicTimer)

  • AB Cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to AB_Ability
    • Actions
      • Set AB_SpellCount = (AB_SpellCount + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AB_SpellCount Equal to 1
        • Then - Actions
          • Trigger - Turn on AB Loop <gen>
        • Else - Actions
          • -------- loop is already on; do nothing --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AB_RecycledSize Equal to 0
        • Then - Actions
          • Set AB_MaxIndex = (AB_MaxIndex + 1)
          • Set AB_Spell_ID = AB_MaxIndex
        • Else - Actions
          • Set AB_RecycledSize = (AB_RecycledSize - 1)
          • Set AB_Spell_ID = AB_RecycledStack[AB_RecycledSize]
      • Set AB_NodeNext[AB_Spell_ID] = 0
      • Set AB_NodeNext[AB_NodePrev[0]] = AB_Spell_ID
      • Set AB_NodePrev[AB_Spell_ID] = AB_NodePrev[0]
      • Set AB_NodePrev[0] = AB_Spell_ID
      • -------- --------
      • Set AB_Caster[AB_Spell_ID] = (Triggering unit)
      • Set AB_Owner[AB_Spell_ID] = (Triggering player)
      • Set AB_AbilityLvl[AB_Spell_ID] = (Level of AB_Ability for AB_Caster[AB_Spell_ID])
      • Set AB_CheckPathing[AB_Spell_ID] = False
      • Set AB_CounterBounce[AB_Spell_ID] = 0
      • Set AB_CounterKills[AB_Spell_ID] = 0
      • Set AB_DistanceTraveled[AB_Spell_ID] = 0.00
      • -------- --------
      • Set AB_TempLoc = (Position of AB_Caster[AB_Spell_ID])
      • Set AB_BombLoc = (Target point of ability being cast)
      • Set AB_Direction[AB_Spell_ID] = (Angle from AB_TempLoc to AB_BombLoc)
      • Custom script: call RemoveLocation(udg_AB_BombLoc)
      • -------- --------
      • Set AB_BombLoc = (AB_TempLoc offset by AB_SpawnDistance towards AB_Direction[AB_Spell_ID] degrees)
      • Unit - Create 1 AB_Dummy for AB_Owner[AB_Spell_ID] at AB_BombLoc facing Default building facing degrees
      • Set AB_BombDummy[AB_Spell_ID] = (Last created unit)
      • Animation - Change AB_BombDummy[AB_Spell_ID]'s vertex coloring to (AB_Red%, AB_Green%, AB_Blue%) with 0.00% transparency
      • Special Effect - Create a special effect attached to the AB_Attach_SFXBomb of AB_BombDummy[AB_Spell_ID] using AB_SFXBomb
      • Set AB_Bomb_SFX[AB_Spell_ID] = (Last created special effect)
      • Special Effect - Create a special effect attached to the AB_Attach_SFXBomb2 of AB_BombDummy[AB_Spell_ID] using AB_SFXBomb2
      • Set AB_Bomb2_SFX[AB_Spell_ID] = (Last created special effect)
      • Special Effect - Create a special effect attached to the chest of AB_BombDummy[AB_Spell_ID] using AB_SFXTail
      • Custom script: call RemoveLocation(udg_AB_TempLoc)
      • -------- --------
      • Set AB_TempLoc = (Target point of ability being cast)
      • Set AB_Distance[AB_Spell_ID] = (Distance between AB_TempLoc and AB_BombLoc)
      • Set AB_MoveRate[AB_Spell_ID] = (AB_Distance[AB_Spell_ID] / AB_Time[AB_AbilityLvl[AB_Spell_ID]])
      • Set AB_MaxHeight[AB_Spell_ID] = (AB_Distance[AB_Spell_ID] x AB_Arc_Percent)
      • Custom script: call RemoveLocation(udg_AB_TempLoc)
      • -------- --------
      • Set AB_TempLoc = (AB_BombLoc offset by AB_Distance[AB_Spell_ID] towards AB_Direction[AB_Spell_ID] degrees)
      • Set AB_TempReal = (Current flying height of AB_Caster[AB_Spell_ID])
      • Animation - Change AB_BombDummy[AB_Spell_ID] flying height to AB_TempReal at 0.00
      • Custom script: set udg_AB_StartHeight[udg_AB_Spell_ID] = GetLocationZ(udg_AB_BombLoc) + udg_AB_TempReal
      • Custom script: set udg_AB_EndHeight[udg_AB_Spell_ID] = GetLocationZ(udg_AB_TempLoc)
      • -------- --------
      • Custom script: call RemoveLocation(udg_AB_TempLoc)
      • Custom script: call RemoveLocation(udg_AB_BombLoc)
  • AB Cancel
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Issued order) Equal to (Order(AB_Order_ID))
      • (Level of AB_Ability for (Triggering unit)) Greater than 0
    • Actions
      • Set AB_TempUnit = (Triggering unit)
      • Set AB_TempLoc = (Position of AB_TempUnit)
      • Set AB_BombLoc = (Target point of issued order)
      • Set AB_TempReal = (Distance between AB_TempLoc and AB_BombLoc)
      • -------- simulates an ingame error message if the targeted location is inside minimum cast range --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AB_TempReal Less than AB_MinCastRange
        • Then - Actions
          • Unit - Pause AB_TempUnit
          • Unit - Order AB_TempUnit to Stop
          • Unit - Unpause AB_TempUnit
          • -------- NOTE: SimError is optional; but requires JNGP to use --------
          • -------- if you do not want to use SimError, delete this custom script --------
          • Custom script: call SimError(GetTriggerPlayer(), "Target is inside minimum cast range.")
        • Else - Actions
          • -------- targeted location is not inside minimum cast range; start new spell instance --------
      • Custom script: call RemoveLocation(udg_AB_TempLoc)
      • Custom script: call RemoveLocation(udg_AB_BombLoc)
  • AB Loop
    • Events
    • Conditions
    • Actions
      • Custom script: local real d
      • Custom script: local real x
      • Custom script: local real adjustZ
      • Custom script: local real aimZ
      • Custom script: local real originZ
      • -------- --------
      • Set AB_Spell_ID = 0
      • For each (Integer AB_LoopInt) from 1 to AB_SpellCount, do (Actions)
        • Loop - Actions
          • Set AB_Spell_ID = AB_NodeNext[AB_Spell_ID]
          • -------- only check for pathing when the bomb has reached the ground --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AB_CheckPathing[AB_Spell_ID] Equal to True
            • Then - Actions
              • Set CP_Point = (Position of AB_BombDummy[AB_Spell_ID])
              • Trigger - Run Check Walkability <gen> (ignoring conditions)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CP_PointIsWalkable Equal to False
                • Then - Actions
                  • Set AB_CounterBounce[AB_Spell_ID] = AB_MaxBounce[AB_AbilityLvl[AB_Spell_ID]]
                • Else - Actions
                  • -------- point is pathable; continue moving bomb --------
              • Set AB_CheckPathing[AB_Spell_ID] = False
              • Custom script: call RemoveLocation(udg_CP_Point)
            • Else - Actions
              • -------- the bomb has not reached the ground; do not check for pathing yet --------
          • -------- checking if bomb has reached its maximum bounce count --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AB_CounterBounce[AB_Spell_ID] Greater than or equal to AB_MaxBounce[AB_AbilityLvl[AB_Spell_ID]]
            • Then - Actions
              • Set AB_BombLoc = (Position of AB_BombDummy[AB_Spell_ID])
              • Special Effect - Create a special effect at AB_BombLoc using AB_SFXBounce
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect at AB_BombLoc using AB_SFXBomb2
              • Special Effect - Destroy (Last created special effect)
              • -------- checking if spell instance met RequiredKills to activate shockwave --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AB_CounterKills[AB_Spell_ID] Greater than or equal to AB_RequiredKills[AB_AbilityLvl[AB_Spell_ID]]
                • Then - Actions
                  • Trigger - Run AB L Create <gen> (ignoring conditions)
                  • Special Effect - Create a special effect at AB_BombLoc using AB_SFXExplode
                  • Special Effect - Destroy (Last created special effect)
                  • -------- --------
                  • -------- throwing units around for shockwave --------
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within AB_SW_AoE of AB_BombLoc) and do (Actions)
                    • Loop - Actions
                      • Set AB_TempUnit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (AB_TempUnit is A structure) Equal to False
                          • (AB_TempUnit is A flying unit) Equal to False
                          • (AB_TempUnit is Magic Immune) Equal to False
                          • (AB_TempUnit is alive) Equal to True
                          • (AB_TempUnit belongs to an enemy of AB_Owner[AB_Spell_ID]) Equal to True
                        • Then - Actions
                          • Set AB_TempLoc = (Position of AB_TempUnit)
                          • Set Knockback2DAngle = (Angle from AB_TempLoc to AB_BombLoc)
                          • Set Knockback2DDistance = AB_SW_KBDistance
                          • Set Knockback2DTime = AB_KBTime
                          • Set Knockback2DLoopFX = <Empty String>
                          • Set Knockback2DUnit = AB_TempUnit
                          • Trigger - Run Knockback 2D <gen> (checking conditions)
                          • Custom script: call RemoveLocation(udg_AB_TempLoc)
                        • Else - Actions
                          • -------- TempUnit did not pass filters; shockwave will not affect this target --------
                • Else - Actions
                  • -------- RequiredKills was not met; do not activate shockwave --------
              • Custom script: call RemoveLocation(udg_AB_BombLoc)
              • -------- --------
              • Special Effect - Destroy AB_Bomb_SFX[AB_Spell_ID]
              • Special Effect - Destroy AB_Bomb2_SFX[AB_Spell_ID]
              • Unit - Remove AB_BombDummy[AB_Spell_ID] from the game
              • -------- --------
              • Set AB_RecycledStack[AB_RecycledSize] = AB_Spell_ID
              • Set AB_RecycledSize = (AB_RecycledSize + 1)
              • Set AB_NodeNext[AB_NodePrev[AB_Spell_ID]] = AB_NodeNext[AB_Spell_ID]
              • Set AB_NodePrev[AB_NodeNext[AB_Spell_ID]] = AB_NodePrev[AB_Spell_ID]
              • -------- --------
              • Set AB_SpellCount = (AB_SpellCount - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AB_SpellCount Equal to 0
                • Then - Actions
                  • Trigger - Turn off AB Loop <gen>
                • Else - Actions
                  • -------- there is still a spell instance running; do not turn loop off --------
            • Else - Actions
              • -------- xy adjustment --------
              • Set AB_TempLoc = (Position of AB_BombDummy[AB_Spell_ID])
              • Set AB_BombLoc = (AB_TempLoc offset by AB_MoveRate[AB_Spell_ID] towards AB_Direction[AB_Spell_ID] degrees)
              • Set AB_DistanceTraveled[AB_Spell_ID] = (AB_DistanceTraveled[AB_Spell_ID] + AB_MoveRate[AB_Spell_ID])
              • -------- z adjustment --------
              • Custom script: set d = udg_AB_Distance[udg_AB_Spell_ID]
              • Custom script: set x = udg_AB_DistanceTraveled[udg_AB_Spell_ID]
              • Custom script: set originZ = udg_AB_StartHeight[udg_AB_Spell_ID]
              • Custom script: set aimZ = udg_AB_EndHeight[udg_AB_Spell_ID]
              • Custom script: set adjustZ = originZ - GetLocationZ(udg_AB_TempLoc)
              • Custom script: set udg_AB_Height = adjustZ + 4 * udg_AB_MaxHeight[udg_AB_Spell_ID] * x * (d-x) / (d*d) + x * (aimZ-originZ) / d
              • -------- applying adjustment --------
              • Unit - Move AB_BombDummy[AB_Spell_ID] instantly to AB_BombLoc
              • Animation - Change AB_BombDummy[AB_Spell_ID] flying height to AB_Height at 0.00
              • -------- --------
              • Custom script: call RemoveLocation(udg_AB_TempLoc)
              • -------- knocking back enemy air units --------
              • Set AB_CurrentHeight = (Current flying height of AB_BombDummy[AB_Spell_ID])
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within AB_BounceAoE of AB_BombLoc) and do (Actions)
                • Loop - Actions
                  • Set AB_TempUnit = (Picked unit)
                  • Set AB_TempReal = (Current flying height of AB_TempUnit)
                  • Set AB_HeightDifference = (Abs((AB_CurrentHeight - AB_TempReal)))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (AB_TempUnit is A flying unit) Equal to True
                      • (AB_TempUnit is Magic Immune) Equal to False
                      • (AB_TempUnit is alive) Equal to True
                      • (AB_TempUnit belongs to an enemy of AB_Owner[AB_Spell_ID]) Equal to True
                      • AB_HeightDifference Less than or equal to AB_KBAoE
                    • Then - Actions
                      • Set AB_TempLoc = (Position of AB_TempUnit)
                      • Set Knockback2DAngle = (Angle from AB_BombLoc to AB_TempLoc)
                      • Set Knockback2DDistance = AB_KBDistance
                      • Set Knockback2DTime = AB_KBTime
                      • Set Knockback2DLoopFX = AB_SFX_KB
                      • Set Knockback2DUnit = AB_TempUnit
                      • Trigger - Run Knockback 2D <gen> (checking conditions)
                      • Custom script: call RemoveLocation(udg_AB_TempLoc)
                    • Else - Actions
                      • -------- TempUnit did not pass filters; do not knockback --------
              • -------- checking if bomb has reached its target point --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AB_DistanceTraveled[AB_Spell_ID] Greater than or equal to AB_Distance[AB_Spell_ID]
                • Then - Actions
                  • Set AB_CounterBounce[AB_Spell_ID] = (AB_CounterBounce[AB_Spell_ID] + 1)
                  • -------- if this is not the last bounce, reset data for next jump --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • AB_CounterBounce[AB_Spell_ID] Less than AB_MaxBounce[AB_AbilityLvl[AB_Spell_ID]]
                    • Then - Actions
                      • Set AB_DistanceTraveled[AB_Spell_ID] = 0.00
                      • Set AB_Distance[AB_Spell_ID] = (AB_Distance[AB_Spell_ID] x AB_JD_Percent)
                      • Set AB_MoveRate[AB_Spell_ID] = (AB_Distance[AB_Spell_ID] / AB_Time[AB_AbilityLvl[AB_Spell_ID]])
                      • Set AB_MaxHeight[AB_Spell_ID] = (AB_Distance[AB_Spell_ID] x AB_Arc_Percent)
                      • Set AB_CheckPathing[AB_Spell_ID] = True
                      • -------- --------
                      • Set AB_TempLoc = (AB_BombLoc offset by AB_Distance[AB_Spell_ID] towards AB_Direction[AB_Spell_ID] degrees)
                      • Custom script: set udg_AB_StartHeight[udg_AB_Spell_ID] = GetLocationZ(udg_AB_BombLoc)
                      • Custom script: set udg_AB_EndHeight[udg_AB_Spell_ID] = GetLocationZ(udg_AB_TempLoc)
                      • -------- --------
                      • Custom script: call RemoveLocation(udg_AB_TempLoc)
                    • Else - Actions
                      • -------- this is the last bounce; do not reset data --------
                  • Special Effect - Create a special effect attached to the origin of AB_BombDummy[AB_Spell_ID] using AB_SFXBounce
                  • Special Effect - Destroy (Last created special effect)
                  • -------- --------
                  • -------- dealing damage to enemy units inside the bounce radius --------
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within AB_BounceAoE of AB_BombLoc) and do (Actions)
                    • Loop - Actions
                      • Set AB_TempUnit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (AB_TempUnit is A structure) Equal to False
                          • (AB_TempUnit is A flying unit) Equal to False
                          • (AB_TempUnit is Magic Immune) Equal to False
                          • (AB_TempUnit is alive) Equal to True
                          • (AB_TempUnit belongs to an enemy of AB_Owner[AB_Spell_ID]) Equal to True
                        • Then - Actions
                          • Unit - Cause AB_Caster[AB_Spell_ID] to damage AB_TempUnit, dealing AB_Damage[AB_AbilityLvl[AB_Spell_ID]] damage of attack type AB_AttackType and damage type AB_DamageType
                          • -------- checking if TempUnit died so we can add to CounterKills --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • AB_CounterKills[AB_Spell_ID] Less than AB_RequiredKills[AB_AbilityLvl[AB_Spell_ID]]
                              • (AB_TempUnit is dead) Equal to True
                            • Then - Actions
                              • Set AB_CounterKills[AB_Spell_ID] = (AB_CounterKills[AB_Spell_ID] + 1)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • AB_CounterKills[AB_Spell_ID] Greater than or equal to AB_RequiredKills[AB_AbilityLvl[AB_Spell_ID]]
                                • Then - Actions
                                  • Special Effect - Create a special effect at AB_BombLoc using AB_SFX_KillCountIndicator
                                  • Special Effect - Destroy (Last created special effect)
                                • Else - Actions
                            • Else - Actions
                              • -------- TempUnit did not die or shockwave is already activated; do not increment CounterKills --------
                        • Else - Actions
                          • -------- TempUnit did not pass filters; do not deal damage --------
                • Else - Actions
                  • -------- bomb has not reached target point, continue to move --------
              • Custom script: call RemoveLocation(udg_AB_BombLoc)
  • AB L Create
    • Events
    • Conditions
    • Actions
      • Custom script: local real x1 = GetLocationX(udg_AB_BombLoc)
      • Custom script: local real y1 = GetLocationY(udg_AB_BombLoc)
      • Custom script: local real z1 = GetLocationZ(udg_AB_BombLoc)
      • Custom script: local real z2 = GetLocationZ(udg_AB_BombLoc) + udg_AB_L_Height
      • -------- --------
      • Set AB_L_Count = (AB_L_Count + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AB_L_Count Equal to 1
        • Then - Actions
          • Trigger - Turn on AB L Loop <gen>
        • Else - Actions
          • -------- loop is already on; do nothing --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AB_L_RecycledSize Equal to 0
        • Then - Actions
          • Set AB_L_MaxIndex = (AB_L_MaxIndex + 1)
          • Set AB_L_ID = AB_L_MaxIndex
        • Else - Actions
          • Set AB_L_RecycledSize = (AB_L_RecycledSize - 1)
          • Set AB_L_ID = AB_L_RecycledStack[AB_L_RecycledSize]
      • Set AB_L_NodeNext[AB_L_ID] = 0
      • Set AB_L_NodeNext[AB_L_NodePrev[0]] = AB_L_ID
      • Set AB_L_NodePrev[AB_L_ID] = AB_L_NodePrev[0]
      • Set AB_L_NodePrev[0] = AB_L_ID
      • -------- --------
      • Custom script: set udg_AB_L[udg_AB_L_ID] = AddLightningEx(udg_AB_L_SFX, true, x1, y1, z1, x1, y1, z2)
      • Lightning - Change color of AB_L[AB_L_ID] to (AB_L_Red AB_L_Green AB_L_Blue) with AB_L_Alpha alpha
      • Set AB_L_Counter[AB_L_ID] = 0.00
  • AB L Loop
    • Events
    • Conditions
    • Actions
      • Set AB_L_ID = 0
      • For each (Integer AB_L_LoopInt) from 1 to AB_L_Count, do (Actions)
        • Loop - Actions
          • Set AB_L_ID = AB_L_NodeNext[AB_L_ID]
          • Set AB_L_Counter[AB_L_ID] = (AB_L_Counter[AB_L_ID] + AB_L_PeriodicTimer)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AB_L_Counter[AB_L_ID] Greater than or equal to AB_L_Duration
            • Then - Actions
              • Lightning - Destroy AB_L[AB_L_ID]
              • -------- --------
              • Set AB_L_RecycledStack[AB_L_RecycledSize] = AB_L_ID
              • Set AB_L_RecycledSize = (AB_L_RecycledSize + 1)
              • Set AB_L_NodeNext[AB_L_NodePrev[AB_L_ID]] = AB_L_NodeNext[AB_L_ID]
              • Set AB_L_NodePrev[AB_L_NodeNext[AB_L_ID]] = AB_L_NodePrev[AB_L_ID]
              • -------- --------
              • Set AB_L_Count = (AB_L_Count - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AB_L_Count Equal to 0
                • Then - Actions
                  • Trigger - Turn off AB L Loop <gen>
                • Else - Actions
                  • -------- there is still a spell instance running; do not turn loop off --------
            • Else - Actions
              • -------- it is not time to destroy the lightning, continue to show --------
  1. Under Preferences, make sure you have "Automatically create
    unknown variables while pasting trigger data" checked

  2. Import dummy.mdx, then copy and paste the dummy unit and
    custom ability into your map
    NOTE: This dummy unit has shadow enabled, so it
    will not have the same effects as other global dummy units
    If you already have dummy.mdx imported into
    your map, you DO NOT have to reimport it

  3. Copy and paste the Resources folder into your map
    NOTE: If you already have a resource in the Resources
    folder imported into your map, you DO NOT have to reimport it

  4. Copy and paste the Arcane Bomb folder into your map

  5. Go to the AB Config trigger, and change the Ability & Dummy
    variables to the corresponding objects you just imported
User
Bribe - GUI Knockback 2D & GUI Unit Indexer
PurgeandFire - Check Walkability
Vexorian - dummy.mdx & SimError
[TD]

v1.02 (April 07, 2016)
  • Added a lightning special effect to appear with the shockwave
  • Added an extra note for JumpDistance stating users to to keep it > 0
  • Changed formula for the parabola to now work with a different Z end points

v1.01 (March 24, 2016)
  • Added an extra note for MinCastRange stating users to never put it at 0
  • Fixed a group leak when shockwave was activated
v1.00 (March 24, 2016)
  • Uploaded

Keywords:
arcane, bomb, mage, magic, knockback, jump, parabola, bounce, bouncing, explode, explosion, purple, linked, listing, gui, mui, killcide
Contents

Arcane Bomb v1.02 (Map)

Reviews
24th Mar 2016 Your resource has been reviewed by BPower. In case of any questions or for reconfirming the moderator's rating, please make use of the Quick Reply function of this thread. Review: Excellent in concept and coding. Furthermore...

Moderator

M

Moderator

24th Mar 2016

General Info

Your resource has been reviewed by BPower.
In case of any questions or for reconfirming the moderator's rating,
please make use of the Quick Reply function of this thread.
Review:
Excellent in concept and coding. Furthermore well chosen special effect models.
Good job. Approved with a moderator rating of Highly recommended.

Troubleshooting:

  • Nothing
 
Level 11
Joined
Jul 25, 2014
Messages
490
The configuration could be better, yes it allows to change many different aspects of the ability, but few of them upgrade with levels. Also there should be a configuration for which targets to hit since, for e.g., you don't hit flying units.

Couldn't find anything wrong with the code itself, terrific job.
 
Level 19
Joined
Mar 18, 2012
Messages
1,717
  • Unit Group - Pick every unit in (Units within AB_SW_AoE of AB_BombLoc) and do (Actions)
    • Loop - Actions
      • Set AB_TempUnit = (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (AB_TempUnit is A structure) Equal to False
          • (AB_TempUnit is A flying unit) Equal to False
          • (AB_TempUnit is Magic Immune) Equal to False
          • (AB_TempUnit is alive) Equal to True
          • (AB_TempUnit belongs to an enemy of AB_Owner[AB_Spell_ID]) Equal to True
        • Then - Actions
          • Set AB_TempLoc = (Position of AB_TempUnit)
          • Set Knockback2DAngle = (Angle from AB_TempLoc to AB_BombLoc)
          • Set Knockback2DDistance = AB_SW_KBDistance
          • Set Knockback2DTime = AB_KBTime
          • Set Knockback2DLoopFX = <Empty String>
          • Set Knockback2DUnit = AB_TempUnit
          • Trigger - Run Knockback 2D <gen> (checking conditions)
          • Custom script: call RemoveLocation(udg_AB_TempLoc)
        • Else - Actions
          • -------- TempUnit did not pass filters; shockwave will not affect this target --------
^Group handle leak.

  • Set AB_Distance[AB_Spell_ID] = (Distance between AB_TempLoc and AB_BombLoc)
^Make sure this value is never 0.

Really great spell. Good job.
 

KILLCIDE

Spell Moderator
Level 36
Joined
Jul 22, 2015
Messages
3,488
The configuration could be better, yes it allows to change many different aspects of the ability, but few of them upgrade with levels. Also there should be a configuration for which targets to hit since, for e.g., you don't hit flying units.
Do you have any suggestions on what I should add? Adding configurables on which targets can or can not be hit would make the trigger's filtering system EXTREMELY convoluted. This wouldn't be that big of a problem for the version integrated with GUI Spell System though :p I also couldn't see what would actually be worth upgrading with levels other than what I already have.

Group handle leak.
Good eye ;D

  • Set AB_Distance[AB_Spell_ID] = (Distance between AB_TempLoc and AB_BombLoc)
^Make sure this value is never 0.
That's what the AB Cancel Trigger is for :) however, I went ahead and add an extra note with MinCastRange stating users to never put it at 0.

Really great spell. Good job.
Thanks! I will send you a VM once I fix the leak.


Ugh. Use a missile system, would make it 10x easier.

Still, fancy af.
Yeah it would, but I wanted to learn how to do it myself! Thanks though.
 

KILLCIDE

Spell Moderator
Level 36
Joined
Jul 22, 2015
Messages
3,488
Jump distance, min cast range, damage and knockback AoE would be the ones I guess

  1. Jump distance is a percentage value that calculates the current distance to be the travel distance of the next jump. That means that this is all relative to what the initial distance is, or the cast range, which is an option in the object editor
  2. Hmm I thought about this, but I don't see the purpose of making the "minimum" cast range per level. Does the value go down as the levels go up? Does that mean increasing the level just lets you cast it closer to you? It would have made sense to make it multi-level if it were maximum cast range
  3. Damage is multi-level? o.o
  4. Knockback AoE isn't actually the same AoE you might think. It's the minimum height difference between an air unit's fly height and the ball's fly height for it to be knockbacked.

I considered all of these before uploading, but the reasons I stated above stopped me :p if you see anything else that should be multi-level, please let me know!
 
Level 13
Joined
Jul 1, 2008
Messages
1,314
I really like, how you make that stuff in GUI! This spell uses very intelligent stuff, to me doing this in GUI always looks much more difficult than coding such thing directly in JASS.

Really cool bouncing formula! :)
 

KILLCIDE

Spell Moderator
Level 36
Joined
Jul 22, 2015
Messages
3,488
I really like, how you make that stuff in GUI! This spell uses very intelligent stuff, to me doing this in GUI always looks much more difficult than coding such thing directly in JASS.

Really cool bouncing formula! :)

Thanks, but I don't take credit for the formula. The formula was derived by D4RK_G4NDALF in his About Movement tutorial. I was also aided by BPower in ensuring proper movement over terrain.
 
Level 13
Joined
Jul 1, 2008
Messages
1,314
Thanks, but I don't take credit for the formula. The formula was derived by D4RK_G4NDALF in his About Movement tutorial. I was also aided by BPower in ensuring proper movement over terrain.

Oh so this is probably one of the sources, where these parabola formulas originate :D
Anyway putting things together is as necessary as providing the basics, so I still think you did a great job there :)
 
Top