Moderator
M
Moderator
04:14, 18th Jun 2011
Maker:
Approved.
Maker:
Approved.
Dimension Blaster

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Dimension Blaster

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




DBHas[DBLastRecycled] Equal to True



Then - Actions




Set DBMax = (DBMax + 1)




Set DBIndex = DBMax



Else - Actions




Set DBIndex = DBLastRecycled




Set DBLastRecycled = DBRecycledList[DBLastRecycled]


Custom script: set udg_DBDummyGroup[udg_DBMax] = CreateGroup()


Set DBCaster[DBIndex] = (Triggering unit)


Set DBCasterPoint[DBIndex] = (Position of DBCaster[DBIndex])


Set DBTargetPoint[DBIndex] = (Target point of ability being cast)


Set DBMaxDistance[DBIndex] = (Distance between DBCasterPoint[DBIndex] and DBTargetPoint[DBIndex])


Set DBDistance[DBIndex] = 0.00


Set DBLevel[DBIndex] = (Level of Dimension Blaster for DBCaster[DBIndex])


Set DBTime[DBIndex] = (0.50 + (0.25 x (Real(DBLevel[DBIndex]))))


Set DBMove[DBIndex] = (DBMaxDistance[DBIndex] / (DBTime[DBIndex] / 0.03))


Set DBAoE[DBIndex] = (250.00 + (50.00 x (Real(DBLevel[DBIndex]))))


Set DBDamage[DBIndex] = (50.00 + (25.00 x (Real(DBLevel[DBIndex]))))


Set DBAngle[DBIndex] = (Angle from DBCasterPoint[DBIndex] to DBTargetPoint[DBIndex])


Set DBHas[DBIndex] = True


Set DBHeight[DBIndex] = 0.00


Set DBHeightInc[DBIndex] = 30.00


Set DBCount = (DBCount + 1)


Unit - Create 1 Orb for (Triggering player) at DBCasterPoint[DBIndex] facing Default building facing degrees


Set DBOrb[DBIndex] = (Last created unit)


For each (Integer A) from 1 to 5, do (Actions)



Loop - Actions




Set TempPoint = (DBTargetPoint[DBIndex] offset by DBAoE[DBIndex] towards (72.00 x (Real((Integer A)))) degrees)




Unit - Create 1 Target Painter for (Triggering player) at TempPoint facing Default building facing degrees




Unit Group - Add (Last created unit) to DBDummyGroup[DBIndex]




Custom script: call RemoveLocation (udg_TempPoint)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Dimension Blaster Loop <gen> is on) Equal to False



Then - Actions




Trigger - Turn on Dimension Blaster Loop <gen>



Else - Actions
Dimension Blaster Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer DBInteger) from 0 to DBMax, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






DBHas[DBInteger] Equal to True





Then - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








DBDistance[DBInteger] Less than DBMaxDistance[DBInteger]







Then - Actions








Set DBDistance[DBInteger] = (DBDistance[DBInteger] + DBMove[DBInteger])








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










DBDistance[DBInteger] Less than (DBMaxDistance[DBInteger] / 2.00)









Then - Actions










Set DBHeight[DBIndex] = (DBHeight[DBInteger] + DBHeightInc[DBInteger])










Set DBHeightInc[DBInteger] = (DBHeightInc[DBInteger] - 0.60)









Else - Actions










Set DBHeight[DBIndex] = (DBHeight[DBInteger] - DBHeightInc[DBInteger])










Set DBHeightInc[DBInteger] = (DBHeightInc[DBInteger] + 0.60)








Set TempPoint = (DBCasterPoint[DBInteger] offset by DBDistance[DBInteger] towards DBAngle[DBInteger] degrees)








Unit - Move DBOrb[DBInteger] instantly to TempPoint








Animation - Change DBOrb[DBInteger] flying height to DBHeight[DBInteger] at 0.00








Custom script: call RemoveLocation (udg_TempPoint)








Unit Group - Pick every unit in DBDummyGroup[DBInteger] and do (Actions)









Loop - Actions










Set TempPoint = (Position of (Picked unit))










Set TempPoint2 = (DBTargetPoint[DBInteger] offset by DBAoE[DBInteger] towards ((Angle from DBTargetPoint[DBInteger] to TempPoint) + 7.50) degrees)










Unit - Move (Picked unit) instantly to TempPoint2










Custom script: call RemoveLocation (udg_TempPoint)










Custom script: call RemoveLocation (udg_TempPoint2)







Else - Actions








Unit - Create 1 Explosion for (Owner of DBCaster[DBInteger]) at DBTargetPoint[DBInteger] facing Default building facing degrees








Unit - Add a 1.50 second Generic expiration timer to (Last created unit)








Custom script: set bj_wantDestroyGroup = true








Unit Group - Pick every unit in (Units within DBAoE[DBInteger] of DBTargetPoint[DBInteger] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is alive) Equal to True)))) and do (Actions)









Loop - Actions










Set TempPoint = (Position of (Picked unit))










Set DBTempReal[1] = (Distance between DBTargetPoint[DBInteger] and TempPoint)










Set DBTempReal[2] = (Angle from DBTargetPoint[DBInteger] to TempPoint)










Set TempPoint2 = (DBTargetPoint[DBInteger] offset by DBTempReal[1] towards (DBTempReal[2] + 180.00) degrees)










Unit - Create 1 Explosion Mini for (Owner of DBCaster[DBInteger]) at TempPoint facing Default building facing degrees










Unit - Set level of Dimension Blaster (Slow) for (Last created unit) to DBLevel[DBInteger]










Unit - Set level of Dimension Blaster (Speed) for (Last created unit) to DBLevel[DBInteger]










Unit - Add a 1.50 second Generic expiration timer to (Last created unit)










Unit - Move (Picked unit) instantly to TempPoint2










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












((Picked unit) belongs to an ally of (Owner of DBCaster[DBInteger])) Equal to True











Then - Actions












Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + DBDamage[DBInteger])











Else - Actions












Unit - Cause DBCaster[DBInteger] to damage (Picked unit), dealing DBDamage[DBInteger] damage of attack type Chaos and damage type Normal










Custom script: call RemoveLocation (udg_TempPoint)










Custom script: call RemoveLocation (udg_TempPoint2)








Unit - Kill DBOrb[DBInteger]








Unit Group - Pick every unit in DBDummyGroup[DBInteger] and do (Actions)









Loop - Actions










Unit - Remove (Picked unit) from the game








Custom script: call DestroyGroup (udg_DBDummyGroup[udg_DBInteger])








Set DBHas[DBInteger] = False








Set DBCount = (DBCount - 1)








Custom script: call RemoveLocation (udg_DBTargetPoint[udg_DBInteger])








Custom script: call RemoveLocation (udg_DBCasterPoint[udg_DBInteger])








Set DBRecycledList[DBInteger] = DBLastRecycled








Set DBLastRecycled = DBInteger








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










DBCount Equal to 0









Then - Actions










Set DBRecycledList[DBInteger] = 0










Set DBLastRecycled = 0










Set DBMax = 0










Trigger - Turn off (This trigger)









Else - Actions





Else - Actions