- Joined
- Oct 25, 2018
- Messages
- 68
Been looking for an easy-to-use shield spell for a while now, thanks!
The SFX are lovely!
The SFX are lovely!
BAmr Config

Events


Map initialization

Conditions

Actions


-------- This value represents how often the BAmr Peridic will run. --------


Set BAmr_Config_PERIODIC = 0.03


Trigger - Add to BAmr Periodic <gen> the event (Time - Every BAmr_Config_PERIODIC seconds of game time)


-------- --------


-------- This value indicates what spell is being used by the caster --------


Set BAmr_Config_SPELL_ID = Bone Armor BAmr


-------- --------


-------- This value indicates which buff will be detected when the enchanted unit is struck, and which buff the enchanted unit needs to keep the effect going. --------


Set BAmr_Config_BUFF = Bone Armor BAmr


-------- --------


-------- Spell stat values --------


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



If - Conditions



Then - Actions




-------- Stacking --------




-------- Set to true to allow for "Stacking" of shield values when cast on the same unit consecutively --------




Set BAmr_Boolean[0] = True




-------- --------




-------- This indicates the base value for the shield --------




Set BAmr_Config_BASE_HP = 100.00




-------- This indicates the base value for the shield --------




-------- --------




-------- This value will determine the increase in shield health if the hero invests skill points into the Ability --------




Set BAmr_Config_LVL_HP_BONUS[1] = 200.00




Set BAmr_Config_LVL_HP_BONUS[2] = 400.00




Set BAmr_Config_LVL_HP_BONUS[3] = 600.00




-------- This value will determine the increase in shield health if the hero invests skill points into the Ability --------




-------- --------




-------- This value decides what percentage of the caster's Strength will be used to boost Bone Armor's Health (Default: 0.00) --------




Set BAmr_Config_ATT_BONUS[1] = 0.00




-------- This value decides what percentage of the caster's Agility will be used to boost Bone Armor's Health (Default: 0.00) --------




Set BAmr_Config_ATT_BONUS[2] = 0.00




-------- This value decides what percentage of the caster's Intelligence will be used to boost Bone Armor's Health (Default: 0.00) --------




Set BAmr_Config_ATT_BONUS[3] = 0.00




-------- --------




-------- This value denotes of what percentage of the damage will be taken by the shield. Default:1.00 (100%) --------




-------- Example: 0.5 means only 50% of incoming damage will be taken by the shield and will be dealt to the unit --------




Set BAmr_Config_ABSORBTION = 1.00




-------- --------




-------- These two values determine what percentage of physical or Spell damage it will resist. Default: 1.00 (100%) --------




-------- Not to be confused with the previous value --------




-------- Example: Spell Resist at 2.00 means that spell damage will deal 200% more damage --------




-------- Setting either of these values to 0.00 will ignore that type of damage --------




Set BAmr_Config_RESIST_SPELL = 1.00




Set BAmr_Config_RESIST_PHYSICAL = 1.00




-------- --------



Else - Actions


-------- Spell stat values --------


-------- --------


-------- This value determines the "Flavour" of the Shield, the number corresponds with the options below, match it to get the intended effect --------


Set BAmr_Config_FLAVOR = 23


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



If - Conditions



Then - Actions




-------- Flavors --------




-------- --------




-------- 23 --------




-------- Lime / Necro --------




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





If - Conditions






BAmr_Config_FLAVOR Equal to 23





Then - Actions






Set BAmr_Config_FLAVOR_PATH[0] = Abilities\Weapons\NecromancerMissile\NecromancerMissile.mdl






Set BAmr_Config_FLAVOR_PATH[1] = Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl






Set BAmr_Config_FLAVOR_PATH[2] = Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl






Set BAmr_Config_FLAVOR_PATH[3] = BoneArmorCasterTC.mdx





Else - Actions




-------- 23 --------




-------- --------




-------- 1 --------




-------- Red / Fire --------




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





If - Conditions






BAmr_Config_FLAVOR Equal to 1





Then - Actions






Set BAmr_Config_FLAVOR_PATH[0] = Abilities\Weapons\FireBallMissile\FireBallMissile.mdl






Set BAmr_Config_FLAVOR_PATH[1] = Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl






Set BAmr_Config_FLAVOR_PATH[2] = Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl






Set BAmr_Config_FLAVOR_PATH[3] = BoneArmorCasterTC.mdx





Else - Actions




-------- 1 --------




-------- --------




-------- 2 --------




-------- Blue / Frost --------




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





If - Conditions






BAmr_Config_FLAVOR Equal to 2





Then - Actions






Set BAmr_Config_FLAVOR_PATH[0] = Abilities\Spells\Other\FrostBolt\FrostBoltMissile.mdl






Set BAmr_Config_FLAVOR_PATH[1] = Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl






Set BAmr_Config_FLAVOR_PATH[2] = Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl






Set BAmr_Config_FLAVOR_PATH[3] = BoneArmorCasterTC.mdx





Else - Actions




-------- 2 --------




-------- --------




-------- 3 --------




-------- Teal / Ocean --------




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





If - Conditions






BAmr_Config_FLAVOR Equal to 3





Then - Actions






Set BAmr_Config_FLAVOR_PATH[0] = Abilities\Weapons\SeaElementalMissile\SeaElementalMissile.mdl






Set BAmr_Config_FLAVOR_PATH[1] = Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl






Set BAmr_Config_FLAVOR_PATH[2] = Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl






Set BAmr_Config_FLAVOR_PATH[3] = BoneArmorCasterTC.mdx





Else - Actions




-------- 3 --------




-------- --------




-------- 4 --------




-------- Purple / Ooze? --------




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





If - Conditions






BAmr_Config_FLAVOR Equal to 4





Then - Actions






Set BAmr_Config_FLAVOR_PATH[0] = Abilities\Weapons\SludgeMissile\SludgeMissile.mdl






Set BAmr_Config_FLAVOR_PATH[1] = Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl






Set BAmr_Config_FLAVOR_PATH[2] = Abilities\Spells\Items\AIil\AIilTarget.mdl






Set BAmr_Config_FLAVOR_PATH[3] = BoneArmorCasterTC.mdx





Else - Actions




-------- 4 --------




-------- --------




-------- 5 --------




-------- Yellow / Holy --------




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





If - Conditions






BAmr_Config_FLAVOR Equal to 5





Then - Actions






Set BAmr_Config_FLAVOR_PATH[0] = Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl






Set BAmr_Config_FLAVOR_PATH[1] = Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl






Set BAmr_Config_FLAVOR_PATH[2] = Abilities\Spells\Other\HealingSpray\HealBottleMissile.mdl






Set BAmr_Config_FLAVOR_PATH[3] = BoneArmorCasterTC.mdx





Else - Actions




-------- 5 --------




-------- --------




-------- 6 --------




-------- Orange / Drunk --------




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





If - Conditions






BAmr_Config_FLAVOR Equal to 6





Then - Actions






Set BAmr_Config_FLAVOR_PATH[0] = Abilities\Spells\Other\StrongDrink\BrewmasterMissile.mdl






Set BAmr_Config_FLAVOR_PATH[1] = Abilities\Spells\Orc\SpiritLink\SpiritLinkZapTarget.mdl






Set BAmr_Config_FLAVOR_PATH[2] = Abilities\Spells\Human\Feedback\SpellBreakerAttack.mdl






Set BAmr_Config_FLAVOR_PATH[3] = BoneArmorCasterTC.mdx





Else - Actions




-------- 6 --------




-------- --------




-------- 7 --------




-------- Green / Nature --------




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





If - Conditions






BAmr_Config_FLAVOR Equal to 7





Then - Actions






Set BAmr_Config_FLAVOR_PATH[0] = Abilities\Weapons\KeeperGroveMissile\KeeperGroveMissile.mdl






Set BAmr_Config_FLAVOR_PATH[1] = Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl






Set BAmr_Config_FLAVOR_PATH[2] = Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl






Set BAmr_Config_FLAVOR_PATH[3] = BoneArmorCasterTC.mdx





Else - Actions




-------- 7 --------




-------- --------




-------- 8 --------




-------- Pink / Darkness --------




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





If - Conditions






BAmr_Config_FLAVOR Equal to 8





Then - Actions






Set BAmr_Config_FLAVOR_PATH[0] = Abilities\Weapons\VoidWalkerMissile\VoidWalkerMissile.mdl






Set BAmr_Config_FLAVOR_PATH[1] = Abilities\Spells\Undead\OrbOfDeath\AnnihilationMissile.mdl






Set BAmr_Config_FLAVOR_PATH[2] = Abilities\Spells\Undead\OrbOfDeath\AnnihilationMissile.mdl






Set BAmr_Config_FLAVOR_PATH[3] = BoneArmorCasterTC.mdx





Else - Actions




-------- 8 --------




-------- --------




-------- Flavors --------



Else - Actions


-------- This value determines the "Flavour" of the Shield, the number corresponds with the options below, match it to get the intended effect --------


-------- --------


-------- --------


-------- Special effects & related values --------


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



If - Conditions



Then - Actions




-------- --------




-------- This path denotes what form the orbiting segments will take. --------




Set BAmr_Config_SPEF_PATH[0] = BAmr_Config_FLAVOR_PATH[0]




-------- This path denotes what form the orbiting segments will take. --------




-------- --------




-------- This value indicates what effect will occur when the segments are first spawned --------




-------- see the "Flavor Section" to customize numerous effect loadouts --------




Set BAmr_Config_SPEF_PATH[1] = BAmr_Config_FLAVOR_PATH[1]




-------- This value indicates what effect will occur when the segments are first spawned --------




-------- --------




-------- This value indicates what effect will occur when the segments are destroyed --------




-------- see the "Flavor Section" to customize numerous effect loadouts --------




Set BAmr_Config_SPEF_PATH[2] = BAmr_Config_FLAVOR_PATH[2]




-------- This value indicates what effect will occur when the segments are destroyed --------




-------- --------




-------- This value indicates what effect will occur when the enchanted unit is struck --------




-------- see the "Flavor Section" to customize numerous effect loadouts --------




Set BAmr_Config_SPEF_PATH[3] = BAmr_Config_FLAVOR_PATH[3]




-------- This value indicates what effect will occur when the enchanted unit is struck --------




-------- --------




-------- Values contained within directly influence the "shield flare" effect governed by BAmr_EFFECTPATH[3] --------




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





If - Conditions





Then - Actions






-------- --------






-------- This Value determines whether or not you want the "Shield Flare Effect" to match the player's colour or to a specific colour --------






Set BAmr_Boolean[1] = False






-------- --------






-------- Offset will determine how far away the Special effect will be created from the enchanted target --------






-------- PLAYER COLOUR --------






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







If - Conditions








BAmr_Boolean[1] Equal to False







Then - Actions








Set BAmr_Config_SPEF_VALUE[0] = (Real(BAmr_Config_FLAVOR))







Else - Actions






-------- --------






-------- Offset will determine how far away the Special effect will be created from the enchanted target --------






-------- OFFSET --------






Set BAmr_Config_SPEF_VALUE[1] = 85.00






-------- Offset will determine how far away the Special effect will be created from the enchanted target --------






-------- --------






-------- Height will determine at what height the Special effect will be created, starting from the enchanted target's current height & Z Height. --------






-------- HEIGHT --------






Set BAmr_Config_SPEF_VALUE[2] = 65.00






-------- Height will determine at what height the Special effect will be created, starting from the enchanted target's current height --------






-------- --------






-------- Scale will determine the percentage of scale the Special effect will have --------






-------- SCALE --------






Set BAmr_Config_SPEF_VALUE[3] = 0.90






-------- Scale will determine the percentage of scale the Special effect will have --------






-------- --------






-------- Timescale will determine the speed of the special effect's animation --------






-------- TIMESCALE --------






Set BAmr_Config_SPEF_VALUE[4] = 7.50






-------- Timescale will determine the speed of the special effect's animation --------






-------- --------






-------- RGB value from 0 - 255 will determine what colors will be present in the special effect (note this requires a lot of experimentation) --------






-------- from 1 - 3 is RED, GREEN, BLUE --------






Set BAmr_Config_SPEF_VALUE[5] = 255.00






Set BAmr_Config_SPEF_VALUE[6] = 255.00






Set BAmr_Config_SPEF_VALUE[7] = 255.00






-------- from 1 - 3 is RED, GREEN, BLUE --------






-------- RGB value from 0 - 255 will determine what colors will be present in the special effect (note this requires a lot of experimentation) --------






-------- --------






-------- YPR will determine in order of apperance, Yaw, Pitch, & Roll. --------






-------- Thanks to Hermit, the model provided already has an orienation to 90 degrees we need not add it, but I will leave these all the same for interesting effects! --------






-------- The Values are calculated as (( X * 3.14 ) / 180 ), 1.57 = 90 degrees, 3.14 = 180 degrees, etc --------






-------- To flip normally horizontal models like the default spirit touch, all values below must be set to 1.57 or ((90 x 3.14 /) 180) --------






-------- from 8 - 10 is YAW, PITCH, ROLL --------






-------- --------






Set BAmr_Config_SPEF_VALUE[8] = 0.00






-------- YAW --------






-------- --------






Set BAmr_Config_SPEF_VALUE[9] = 0.00






-------- PITCH --------






-------- --------






Set BAmr_Config_SPEF_VALUE[10] = 0.00






-------- ROLL --------






-------- --------






-------- YPR will determine in order of apperance, Yaw, Pitch, & Roll. --------






-------- --------






-------- This Value checks whether or not the Shield flare intensity will match the shield's current health --------






Set BAmr_Boolean[2] = False






-------- If Above Boolean is true, this handles the minimum the shield will fade to. --------






-------- --------






Set BAmr_Config_SPEF_VALUE[12] = 25.00






-------- --------





Else - Actions




-------- Values contained within directly influence the "shield flare" effect governed by BAmr_EFFECTPATH[3] --------




-------- --------



Else - Actions


-------- Special effects & related values --------


-------- --------


-------- Segement Configuration --------


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



If - Conditions



Then - Actions




-------- --------




-------- This value indicates how "segments" will orbit around the enchanted Target. --------




Set BAmr_Config_SEGMENT_SPAWNED = 3




-------- --------




-------- This value indicates how far away the "segments" orbit away from the enchanted Target. --------




-------- SEGMENT ORBIT OFFSET --------




Set BAmr_Config_SEG_VALUE[1] = 60.00




-------- This value indicates how far away the segments spawn from the their target --------




-------- SEGMENT SPAWN OFFSET --------




Set BAmr_Config_SEG_VALUE[2] = 120.00




-------- --------




-------- This value indicates at what height the segment will be at in addition the the unit's flying height --------




-------- SEGMENT HEIGHT --------




Set BAmr_Config_SEG_VALUE[3] = 65.00




-------- --------




-------- This value indicates how far apart the segements will spawn from, this is default to a 360 --------




-------- SEGMENT RADIUS TOTAL (I.e. don't change unless you are sure) --------




Set BAmr_Config_SEG_VALUE[4] = 360.00




-------- --------




-------- This value indicates how fast the "segments" orbit around the enchanted Target. --------




-------- SEGMENT ORBIT SPEED --------




Set BAmr_Config_SEG_VALUE[5] = 3.00




-------- --------




-------- This value indicates how fast the "segments" intially move towards the enchanted Target. --------




-------- SEGMENT MISSILE SPEED --------




Set BAmr_Config_SEG_VALUE[6] = 18.00




-------- --------




-------- This value indicates how far the target can travel before the segments will teleport with them --------




-------- SEGMENT TELEPORT --------




Set BAmr_Config_SEG_VALUE[20] = 900.00




-------- --------




-------- This value Indicates the size of the individual segments --------




-------- SEGMENT SIZE --------




Set BAmr_Config_SEG_VALUE[7] = 1.00




-------- --------




-------- Sets the segments lowest size from damage, the boolean below needs to be set to true for this to take any affect --------




-------- the value below is how small the segment will shrink to as to avoid making it dissapear all together before the segment threshold damage is reached. --------




-------- SEGMENT "SHRINK" EFFECT MINIMUM --------




Set BAmr_Config_SEG_VALUE[8] = 0.05




-------- --------




Set BAmr_Boolean[3] = False




-------- The value above directly is dependent on the boolean above being set to true --------




-------- --------




-------- the value below is how small the segment will shrink to as to avoid making it dissapear all together before the segment threshold damage is reached. --------




Set BAmr_Config_SEG_VALUE[9] = 5.00




-------- SEGMENT "DIM" EFFECT MINIMUM --------




-------- --------




Set BAmr_Boolean[4] = True




-------- If Above Boolean is true, then segments will dim based on how much damage they have taken --------




-------- --------




-------- This value corresponds to the segment's "Alpha" i,e. sorta like transparency, do experiment as ribbons and particles will not be affected on the missile... --------




-------- SEGMENT ALPHA (TEXTURE TRANSPARENCY) --------




Set BAmr_Config_SEG_VALUE[10] = 255.00




-------- --------




-------- RGB value from 0 - 255 will determine what colors will be present in the special effect (note this requires a lot of experimentation) --------




-------- from 11 -13 is RED, GREEN, BLUE --------




Set BAmr_Config_SEG_VALUE[11] = 255.00




Set BAmr_Config_SEG_VALUE[12] = 255.00




Set BAmr_Config_SEG_VALUE[13] = 255.00




-------- from 1 - 3 is RED, GREEN, BLUE --------




-------- RGB value from 0 - 255 will determine what colors will be present in the special effect (note this requires a lot of experimentation) --------




-------- --------




-------- YPR will determine in order of apperance, Yaw, Pitch, & Roll WHEN ORBITING --------




-------- The Values are calculated as (( X * 3.14 ) / 180 ), 1.57 = 90 degrees, 3.14 = 180 degrees, etc --------




-------- from 14, 15, & 16 is YAW, PITCH, ROLL --------




-------- --------




Set BAmr_Config_SEG_VALUE[14] = 1.57




-------- YAW --------




-------- --------




Set BAmr_Config_SEG_VALUE[15] = 0.00




-------- PITCH --------




-------- --------




Set BAmr_Config_SEG_VALUE[16] = 0.00




-------- ROLL --------




-------- --------




-------- YPR will determine in order of apperance, Yaw, Pitch, & Roll. --------




-------- --------




-------- YPR will determine in order of apperance, Yaw, Pitch, & Roll ON INITIAL CAST AND CLOSING DISTANCE --------




-------- The Values are calculated as (( X * 3.14 ) / 180 ), 1.57 = 90 degrees, 3.14 = 180 degrees, etc --------




-------- from 17, 18, & 19 is YAW, PITCH, ROLL --------




-------- --------




Set BAmr_Config_SEG_VALUE[17] = 0.00




-------- YAW --------




-------- --------




Set BAmr_Config_SEG_VALUE[18] = 0.00




-------- PITCH --------




-------- --------




Set BAmr_Config_SEG_VALUE[19] = 0.00




-------- ROLL --------




-------- --------



Else - Actions


-------- Segement orbit values --------


-------- --------


-------- Preload --------


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



If - Conditions



Then - Actions




Set BAmr_Point[1] = (Center of (Playable map area))




Unit - Create 1 Albatross for Neutral Passive at BAmr_Point[1] facing Default building facing degrees




Set BAmr_Unit[0] = (Last created unit)




Unit - Add BAmr_Config_SPELL_ID to BAmr_Unit[0]




Unit - Add a 0.03 second Generic expiration timer to BAmr_Unit[0]




Custom script: call RemoveLocation(udg_BAmr_Point[1])



Else - Actions


-------- Preload --------
BAmr Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to BAmr_Config_SPELL_ID

Actions


-------- ===================================================================================================================================== --------


-------- --------


-------- Get our bearings --------


Set BAmr_Unit[1] = (Triggering unit)


Set BAmr_Unit[2] = (Target unit of ability being cast)


Set BAmr_Point[1] = (Position of BAmr_Unit[1])


Set BAmr_Point[2] = (Position of BAmr_Unit[2])


-------- Get our bearings --------


-------- --------


-------- Prepare value of shield --------


Set BAmr_Attribute[1] = ((Real((Strength of BAmr_Unit[1] (Include bonuses)))) x BAmr_Config_ATT_BONUS[1])


Set BAmr_Attribute[2] = ((Real((Agility of BAmr_Unit[1] (Include bonuses)))) x BAmr_Config_ATT_BONUS[2])


Set BAmr_Attribute[3] = ((Real((Intelligence of BAmr_Unit[1] (Include bonuses)))) x BAmr_Config_ATT_BONUS[3])


Set BAmr_Real[0] = ((BAmr_Config_BASE_HP + BAmr_Config_LVL_HP_BONUS[(Level of BAmr_Config_SPELL_ID for BAmr_Unit[1])]) + (BAmr_Attribute[1] + (BAmr_Attribute[2] + BAmr_Attribute[3])))


-------- Prepare value of shield --------


-------- --------


-------- Check if unit is already enchanted --------


For each (Integer BAmr_Loop) from 1 to BAmr_Index, do (Actions)



Loop - Actions




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





If - Conditions






BAmr_Enchanted_Unit[BAmr_Loop] Equal to BAmr_Unit[2]





Then - Actions






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







If - Conditions








BAmr_Boolean[0] Equal to False







Then - Actions








Set BAmr_Health[BAmr_Loop] = BAmr_Real[0]







Else - Actions








Set BAmr_Health[BAmr_Loop] = (BAmr_Health[BAmr_Loop] + BAmr_Real[0])






Set BAmr_Max[BAmr_Loop] = BAmr_Health[BAmr_Loop]






Set BAmr_Total[BAmr_Loop] = 0.00






For each (Integer BAmr_Loop_Segment) from 1 to BAmr_Config_SEGMENT_SPAWNED, do (Actions)







Loop - Actions








Set BAmr_Seg_CValue = ((BAmr_Config_SEGMENT_SPAWNED x BAmr_Loop) + (BAmr_Loop_Segment - 1))








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









If - Conditions










BAmr_Segment_Missile_State[BAmr_Seg_CValue] Not equal to Alive









Then - Actions










Set BAmr_Point[3] = (BAmr_Point[1] offset by BAmr_Config_SEG_VALUE[2] towards ((BAmr_Config_SEG_VALUE[4] / (Real(BAmr_Config_SEGMENT_SPAWNED))) x (Real(BAmr_Loop_Segment))) degrees)










Special Effect - Create a special effect at BAmr_Point[3] using BAmr_Config_SPEF_PATH[0]










Set BAmr_Segment_Missile[BAmr_Seg_CValue] = (Last created special effect)










Custom script: set udg_BAmr_Spef_Current_Height[udg_BAmr_Seg_CValue] = GetLocationZ(udg_BAmr_Point[3])










Special Effect - Set Position - Z of BAmr_Segment_Missile[BAmr_Seg_CValue] to ((BAmr_Spef_Current_Height[BAmr_Seg_CValue] + BAmr_Config_SEG_VALUE[3]) + (Current flying height of BAmr_Enchanted_Unit[BAmr_Loop]))










Special Effect - Set Scale of BAmr_Segment_Missile[BAmr_Seg_CValue] to BAmr_Config_SEG_VALUE[7]










Special Effect - Set Color of BAmr_Segment_Missile[BAmr_Seg_CValue] to r: (Integer(BAmr_Config_SEG_VALUE[11])), g: (Integer(BAmr_Config_SEG_VALUE[12])), b: (Integer(BAmr_Config_SEG_VALUE[13]))










Set BAmr_Segment_Missile_State[BAmr_Seg_CValue] = Alive









Else - Actions










Set BAmr_Point[3] = (Point((Position - X of BAmr_Segment_Missile[BAmr_Seg_CValue]), (Position - Y of BAmr_Segment_Missile[BAmr_Seg_CValue])))








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









If - Conditions










BAmr_Boolean[3] Equal to True









Then - Actions










Special Effect - Set Scale of BAmr_Segment_Missile[BAmr_Seg_CValue] to BAmr_Config_SEG_VALUE[7]









Else - Actions








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









If - Conditions










BAmr_Boolean[4] Equal to True









Then - Actions










Special Effect - Set Alpha of BAmr_Segment_Missile[BAmr_Seg_CValue] to (Integer(BAmr_Config_SEG_VALUE[10]))









Else - Actions








Special Effect - Create a special effect at BAmr_Point[3] using BAmr_Config_SPEF_PATH[1]








Special Effect - Destroy (Last created special effect)








Custom script: call RemoveLocation(udg_BAmr_Point[3])






Custom script: call RemoveLocation(udg_BAmr_Point[1])






Custom script: call RemoveLocation(udg_BAmr_Point[2])






Skip remaining actions





Else - Actions


-------- Check if unit is already enchanted --------


-------- --------


-------- Insert the values & unit directly into the index --------


-------- Insert the values & unit directly into the index --------


-------- Insert the values & unit directly into the index --------


-------- Insert the values & unit directly into the index --------


Set BAmr_Index = (BAmr_Index + 1)


Set BAmr_Health[BAmr_Index] = BAmr_Real[0]


Set BAmr_Max[BAmr_Index] = BAmr_Health[BAmr_Index]


Set BAmr_Total[BAmr_Index] = 0.00


Set BAmr_Enchanted_Unit[BAmr_Index] = BAmr_Unit[2]


For each (Integer BAmr_Loop_Segment) from 1 to BAmr_Config_SEGMENT_SPAWNED, do (Actions)



Loop - Actions




Set BAmr_Seg_CValue = ((BAmr_Config_SEGMENT_SPAWNED x BAmr_Index) + (BAmr_Loop_Segment - 1))




Set BAmr_Point[3] = (BAmr_Point[1] offset by BAmr_Config_SEG_VALUE[2] towards ((BAmr_Config_SEG_VALUE[4] / (Real(BAmr_Config_SEGMENT_SPAWNED))) x (Real(BAmr_Loop_Segment))) degrees)




Special Effect - Create a special effect at BAmr_Point[3] using BAmr_Config_SPEF_PATH[0]




Set BAmr_Segment_Missile[BAmr_Seg_CValue] = (Last created special effect)




Custom script: set udg_BAmr_Spef_Current_Height[udg_BAmr_Seg_CValue] = GetLocationZ(udg_BAmr_Point[3])




Special Effect - Set Position - Z of BAmr_Segment_Missile[BAmr_Seg_CValue] to ((BAmr_Spef_Current_Height[BAmr_Seg_CValue] + BAmr_Config_SEG_VALUE[3]) + (Current flying height of BAmr_Enchanted_Unit[BAmr_Index]))




Special Effect - Set Scale of BAmr_Segment_Missile[BAmr_Seg_CValue] to BAmr_Config_SEG_VALUE[7]




Special Effect - Set Color of BAmr_Segment_Missile[BAmr_Seg_CValue] to r: (Integer(BAmr_Config_SEG_VALUE[11])), g: (Integer(BAmr_Config_SEG_VALUE[12])), b: (Integer(BAmr_Config_SEG_VALUE[13]))




Set BAmr_Segment_Missile_State[BAmr_Seg_CValue] = Alive




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





If - Conditions






BAmr_Boolean[3] Equal to True





Then - Actions






Special Effect - Set Scale of BAmr_Segment_Missile[BAmr_Seg_CValue] to BAmr_Config_SEG_VALUE[7]





Else - Actions




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





If - Conditions






BAmr_Boolean[4] Equal to True





Then - Actions






Special Effect - Set Alpha of BAmr_Segment_Missile[BAmr_Seg_CValue] to (Integer(BAmr_Config_SEG_VALUE[10]))





Else - Actions




Special Effect - Create a special effect at BAmr_Point[3] using BAmr_Config_SPEF_PATH[1]




Special Effect - Destroy (Last created special effect)




Custom script: call RemoveLocation(udg_BAmr_Point[3])


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



If - Conditions




BAmr_Index Equal to 1



Then - Actions




Trigger - Turn on BAmr Periodic <gen>




Trigger - Turn on BAmr Block <gen>



Else - Actions


-------- Insert the values & unit directly into the index --------


-------- --------


-------- --------


-------- What are leaks? --------


-------- https://www.hiveworkshop.com/threads/things-that-leak.35124/ --------


-------- --------


-------- No longer referencing the location, clean them up! --------


Custom script: call RemoveLocation(udg_BAmr_Point[1])


Custom script: call RemoveLocation(udg_BAmr_Point[2])


-------- No longer referencing the location, clean them up! --------


-------- --------


-------- ===================================================================================================================================== --------
BAmr Block

Events


Unit - A unit About to take damage

Conditions


((Damage Target) has buff BAmr_Config_BUFF) Equal to True

Actions


For each (Integer BAmr_Loop) from 1 to BAmr_Index, do (Actions)



Loop - Actions




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





If - Conditions






(Damage Target) Equal to BAmr_Enchanted_Unit[BAmr_Loop]





Then - Actions






-------- --------






-------- Damage "Flare" effect --------






Set VariableSet BAmr_Point[1] = (Position of (Damage Target))






Set VariableSet BAmr_Point[2] = (Position of (Damage source))






Custom script: set udg_BAmr_Spef_Current_Height[udg_BAmr_Loop] = GetLocationZ(udg_BAmr_Point[1])






Special Effect - Create a special effect at (BAmr_Point[1] offset by BAmr_Config_SPEF_VALUE[1] towards (Angle from BAmr_Point[1] to BAmr_Point[2]) degrees.) using BAmr_Config_SPEF_PATH[3]






Set VariableSet BAmr_Config_SPEF = (Last created special effect)






Special Effect - Set Position - Z of BAmr_Config_SPEF to ((BAmr_Spef_Current_Height[BAmr_Loop] + BAmr_Config_SPEF_VALUE[2]) + (Current flying height of (Damage Target)))






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







If - Conditions








BAmr_Boolean[1] Equal to True







Then - Actions








Special Effect - Set Color of BAmr_Config_SPEF to color of (Owner of (Damage Target))







Else - Actions








Special Effect - Set Color of BAmr_Config_SPEF to color of (Player((Integer(BAmr_Config_SPEF_VALUE[0]))))






Special Effect - Set Color of BAmr_Config_SPEF to r: (Integer(BAmr_Config_SPEF_VALUE[5])), g: (Integer(BAmr_Config_SPEF_VALUE[6])), b: (Integer(BAmr_Config_SPEF_VALUE[7]))






Special Effect - Set Scale of BAmr_Config_SPEF to BAmr_Config_SPEF_VALUE[3]






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







If - Conditions








BAmr_Boolean[2] Equal to True







Then - Actions








Set VariableSet BAmr_Real[1] = (BAmr_Health[BAmr_Loop] / (BAmr_Max[BAmr_Loop] / 255.00))








If (BAmr_Real[1] Less than BAmr_Config_SPEF_VALUE[11]) then do (Set VariableSet BAmr_Real[1] = BAmr_Config_SPEF_VALUE[11]) else do (Do nothing)








Special Effect - Set Alpha of BAmr_Config_SPEF to (Integer(BAmr_Real[1]))







Else - Actions






Special Effect - Set Time Scale of BAmr_Config_SPEF to BAmr_Config_SPEF_VALUE[4]






Special Effect - Set Orientation of BAmr_Config_SPEF to yaw: (BAmr_Config_SPEF_VALUE[8] + (Radians((Angle from BAmr_Point[1] to BAmr_Point[2])))), pitch: BAmr_Config_SPEF_VALUE[9], roll: BAmr_Config_SPEF_VALUE[10]






Special Effect - Destroy BAmr_Config_SPEF






Custom script: call RemoveLocation(udg_BAmr_Point[1])






Custom script: call RemoveLocation(udg_BAmr_Point[2])






-------- --------






-------- This sets the damage of spells and physical attacks, it will ignore rates below zero allowing you to set strictly spell shields or physical sheilds! --------






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







If - Conditions








(Damage From Normal Attack) Equal to False







Then - Actions








If (BAmr_Config_RESIST_SPELL Equal to 0.00) then do (Skip remaining actions) else do (Event Response - Set Damage of Unit Damaged Event to ((Damage taken) x BAmr_Config_RESIST_SPELL))







Else - Actions








If (BAmr_Config_RESIST_PHYSICAL Equal to 0.00) then do (Skip remaining actions) else do (Event Response - Set Damage of Unit Damaged Event to ((Damage taken) x BAmr_Config_RESIST_PHYSICAL))






-------- --------






-------- This sets the damage to the percentage that the spell will absorb --------






Set VariableSet BAmr_DMG_Real = ((Damage taken) x BAmr_Config_ABSORBTION)






-------- --------






Set VariableSet BAmr_Total[BAmr_Loop] = (BAmr_Total[BAmr_Loop] + BAmr_DMG_Real)






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







If - Conditions








BAmr_DMG_Real Less than (BAmr_Health[BAmr_Loop] - 0.01)







Then - Actions








Event Response - Set Damage of Unit Damaged Event to ((Damage taken) - BAmr_DMG_Real)








Set VariableSet BAmr_Health[BAmr_Loop] = (BAmr_Health[BAmr_Loop] - BAmr_DMG_Real)







Else - Actions








Event Response - Set Damage of Unit Damaged Event to ((Damage taken) - BAmr_Health[BAmr_Loop])








Unit - Remove BAmr_Config_BUFF buff from (Damage Target)








Set VariableSet BAmr_Health[BAmr_Loop] = 0.00






For each (Integer BAmr_Loop_Segment) from 1 to BAmr_Config_SEGMENT_SPAWNED, do (Actions)







Loop - Actions








Set VariableSet BAmr_Seg_CValue = ((BAmr_Config_SEGMENT_SPAWNED x BAmr_Loop) + (BAmr_Loop_Segment - 1))








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









If - Conditions










BAmr_Total[BAmr_Loop] Greater than (BAmr_Max[BAmr_Loop] - ((BAmr_Max[BAmr_Loop] / (Real(BAmr_Config_SEGMENT_SPAWNED))) x (Real((BAmr_Loop_Segment - 1)))))









Then - Actions










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











If - Conditions












BAmr_Segment_Missile_State[BAmr_Seg_CValue] Equal to Alive











Then - Actions












Set VariableSet BAmr_Point[3] = (Point((Position - X of BAmr_Segment_Missile[BAmr_Seg_CValue].), (Position - Y of BAmr_Segment_Missile[BAmr_Seg_CValue].)))












Set VariableSet BAmr_Segment_Missile_State[BAmr_Seg_CValue] = Dead












Special Effect - Destroy BAmr_Segment_Missile[BAmr_Seg_CValue]












Special Effect - Create a special effect at BAmr_Point[3] using BAmr_Config_SPEF_PATH[2]












Special Effect - Destroy (Last created special effect)












Custom script: call RemoveLocation(udg_BAmr_Point[3])











Else - Actions









Else - Actions








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









If - Conditions










(BAmr_Health[BAmr_Loop] - ((BAmr_Max[BAmr_Loop] / (Real(BAmr_Config_SEGMENT_SPAWNED))) x (Real((BAmr_Loop_Segment - 1))))) Less than or equal to (BAmr_Max[BAmr_Loop] / (Real(BAmr_Config_SEGMENT_SPAWNED)))










BAmr_Segment_Missile_State[BAmr_Seg_CValue] Equal to Alive










Or - Any (Conditions) are true











Conditions












BAmr_Boolean[3] Equal to True












BAmr_Boolean[4] Equal to True









Then - Actions










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











If - Conditions












BAmr_Boolean[3] Equal to True











Then - Actions












Set VariableSet BAmr_Real[2] = ((BAmr_Health[BAmr_Loop] - ((BAmr_Max[BAmr_Loop] / (Real(BAmr_Config_SEGMENT_SPAWNED))) x (Real((BAmr_Loop_Segment - 1))))) / ((BAmr_Max[BAmr_Loop] / (Real(BAmr_Config_SEGMENT_SPAWNED))) / BAmr_Config_SEG_VALUE[7]))












If (BAmr_Real[2] Less than BAmr_Config_SEG_VALUE[8]) then do (Set VariableSet BAmr_Real[2] = BAmr_Config_SEG_VALUE[8]) else do (Do nothing)












Special Effect - Set Scale of BAmr_Segment_Missile[BAmr_Seg_CValue] to BAmr_Real[2]











Else - Actions










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











If - Conditions












BAmr_Boolean[4] Equal to True











Then - Actions












Set VariableSet BAmr_Real[3] = ((BAmr_Health[BAmr_Loop] - ((BAmr_Max[BAmr_Loop] / (Real(BAmr_Config_SEGMENT_SPAWNED))) x (Real((BAmr_Loop_Segment - 1))))) / ((BAmr_Max[BAmr_Loop] / (Real(BAmr_Config_SEGMENT_SPAWNED))) / BAmr_Config_SEG_VALUE[10]))












If (BAmr_Real[3] Less than BAmr_Config_SEG_VALUE[9]) then do (Set VariableSet BAmr_Real[3] = BAmr_Config_SEG_VALUE[9]) else do (Do nothing)












Special Effect - Set Alpha of BAmr_Segment_Missile[BAmr_Seg_CValue] to (Integer(BAmr_Real[3]))











Else - Actions









Else - Actions





Else - Actions
BAmr Periodic

Events

Conditions

Actions


For each (Integer BAmr_Loop) from 1 to BAmr_Index, do (Actions)



Loop - Actions




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





If - Conditions






(BAmr_Enchanted_Unit[BAmr_Loop] has buff BAmr_Config_BUFF) Equal to False





Then - Actions






Set BAmr_Health[BAmr_Loop] = 0.00






For each (Integer BAmr_Loop_Segment) from 1 to BAmr_Config_SEGMENT_SPAWNED, do (Actions)







Loop - Actions








Set BAmr_Seg_CValue = ((BAmr_Config_SEGMENT_SPAWNED x BAmr_Loop) + (BAmr_Loop_Segment - 1))








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









If - Conditions










BAmr_Segment_Missile_State[BAmr_Seg_CValue] Equal to Alive









Then - Actions










Set BAmr_Point[3] = (Point((Position - X of BAmr_Segment_Missile[BAmr_Seg_CValue]), (Position - Y of BAmr_Segment_Missile[BAmr_Seg_CValue])))










Set BAmr_Segment_Missile_State[BAmr_Seg_CValue] = Dead










Special Effect - Destroy BAmr_Segment_Missile[BAmr_Seg_CValue]










Special Effect - Create a special effect at BAmr_Point[3] using BAmr_Config_SPEF_PATH[2]










Special Effect - Destroy (Last created special effect)










Custom script: call RemoveLocation(udg_BAmr_Point[3])









Else - Actions








Set BAmr_Seg_CValue_DeIndex = ((BAmr_Config_SEGMENT_SPAWNED x BAmr_Index) + (BAmr_Loop_Segment - 1))








Set BAmr_Segment_Missile[BAmr_Seg_CValue] = BAmr_Segment_Missile[BAmr_Seg_CValue_DeIndex]








Set BAmr_Segment_Missile_State[BAmr_Seg_CValue] = BAmr_Segment_Missile_State[BAmr_Seg_CValue_DeIndex]






Set BAmr_Enchanted_Unit[BAmr_Loop] = BAmr_Enchanted_Unit[BAmr_Index]






Set BAmr_Health[BAmr_Loop] = BAmr_Health[BAmr_Index]






Set BAmr_Max[BAmr_Loop] = BAmr_Max[BAmr_Index]






Set BAmr_Spef_Current_Height[BAmr_Loop] = BAmr_Spef_Current_Height[BAmr_Index]






Set BAmr_Total[BAmr_Loop] = BAmr_Total[BAmr_Index]






Set BAmr_Index = (BAmr_Index - 1)






Set BAmr_Loop = (BAmr_Loop - 1)






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







If - Conditions








BAmr_Index Equal to 0







Then - Actions








Trigger - Turn off BAmr Periodic <gen>








Trigger - Turn off BAmr Block <gen>







Else - Actions






-------- --------





Else - Actions






Set BAmr_Point[1] = (Position of BAmr_Enchanted_Unit[BAmr_Loop])






Set BAmr_Current_Rot_Speed[BAmr_Loop] = (BAmr_Current_Rot_Speed[BAmr_Loop] + BAmr_Config_SEG_VALUE[5])






For each (Integer BAmr_Loop_Segment) from 1 to BAmr_Config_SEGMENT_SPAWNED, do (Actions)







Loop - Actions








Set BAmr_Seg_CValue = ((BAmr_Config_SEGMENT_SPAWNED x BAmr_Loop) + (BAmr_Loop_Segment - 1))








Set BAmr_Point[3] = (Point((Position - X of BAmr_Segment_Missile[BAmr_Seg_CValue]), (Position - Y of BAmr_Segment_Missile[BAmr_Seg_CValue])))








Custom script: set udg_BAmr_Spef_Current_Height[udg_BAmr_Seg_CValue] = GetLocationZ(udg_BAmr_Point[1])








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









If - Conditions










(Distance between BAmr_Point[1] and BAmr_Point[3]) Less than (BAmr_Config_SEG_VALUE[1] + 15.00)









Then - Actions










-------- ORBITING --------










Set BAmr_Point[2] = (BAmr_Point[1] offset by BAmr_Config_SEG_VALUE[1] towards (((360.00 / (Real(BAmr_Config_SEGMENT_SPAWNED))) x (Real(BAmr_Loop_Segment))) + BAmr_Current_Rot_Speed[BAmr_Loop]) degrees)










Special Effect - Set Position of BAmr_Segment_Missile[BAmr_Seg_CValue] to x: (X of BAmr_Point[2]), y: (Y of BAmr_Point[2]), z: ((BAmr_Spef_Current_Height[BAmr_Seg_CValue] + BAmr_Config_SEG_VALUE[3]) + (Current flying height of BAmr_Enchanted_Unit[BAmr_Loop]))










Special Effect - Set Orientation of BAmr_Segment_Missile[BAmr_Seg_CValue] to yaw: (BAmr_Config_SEG_VALUE[14] + (Radians((Angle from BAmr_Point[1] to BAmr_Point[2])))), pitch: BAmr_Config_SEG_VALUE[15], roll: BAmr_Config_SEG_VALUE[16]









Else - Actions










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











If - Conditions












(Distance between BAmr_Point[1] and BAmr_Point[3]) Less than BAmr_Config_SEG_VALUE[20]











Then - Actions












Set BAmr_Point[2] = (BAmr_Point[3] offset by BAmr_Config_SEG_VALUE[6] towards (Angle from BAmr_Point[3] to BAmr_Point[1]) degrees)












Special Effect - Set Position of BAmr_Segment_Missile[BAmr_Seg_CValue] to x: (X of BAmr_Point[2]), y: (Y of BAmr_Point[2]), z: ((BAmr_Spef_Current_Height[BAmr_Seg_CValue] + BAmr_Config_SEG_VALUE[3]) + (Current flying height of BAmr_Enchanted_Unit[BAmr_Loop]))












Special Effect - Set Orientation of BAmr_Segment_Missile[BAmr_Seg_CValue] to yaw: (BAmr_Config_SEG_VALUE[17] + (Radians((Angle from BAmr_Point[3] to BAmr_Point[2])))), pitch: BAmr_Config_SEG_VALUE[18], roll: BAmr_Config_SEG_VALUE[19]











Else - Actions












Set BAmr_Point[2] = (BAmr_Point[1] offset by BAmr_Config_SEG_VALUE[1] towards (((360.00 / (Real(BAmr_Config_SEGMENT_SPAWNED))) x (Real(BAmr_Loop_Segment))) + BAmr_Current_Rot_Speed[BAmr_Loop]) degrees)












Special Effect - Set Position of BAmr_Segment_Missile[BAmr_Seg_CValue] to x: (X of BAmr_Point[2]), y: (Y of BAmr_Point[2]), z: ((BAmr_Spef_Current_Height[BAmr_Seg_CValue] + BAmr_Config_SEG_VALUE[3]) + (Current flying height of BAmr_Enchanted_Unit[BAmr_Loop]))












Special Effect - Set Orientation of BAmr_Segment_Missile[BAmr_Seg_CValue] to yaw: (BAmr_Config_SEG_VALUE[14] + (Radians((Angle from BAmr_Point[1] to BAmr_Point[2])))), pitch: BAmr_Config_SEG_VALUE[15], roll: BAmr_Config_SEG_VALUE[16]










-------- TRAVELING --------








-------- --------








Custom script: call RemoveLocation(udg_BAmr_Point[2])








Custom script: call RemoveLocation(udg_BAmr_Point[3])






Custom script: call RemoveLocation(udg_BAmr_Point[1])
Set BAmr_EFFECTPATH[3]
Set BAmr_EFFECTPATH[3]
Set BAmr_SPEF_YPR[1]
Set BAmr_SPEF_YPR[2]
Set BAmr_SPEF_YPR[3]
Set BAmr_SPEF_YPR[2]