• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Celestial Beam v1.0.5b

  • Like
Reactions: PurgeandFire
Hello Hello :) Back @Hive after being away doing other stuff for a year. I'd love to get some spells going again, and hopefully fix my old ones. (working on that atm)

Anyways, I've made a simple beam spell as a warm up and I thought I'd share it.

Features

* MUI
* GUI
* Leakless
* Scaling Damage
* Simple Configuration
* Visual Yummies
Downsides

* Not Jass
* Not vJass
* Not anything but GUI please oh lord not GUI
Tooltip

Celestial Beam [Q] - Level [1]

The hero summons a beam of light that illuminates the area beneath it and deals (30(Intelligence x 0.50) + (20 x Level)) divine damage per second to hostile ground units hit. It also reveals invisible foes in a small area around the beam.
Effects

Deals a scaling damage component each tick, tick duration is configurable and reveals invisible units in a nearby area. The beam also reveals the area granting vision around the beam. Time, Distance and Radius of the beam is all configurable. Increasing time will increase the time the beam takes to travel the distance but will leave the total distance unchanged.


  • Celestial Beam spell Start
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Celestial_Beam_Table = (Last created hashtable)
      • -------- -------------------------------- --------
      • Set CB_Spell_ID = Celestial Beam
      • Set CB_Spell_ID_2 = True Sight (Celestial Beam)
      • -------- -------------------------------- --------
      • Set CB_Dummy_Type = Dummy (with 400 vision)
      • -------- -------------------------------- --------
      • Set CB_Damage_Type = Spells
      • -------- Damage Type --------
      • Set CB_Damage_School = Divine
      • -------- Damage School. --------
      • Set CB_BaseDamage = 30.00
      • Set CB_BonusDamage = 20.00
      • Set CB_Scaling_Damage_Factor = 0.50
      • -------- Damage: CB_BaseDamage + (Intellect StatXCB_Scaling_Damage_Factor) + (CB_BonusDamage x (level of ability)) --------
      • -------- The spells deals (0.03 x Interval_Integer) x Total Damage damage every 0.15 seconds to units in the CB_Radius range. --------
      • -------- This spell deals no damage to structures and I have no intention of letting it since it's super strong against non-moving targets. --------
      • -------- ---------------------------------------------------- --------
      • -------- ---------------------------------------------------- --------
      • Set CB_Radius = 150
      • -------- ---------------------------------------------------- --------
      • Set CB_Temp_Integer1 = 0
      • Set CB_Interval = 50.00
      • Set CB_Interval_Integer = 3
      • -------- 0.03 x Interval_Integer = Interval between moving and dealing damage. --------
      • -------- Lower time = faster projectile etc. --------
      • -------- This is the range of the beam --------
      • Set CB_Range_Base = 500.00
      • Set CB_Range_Bonus = 100.00
      • Set CB_Range_Max = 800.00
      • -------- Max range allows you to create an exponential scaling that doesn't loop out of control. --------
      • -------- ---------------------------------------------------- --------
      • -------- This is the amount of time it takes for the beam to travel the distance --------
      • Set CB_Travel_Time = 1.60
      • -------- ---------------------------------------------------- --------
      • Set CB_Bonus_Bool = True
      • -------- if True then damage includes intelligence gained from items and buffs, if False it does not. --------
      • Set CB_Reveal_Bool = True
      • -------- if True then beam reveals invisible units in CB_Radius around the beam. --------
      • Set CB_Effect_Hit = Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
      • Set CB_Effect_Trail = Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl



  • Celestial Beam spell Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to CB_Spell_ID
    • Actions
      • Set tempCaster = (Triggering unit)
      • Set tempPoint_Whirlpool = (Position of tempCaster)
      • Set tempPoint_Target = (Target point of ability being cast)
      • Set tempLevel = (Real((Level of CB_Spell_ID for tempCaster)))
      • Set tempRange_total = (CB_Range_Base + (CB_Range_Bonus x tempLevel))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • tempRange_total Greater than CB_Range_Max
        • Then - Actions
          • Set tempRange_total = CB_Range_Max
        • Else - Actions
      • Set CB_Distance_Traveled = 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CB_Bonus_Bool Equal to True
        • Then - Actions
          • Set tempDamage_Total = (CB_BaseDamage + (((Real((Intelligence of tempCaster (Include bonuses)))) x CB_Scaling_Damage_Factor) + ((Real((Integer(tempLevel)))) x CB_BonusDamage)))
          • -------- Change MAIN STAT here! Agility/Strength/Intelligence! --------
        • Else - Actions
          • Set tempDamage_Total = (CB_BaseDamage + (((Real((Intelligence of tempCaster (Exclude bonuses)))) x CB_Scaling_Damage_Factor) + ((Real((Integer(tempLevel)))) x CB_BonusDamage)))
          • -------- Change MAIN STAT here! Agility/Strength/Intelligence! --------
      • Set tempAngle_Real = (Angle from tempPoint_Whirlpool to tempPoint_Target)
      • Set CB_Temp_Integer1 = 0
      • Set CB_Temp_Interval = 0.00
      • Unit - Create 1 CB_Dummy_Type for (Triggering player) at tempPoint_Whirlpool facing tempAngle_Real degrees
      • Set tempDummy_Whirlpool = (Last created unit)
      • Unit - Make tempDummy_Whirlpool Explode on death
      • Unit - Add a CB_Travel_Time second Generic expiration timer to tempDummy_Whirlpool
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CB_Reveal_Bool Equal to True
        • Then - Actions
          • Unit - Add CB_Spell_ID_2 to tempDummy_Whirlpool
        • Else - Actions
      • Set tempKey = (Key (Last created unit))
      • Hashtable - Save Handle OftempPoint_Whirlpool as 0 of tempKey in Celestial_Beam_Table
      • Hashtable - Save Handle OftempCaster as 1 of tempKey in Celestial_Beam_Table
      • Hashtable - Save tempDamage_Total as 2 of tempKey in Celestial_Beam_Table
      • Hashtable - Save tempRange_total as 3 of tempKey in Celestial_Beam_Table
      • Hashtable - Save tempAngle_Real as 4 of tempKey in Celestial_Beam_Table
      • Hashtable - Save CB_Distance_Traveled as 5 of tempKey in Celestial_Beam_Table
      • Hashtable - Save CB_Temp_Interval as 9 of tempKey in Celestial_Beam_Table
      • Hashtable - Save CB_Temp_Integer1 as 10 of tempKey in Celestial_Beam_Table
      • Custom script: call RemoveLocation(udg_tempPoint_Target)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CB_Group_Count Equal to 0
        • Then - Actions
          • Trigger - Turn on Celestial Beam spell Loop <gen>
        • Else - Actions
      • Unit Group - Add tempDummy_Whirlpool to CB_Dummy_Group
      • Set CB_Group_Count = (CB_Group_Count + 1)



  • Celestial Beam spell Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CB_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set tempPickedUnit = (Picked unit)
          • Set tempKey = (Key (Picked unit))
          • Set tempPoint_Whirlpool = (Load 0 of tempKey in Celestial_Beam_Table)
          • Set tempCaster = (Load 1 of tempKey in Celestial_Beam_Table)
          • Set tempDamage_Total = (Load 2 of tempKey from Celestial_Beam_Table)
          • Set tempRange_total = (Load 3 of tempKey from Celestial_Beam_Table)
          • Set tempAngle_Real = (Load 4 of tempKey from Celestial_Beam_Table)
          • Set CB_Distance_Traveled = (Load 5 of tempKey from Celestial_Beam_Table)
          • Set CB_Temp_Interval = (Load 9 of tempKey from Celestial_Beam_Table)
          • Set CB_Temp_Integer1 = ((Load 10 of tempKey from Celestial_Beam_Table) + 1)
          • Hashtable - Save CB_Temp_Integer1 as 10 of tempKey in Celestial_Beam_Table
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (tempPickedUnit is dead) Equal to True
              • CB_Distance_Traveled Greater than or equal to tempRange_total
            • Then - Actions
              • Unit Group - Remove tempPickedUnit from CB_Dummy_Group
              • Unit - Add a 0.01 second Generic expiration timer to tempPickedUnit
              • Set CB_Group_Count = (CB_Group_Count - 1)
              • Custom script: call RemoveLocation(udg_tempPoint_Whirlpool)
              • Hashtable - Clear all child hashtables of child tempKey in Celestial_Beam_Table
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CB_Group_Count Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CB_Temp_Integer1 Greater than or equal to CB_Interval_Integer
                • Then - Actions
                  • Set tempDummy_Whirlpool = (Picked unit)
                  • Set CB_Temp_OwnerP = (Owner of tempDummy_Whirlpool)
                  • Set CB_Temp_Interval = (CB_Temp_Interval + (tempRange_total / (CB_Travel_Time / (0.03 x (Real(CB_Interval_Integer))))))
                  • Set tempPoint_Target = (tempPoint_Whirlpool offset by CB_Temp_Interval towards tempAngle_Real degrees)
                  • Unit - Move tempDummy_Whirlpool instantly to tempPoint_Target
                  • Unit - Make tempDummy_Whirlpool face tempAngle_Real over 0.00 seconds
                  • Set CB_Distance_Traveled = (CB_Distance_Traveled + CB_Temp_Interval)
                  • Hashtable - Save CB_Distance_Traveled as 5 of tempKey in Celestial_Beam_Table
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within (Real(CB_Radius)) of tempPoint_Target matching (((Matching unit) is alive) Equal to True)) and do (Actions)
                    • Loop - Actions
                      • Set tempPickedUnit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (tempPickedUnit is dead) Equal to False
                          • (tempPickedUnit is A structure) Equal to False
                          • (tempPickedUnit is A flying unit) Equal to False
                          • (tempPickedUnit is Magic Immune) Equal to False
                          • (tempPickedUnit is hidden) Equal to False
                          • (tempPickedUnit belongs to an enemy of CB_Temp_OwnerP) Equal to True
                        • Then - Actions
                          • Unit - Cause tempCaster to damage tempPickedUnit, dealing (tempDamage_Total x (0.03 x (Real(CB_Interval_Integer)))) damage of attack type CB_Damage_Type and damage type CB_Damage_School
                          • Set tempPoint_Temp = (Position of tempPickedUnit)
                          • Special Effect - Create a special effect at tempPoint_Temp using CB_Effect_Hit
                          • Special Effect - Destroy (Last created special effect)
                          • Custom script: call RemoveLocation(udg_tempPoint_Temp)
                        • Else - Actions
                  • Set CB_Temp_Integer1 = 0
                  • Hashtable - Save CB_Temp_Interval as 9 of tempKey in Celestial_Beam_Table
                  • Hashtable - Save CB_Temp_Integer1 as 10 of tempKey in Celestial_Beam_Table
                  • Special Effect - Create a special effect at tempPoint_Target using CB_Effect_Trail
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_tempPoint_Target)
                • Else - Actions





Changes

* v1.0.1 - Simplyfied code in CB spell Start slightly
* v1.0.1 - Fixed issue with code occuring when importing
* v1.0.2 - Simplyfied code in CB spell Loop slightly
* v1.0.3 - Simplyfied code, changed spell's order string to Impale
* v1.0.3 - Added a random cast for testing purposes. [R]
* v1.0.3 - Added a boolean for including and excluding bonus intelligence in damage calculation
* v1.0.3 - Simplyfied hashtable code
* v1.0.3 - Fixed Leak
* v1.0.3 - Simplyfied group checker
* v1.0.3 - Added more customization in terms of how much Intelligence will scale (Int x SCALING)
* v1.0.3 - Other Stuff
* v1.0.5b - Added Time, scaling distance and reworked the damage system. (overhaul)
* v1.0.5b - Renamed temporary variables for clarity



thanks to Hiveworkshop for being awesome as always and the mods always being friendly and helpful :)!

& SMITE for inspiration to continue spell making.





Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Holy Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial Celestial God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God God Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Light Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess Goddess manasurge manasurge manasurge manasurge manasurge manasurge manasurge manasurge manasurge manasurge manasurge manasurge manasurge manasurge Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Divine Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Dawn Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Paladin Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Priest Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam Beam




Keywords:
Celestial Beam, Celestial, Beam, Holy, Divine, Light, Paladin, Priest, God, Goddess, Dawn, manasurge
Contents

Celestial Beam (Map)

Reviews
19:06, 25th Sep 2013 PurgeandFire: Approved! (Old) Review: http://www.hiveworkshop.com/forums/2422044-post17.html

Moderator

M

Moderator

19:06, 25th Sep 2013
PurgeandFire: Approved!

(Old) Review:
http://www.hiveworkshop.com/forums/2422044-post17.html
 
Level 3
Joined
Aug 18, 2013
Messages
49
don't you need to store this to variable as well?
  • ((picked unit) belongs to (owner of CB_Temp_Dummy)) equal to true
 
Level 7
Joined
Apr 12, 2011
Messages
124
don't you need to store this to variable as well?
  • ((picked unit) belongs to (owner of CB_Temp_Dummy)) equal to true
I only that line once, iirc it's more ineffective to store it into a variable if you're gonna use it less than 3 times.
I'm going to store the (picked unit) for the next update version but atm I'm going over the code again to see if I can make it more efficient before updating.
 
Level 7
Joined
Apr 12, 2011
Messages
124
Actually Azusa is right owner of matching unit will most likely be used twice or more. I go with the twice or more store it into a variable. If you have 5 units being added to the unit group it will run 5 times. It is better to store those. That being said picked unit / key of picked unit / key of cb unit should be stored.
Ouch so true x( massive failure on my side. Didn't think about it like that :grin: only went through the code and saw it was only used once, didn't think about the fact that it's used once per picked unit. Already adjusted in v1.0.2 :pcon:

also, I am storing the key :grin: the variable is CB_Key_PickedUnit ^^, sneaky name is sneaky
 
Level 7
Joined
Apr 12, 2011
Messages
124
In your cast trigger it looks like you are using key of cb key unit not storing it into an integer variable and using the integer variable. The key of a unit is an integer.
You custom script would actually look like this.
  • Custom script: set udg_key = GetHandleId( udg_unitVariable)
Not really sure what I'm doing with that custom script, I probably should stick with the regular GUI method although that'll use (picked unit) instead of a variable.

anyways, I tried your way and your line returns an error for me. :vw_wtf: But the line I'm using, picked it up earlier @ hive somewhere, is working afaik.
 
Level 7
Joined
Apr 12, 2011
Messages
124
There's nothing bad about Map Initialization.

You would use the Elapsed Game Time event 0.00 second event if your trigger heavily relies on the initialization of another system that inits with a Map Initialization event.
You're not doing that here, so yeah.
Ah ok :goblin_yeah: Changed it in the next version. I'll upload right away if there's nothing else. Lack of comments from mods either really good or really really really bad :grin:
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
1.0.3 Review

Review

Suggestions

Rating

Judgement

My Words

  • Set CB_Point_Current = (Position of CB_Temp_TriggU)
You leak a Point here ^
  • Set CB_Point_Current = (Load 0 of (Key CB_Key_PickedUnit) in Celestial_Beam_Table)
Another Leak here ^
You Should Add Custom Spells to dummies with triggers, since their Raw Code will Change when importing
This spell is in the "easy" category so it's a normal job, just fix what i just mentioned
None
225233-albums6523-picture74069.jpg
225233-albums6523-picture74105.jpg
If You want me to review an Update of This Spell, Please Notifiy me this by VM or PM
 
Review:
  • In CB_Spell_Cast, you leak right here:
    • Set CB_Temp_Degrees = (Angle from CB_Point_Current to (Target point of ability being cast))
    You must set (Target point of ability being cast) to a variable first.
  • In CB_Spell_Loop, you shouldn't really use:
    • (Number of units in CB_Dummy_Group) Equal to 0
    It is a somewhat expensive function that will iterate through the entire group to determine if the group is empty. You should instead use a counter. Each time you add a unit to the group, increment:
    • Set CB_Group_Counter = CB_Group_Counter + 1
    Each time you remove a unit from the group, decrement:
    • Set CB_Group_Counter = CB_Group_Counter - 1
    Then instead of the (Number of units in group...) condition, you can just check if CB_Group_Counter is 0.
  • You should store Key CB_Key_PickedUnit into an integer variable since you use it around 5 or so times. Otherwise it calls GetHandleId() each time.

Fix those things and I believe it should be ready for approval.
 
Level 7
Joined
Apr 12, 2011
Messages
124

[COLOR="White"

[COLOR="White"

[COLOR="White"

[COLOR="White"

[COLOR="White"

Review[/COLOR]]
  • Set CB_Point_Current = (Position of CB_Temp_TriggU)
You leak a Point here ^
  • Set CB_Point_Current = (Load 0 of (Key CB_Key_PickedUnit) in Celestial_Beam_Table)
Another Leak here ^
You Should Add Custom Spells to dummies with triggers, since their Raw Code will Change when importing
This spell is in the "easy" category so it's a normal job, just fix what i just mentioned
Suggestions[/COLOR]]None
Rating[/COLOR]]
225233-albums6523-picture74069.jpg
Judgement[/COLOR]]
225233-albums6523-picture74105.jpg
My Words[/COLOR]]If You want me to review an Update of This Spell, Please Notifiy me this by VM or PM
It's not leaking, I'm removing that location when I close the loop. It's always just 1 location and I'm not overwriting it before I destroy it.
 
Top