1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  4. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Sheol v1.0.2.w3x
Variables
Variables
Test Triggers
Turn off Sound
Kill Hero
Turn on HP Cheat
HP Cheat
Reset Ability Cooldowns
Systems
Damage Engine
Damage Engine Config
Damage Engine
Damage Text and Calculations
Vars
Armor Types
Attack Types
Damage Types
Defense Types
Weapon Types
Knockback 2D
Requirement
Unit Indexer
---------------------------
Knockback 2D Config
Knockback 2D Destroy
Knockback 2D
Knockback 2D System
K2D OnLoop Template
Initialization
Map Initialization
Intro Cinematic
Intro Enter region
Intro Enter region 2
Intro Cinematic Souls
Intro Cinematic Spawn Spirit
Set Hero Transparency
Intro Spawn Souls
Intro Cinematic Angel and Spirit Dialogue
Skip Intro Kill Switch
Make Quests
Preloading
Hero
Respawn System
Killing Unit
Hero Dies Play Special Effect
Respawn Initialization
Set Respawn Region 1
Set Respawn Region 2
Set Respawn Region 3
Set Respawn Region 4
Set Respawn Region 5
Respawn Hero
Soul System
Subtract Mana
Spawn Death Souls
Spawn Life Souls
Pick Up Soul Auto
Remove Dead Souls
Mouse Movement System
Show Movement Dialog
Click Movement Dialog
Mouse Movement Configuration
Mouse Click
Mouse Release
Mouse Move
Disable Movement
Enable Movement
Spells
Pick up Grand Souls
Remove Grand Souls
Pick Up Grand Souls
ShockWave
SW Initiate
SW Move Units
Cleave
Turn on Cleave
Cleave Damage
Charge
Charge
Charge Move
Charge Hit Unit
Charge Hero Dies
Beam
Beam Initiate
Beam No Mana
Hero Dies
Beam Disable
Move Beam
Hero Face Angle
Beam Damage
Shaking Effect
Slam Spell
Slam Spell
Slam Explode
Items
Spawn Items
Dagger
Ring
Baphomet
Chest 1
Chest 2
Chest 3
Chest 4
Chest 5
Chest 6
Chest 7
Chest 8
Chest 9
Chest 10
Chest 11
Chest trap 1
Wand of Belphegor
Wand of Belphegor Pick up
Wand of Belphegor Drop
Moving Blades Move
Sword of Alastor
Sword of Alastor
Seraph Wings
Wing Smite
Regen Potion
Use Regen Potion
Map Triggers
Remove Dummies
Camera Height 1
Camera Height 2
Camera Height 3
Camera Height 4
Open Gates
Open Gate 1
Open Gate 2
Open Gate 3
Spawn Units
Hero Dies Remove Shades
Spawn Death Shades
Spawn Life Shades
Remove Shades
Spawn Skeletons 1
Spawn Skeletons 2
Spawn Skeletons 3
Unpause Units
Spawn Ghosts 1
Gargoyles 1
Gargoyles 2
Gargoyles 3
Gargoyles 4
Spawn Spiders
Spawn Bombs 1
Spawn Bombs 2
Spawn Shadow Fiends
Spawn Ethereal Fiends 1
Spawn Ethereal Fiends 2
Spawn Ethereal Fiends 3
Spawn Lesser Demons
Unit AI
Units Dies
Skeleton
Skeleton Dies
Evil Chest
Evil Chest Dies
Ghost
Ghost Dies
Ghost Projectile
Ghost Cast Projectile
Ghost Summon Projectile
Ghost Move Projectiles
Ghost Projectile Dies
Gargoyle
Gargoyle Dies
Bombs
Bomb Explode
Bomb Dies
Etheral Fiend
Etheral Fiend Dies
Create Special Effect
Take Damage
Deal Damage
Ethereals Attack 1
Ethereals Attack 2
Ethereals Attack 3
Ethereals Attack 4
Spiders
Spider Dies
Spider Lord
Spider Lord Dies
Spider Lord Cast Spells
Spider Lord Summon Missile
Spider Lord Move Missiles
Spider Lord Web
Spider Lord Web Dies
Shadow Fiends
Shadow Fiend Dies
Void Rain Impact Sound
Shadow Fiend Cast Void Rain
----- 1 -----
Void Rain 1
Void Rain 1 Damage
----- 2 -----
Void Rain 2
Void Rain 2 Damage
----- 3 -----
Void Rain 3
Void Rain 3 Damage
----- 4 -----
Void Rain 4
Void Rain 4 Damage
----- 5 -----
Void Rain 5
Void Rain 5 Damage
----- 6 -----
Void Rain 6
Void Rain 6 Damage
----- 7 -----
Void Rain 7
Void Rain 7 Damage
Lesser Demon
Lesser Demon Cast Spells
Lesser Demon Slam
Lesser Demon Dies
Gem Puzzle
Pick up Gem of Death Spell
Remove Berserk
Pick up Gem of Life Spell
Remove Manashield
Pick up Gem of Death First Time
Pick up Gem of Life First Time
Fade After Pickup
Pick Up Gems
Force Hero to Drop Gem 1
Force Hero to Drop Gem 2
Puzzle
Set Gem Puzzle Variables
Drop Gem 1
Drop Gem Run Trigger 1
Drop Gem Run Trigger 2
Drop Gem Run Trigger 1 2
Drop Gem Run Trigger 2 2
Open Gates
Open Gates 1
Open Gates 2
Gem Puzzle Debug
Set Gem Region 1
Set Gem Region 2
Bosses
Spawn Bosses
Open Boss 1 room
Close Boss Room 1
Open Boss 2 room
Close Boss Room 2
Open Boss 3 room
Close Boss Room 3
Open Boss 3 2
Stun Hero
Mammon
Mammon Cinematic
Mammon Cinematic Skip
Mammon Dies
Mammon Fade
Mammon Spawn Souls
Mammon autocast
Mammon Skull
Move Mammon Skull
Mammon Skull Dies
Mammon Melee Attack
Melee Damage
Move Mammon
Spawn Shade Mammon
Hero Dies Mammon
Return to Mammon
Witch of Endor
Engage Witch of Endor
Skip Witch of Endor Cinematic
Hero Dies Witch of Endor
Return to Witch of Endor
Witch of Endor Dies
Witch of Endor fade
Witch of Endor Spawn Souls
Samuel Dies
Witch of Endor Move Lightning
Witch of Endor Wards Dies
Samuel Charge Initiate
Samuel Face Hero
Samuel Charge
Stun Samuel
Stun Witch
Witch of Endor Laser
Witch of Endor Move Beam
Witch of Endor Laser Damage
Move Laser Unit
Witch of Endor HP Steal
HP Steal Start ability
HP Steal Lightning
Samuel Fade
Samuel Spawn Souls
Boss 2 teleport
Boss 2 teleport location
Beelzebub
Engage Demonic Centaur
Skip Demonic Centaur
DC Hero Return
Demonic Centaur Dies
DC Hero Dies
DC Spells
DC Cast Spells
---------------------------
DC Wards
DC Wards Cast Spells
DC Wards Face Hero
DC Wards Missiles
DC Wards Move Missiles
DC Missiles Dies
DC Wards Dies
---------------------------
DC Split Spell
DC Move Lightning
Split 1
Split 2
Split 3
Split 4
DC Hit Clone
DC Orb Attack
---------------------------
DC Slam
---------------------------
DC Teleport Projectiles
Boss 3 teleport location
DC Move Missiles
Abaddon
Boss Music Off
Boss Music On
Teleport to Final Boss
Skip Final Bossfight Cinematic
Return to Final Boss
LB Attack Sounds
Hero Dies Reset Bossfight 4
LB Cast Spells
Spawn Souls Last Boss
Final Boss Dies
Final Boss Dies Cinematic
Special Effects Boss Dies
Final Boss Spells
Fire Path
Move Fire Path
---------------------------
Fire Circle
Move Circle
Fireball unit dies
---------------------------
FB Charge
Close to Hero
Explosion
Move Fires
---------------------------
Wards
Move Wards
Ward Damage
Remove Wards
Ward Stand in middle
---------------------------
Armageddon
Armageddon Meteors
---------------------------
Fire Ward
Rotate Fire Ward
Spawn Missiles
Move Missiles
Missiles Dies
Fire Ward Dies
---------------------------
LB Auto Missiles Enter Region 1
LB Auto Missiles Enter Region 2
LB Auto Missiles Enter Region 3
LB Auto Missiles Enter Region 4
LB Auto Missiles Leave Regions
LB Auto Missiles Timer Expires
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code except Custom Script Item. Custom Script Item will merge into map script after globals variables declaration with the list order in trigger view.
globals
    group       ReturnGroup     = null
endglobals

function GetUnitsOfType takes integer unitid returns group
    local group   g      = CreateGroup()
    local unit FoG
    local integer index = 0
    set ReturnGroup = CreateGroup()
   
    loop
        call GroupEnumUnitsOfPlayer(g, Player(index), null)
        loop
            set FoG = FirstOfGroup(g)
            exitwhen FoG == null
            call GroupRemoveUnit(g, FoG)
           
            if GetUnitTypeId(FoG) == unitid then
                call GroupAddUnit(ReturnGroup, FoG)
            endif
        endloop
        set index = index + 1
        exitwhen index == bj_MAX_PLAYER_SLOTS
    endloop
   
    call DestroyGroup(g)
    set g = null
    return ReturnGroup
endfunction
Name Type Is Array Initial Value
AbilityIndexer integer No
AfterDamageEvent real No
Angle real No
Angle2 real Yes
AOEDamageEvent real No
AOEDamageSource unit No
ArmageddonBoolean boolean No
ARMOR_TYPE_ETHEREAL integer No
ARMOR_TYPE_FLESH integer No
ARMOR_TYPE_METAL integer No
ARMOR_TYPE_NONE integer No
ARMOR_TYPE_STONE integer No
ARMOR_TYPE_WOOD integer No
ArmorTypeDebugStr string Yes
ARPG_Movement boolean No
ATTACK_TYPE_CHAOS integer No
ATTACK_TYPE_HERO integer No
ATTACK_TYPE_MAGIC integer No
ATTACK_TYPE_NORMAL integer No
ATTACK_TYPE_PIERCE integer No
ATTACK_TYPE_SIEGE integer No
ATTACK_TYPE_SPELLS integer No
AttackTypeDebugStr string Yes
BlowsLeft integer No
BombGroup group No
Bosses unit Yes
BossfightON boolean Yes
CenterPoint location No
ChargeAngle real No
ChargeDamage real Yes
ChargeDistance real No
ChargeHitBoss boolean No
ChargeHitPlayer player No
ChargePicked unit No
ChargePoint location No
ChargeSFX effect No
CinematicON boolean No
CONVERTED_ATTACK_TYPE attacktype Yes
CONVERTED_DAMAGE_TYPE damagetype Yes
Critchance real No
DAMAGE_TYPE_ACID integer No
DAMAGE_TYPE_COLD integer No
DAMAGE_TYPE_DEATH integer No
DAMAGE_TYPE_DEFENSIVE integer No
DAMAGE_TYPE_DEMOLITION integer No
DAMAGE_TYPE_DISEASE integer No
DAMAGE_TYPE_DIVINE integer No
DAMAGE_TYPE_ENHANCED integer No
DAMAGE_TYPE_FIRE integer No
DAMAGE_TYPE_FORCE integer No
DAMAGE_TYPE_LIGHTNING integer No
DAMAGE_TYPE_MAGIC integer No
DAMAGE_TYPE_MIND integer No
DAMAGE_TYPE_NORMAL integer No
DAMAGE_TYPE_PLANT integer No
DAMAGE_TYPE_POISON integer No
DAMAGE_TYPE_SHADOW_STRIKE integer No
DAMAGE_TYPE_SLOW_POISON integer No
DAMAGE_TYPE_SONIC integer No
DAMAGE_TYPE_SPIRIT_LINK integer No
DAMAGE_TYPE_UNIVERSAL integer No
DAMAGE_TYPE_UNKNOWN integer No
DamageEvent real No
DamageEventAmount real No
DamageEventAOE integer No
DamageEventAOEGroup group No
DamageEventArmorPierced real No
DamageEventArmorT integer No
DamageEventAttackT integer No
DamageEventDamageT integer No
DamageEventDefenseT integer No
DamageEventLevel integer No
DamageEventOverride boolean No
DamageEventPrevAmt real No
DamageEventSource unit No
DamageEventTarget unit No
DamageEventTrigger trigger No
DamageEventType integer No
DamageEventWeaponT integer No
DamageInteger integer No
DamageModifierEvent real No
DamageReal real No
DamageScalingUser real No
DamageScalingWC3 real No
DamageTypeBlocked integer No
DamageTypeCode integer No
DamageTypeCriticalStrike integer No
DamageTypeDebugStr string Yes
DamageTypeExplosive integer No
DamageTypeHeal integer No
DamageTypePure integer No
DamageTypePureExplosive integer No
DamageTypeReduced integer No
DashInterrupted boolean Yes
DC_Clones group No
DC_HandsGroup group No
DC_HP real No
DC_LightningLoop sound No
DC_LightningOrb unit No
DC_Mana real No
DC_Missiles group No
DC_MissilesGroup group No
DC_OrbDamage real No
DC_RandomNumber real No
DC_SpellsReal real No
DC_SpellTimer timer No
DC_Split boolean No
DC_SplitReal real No
DC_TeleportsLeft integer No
DCL lightning No
DCLP location Yes
DEFENSE_TYPE_DIVINE integer No
DEFENSE_TYPE_FORTIFIED integer No
DEFENSE_TYPE_HEAVY integer No
DEFENSE_TYPE_HERO integer No
DEFENSE_TYPE_LIGHT integer No
DEFENSE_TYPE_MEDIUM integer No
DEFENSE_TYPE_NORMAL integer No
DEFENSE_TYPE_UNARMORED integer No
DefenseTypeDebugStr string Yes
EasyItem__ERRORSOUND string No
EasyItem__SPLIT boolean No
EasyItem__SPLITDROP boolean No
EasyItem__SPLITSIZE integer No
EasyItem__SPLITSTACK boolean No
EasyItem__SPLITSTACKDELAY real No
EasyItem__USEITEMLEVEL boolean No
EasyItem_integer integervar Yes
EasyItem_item item No
EasyItem_items item Yes
EasyItem_point location Yes
EasyItem_sound sound No
EasyItem_string string Yes
EasyItem_timer timer No
EasyItem_unit unit No
EasyItem_units unit Yes
EndorBeam boolean No
EnhancedDamageTarget unit No
EtherealGroup group No
Ethereals unit Yes
EV real No
Fils_Caster unit No
FireCircleON boolean No
FL_FW_MissileFrequency real No
FL_FW_RotateSpeed real No
FogReal real No
FontColor real Yes
FontSize real No
GateOpen boolean Yes
Gem item Yes
GemFadeTimerWindow timerdialog Yes
GemMoveTimer timer Yes
GemRegion rect Yes
GemsFadeTimer timer Yes
GetUnitAttackDamage real Yes
GhostGroup group No
GhostProjectiles group No
GrandSoul item Yes
Hero unit No
HeroTransparency real No
HeroZPosition real No
IntroLoop sound No
IsDamageCode boolean No
IsDamageMelee boolean No
IsDamageRanged boolean No
IsDamageSpell boolean No
IsUnitBeingKnockedBack boolean Yes
ItemCount integer No
K2DAmphibious boolean Yes
K2DAngle real Yes
K2DBounce boolean Yes
K2DCollision real Yes
K2DCos real Yes
K2DCosD1 real Yes
K2DCosD2 real Yes
K2DCosH real Yes
K2DDebrisKiller unit No
K2DDestRadius real Yes
K2DDistanceLeft real Yes
K2DFlying boolean Yes
K2DFreeze boolean Yes
K2DFriction real Yes
K2DFXModel string Yes
K2DFXRate real Yes
K2DFXTimeLeft real Yes
K2DHeight real Yes
K2DHeightThreshold real Yes
K2DImpact trigger Yes
K2DItem item No
K2DItemOffset boolean No
K2DItemsFound boolean No
K2DKillTrees boolean Yes
K2DLastX real Yes
K2DLastY real Yes
K2DMaxDestRadius real No
K2DMaxX real No
K2DMaxY real No
K2DMinX real No
K2DMinY real No
K2DNext integer Yes
K2DOverride boolean Yes
K2DPause boolean Yes
K2DPrev integer Yes
K2DRadius integer Yes
K2DRegion rect No
K2DSimple boolean Yes
K2DSin real Yes
K2DSinD1 real Yes
K2DSinD2 real Yes
K2DSinH real Yes
K2DSource unit Yes
K2DTimeLeft real Yes
K2DTimeout real No
K2DTimer timer No
K2DUnbiasedCollision boolean Yes
K2DVelocity real Yes
K2DX real No
K2DY real No
KillingUnit unit No
Knockback2DAmphibious boolean No
Knockback2DAngle real No
Knockback2DBounces boolean No
Knockback2DCollision real No
Knockback2DDefaultBounce boolean No
Knockback2DDefaultDestRadius real No
Knockback2DDefaultFriction real No
Knockback2DDefaultFX string No
Knockback2DDefaultFXRate real No
Knockback2DDefaultGravity real No
Knockback2DDefaultKillTrees boolean No
Knockback2DDefaultPause boolean No
Knockback2DDestRadius real No
Knockback2DDistance real No
Knockback2DFriction real No
Knockback2DFXRate real No
Knockback2DGravity real No
Knockback2DHeight real No
Knockback2DKillTrees boolean No
Knockback2DLoopFX string No
Knockback2DOnImpact trigger No
Knockback2DOverride boolean No
Knockback2DPause boolean No
Knockback2DRobustPathing integer No
Knockback2DSimple boolean No
Knockback2DSource unit No
Knockback2DTime real No
Knockback2DTreeOrDebris string No
Knockback2DUnbiasedCollision boolean No
Knockback2DUnit unit No
LaerUnitWE unit No
LaserBeamDamage real No
LaserBeamDummies unit Yes
LaserBeamON boolean No
LaserLoopSound sound No
LB_ArmageddonEffect effect No
LB_ArmageddonFrequency real No
LB_ArmageddonLoc location Yes
LB_ArmageddonTimer timer No
LB_AutoMissileEffect effect No
LB_AutoMissileRegion rect No
LB_AutoMissileTimer timer No
LB_BeamUnit_1 unit Yes
LB_BeamUnit_2 unit Yes
LB_BeamUnit_3 unit Yes
LB_BeamUnit_4 unit Yes
LB_CastSpells real No
LB_CenterFlame effect No
LB_FC_Sound sound No
LB_FireBall unit Yes
LB_FireBallGroup group No
LB_FireLoop sound No
LB_FW_FireMissileTimer timer No
LB_FW_RotateTimer timer No
LB_HandEffect effect Yes
LB_I1 integer No
LB_I2 integer No
LB_Marker effect Yes
LB_MeteorLoop sound No
LB_MissilesGroup group No
LB_RandomNumber real No
LD unit Yes
LD_Final integer No
LD_Read integer No
LD_Write integer No
LethalDamageEvent real No
LethalDamageHP real No
LoopInt integer No
MammonEffect effect Yes
MammonSkull unit No
MammonSpellsReal real No
MammonTimer timer No
MammonVisibility real No
MouseClick boolean No
Movement_Dialog dialog No
Movement_Dialog_ButtonYes button No
MovingBlades unit No
MovingBladesEffect effect No
MusicReal1 real No
MusicReal2 real No
NextDamageType integer No
Nomana boolean Yes
NoSickness boolean No
NW_LP location Yes
NW_SE effect No
NW_Wards unit Yes
NW_WL lightning Yes
Playlist string No
Playlist2 string No
QuickMaths real No
Radians_QuarterPi real No
Radians_QuarterTurn real No
Radians_Turn real No
RandomAngle real No
RandomNumber real No
RandomUnit unit No
RemoveItem item No
RemoveSoulTimer timer No
RespawnRegion rect No
Samuel unit No
SamuelChargeEffect effect Yes
SamuelHit boolean No
SamuelShield effect No
Seraphiel unit No
SeraphielEffect effect Yes
ShadesGroup group No
ShadowFiendGroup group No
SkeletonEffect effect Yes
SkipCinematic boolean Yes
SlamExplode boolean No
Soul imagetype No
SoulAngle real No
SoulRegenerationHaltTimer timer No
SW_Blocker destructablecode No
SW_Damage real No
SW_KnockBack real No
SW_Speed real No
SW_Unit unit Yes
TargetPoint location No
Tauren_Shockwave boolean Yes
Tauren_WarStomp boolean Yes
TempGroup group No
TempGroup2 group No
TempLocation location Yes
TempRegion rect No
TempUnit unit No
TempUnitType unitcode No
UDex integer No
UDexGen integer No
UDexNext integer Yes
UDexPrev integer Yes
UDexRecycle integer No
UDexUnits unit Yes
UDexWasted integer No
UnitIndexerEnabled boolean No
UnitIndexEvent real No
VoidFallEffect_1 effect Yes
VoidFallEffect_10 effect Yes
VoidFallEffect_2 effect Yes
VoidFallEffect_3 effect Yes
VoidFallEffect_4 effect Yes
VoidFallEffect_5 effect Yes
VoidFallEffect_6 effect Yes
VoidFallEffect_7 effect Yes
VoidFallEffect_8 effect Yes
VoidFallEffect_9 effect Yes
VoidFallLocation_1 location Yes
VoidFallRead_1 integer No
VoidFallRead_10 integer No
VoidFallRead_2 integer No
VoidFallRead_3 integer No
VoidFallRead_4 integer No
VoidFallRead_5 integer No
VoidFallRead_6 integer No
VoidFallRead_7 integer No
VoidFallRead_8 integer No
VoidFallRead_9 integer No
VoidFallRegion rect Yes
VoidFallUnit unit Yes
VoidRain integer Yes
Ward unit Yes
WardDamage real No
WardLoopSound sound No
WardRotateSpeed real No
WardsBoolean boolean No
WardsBoolean2 boolean No
WE_CS integer No
WEAPON_TYPE_AM_CHOP integer No
WEAPON_TYPE_CH_SLICE integer No
WEAPON_TYPE_CL_SLICE integer No
WEAPON_TYPE_CM_SLICE integer No
WEAPON_TYPE_MH_BASH integer No
WEAPON_TYPE_MH_CHOP integer No
WEAPON_TYPE_MH_SLICE integer No
WEAPON_TYPE_MH_STAB integer No
WEAPON_TYPE_ML_CHOP integer No
WEAPON_TYPE_ML_SLICE integer No
WEAPON_TYPE_MM_BASH integer No
WEAPON_TYPE_MM_CHOP integer No
WEAPON_TYPE_MM_SLICE integer No
WEAPON_TYPE_MM_STAB integer No
WEAPON_TYPE_NONE integer No
WEAPON_TYPE_RH_BASH integer No
WEAPON_TYPE_WH_BASH integer No
WEAPON_TYPE_WH_SLICE integer No
WEAPON_TYPE_WL_BASH integer No
WEAPON_TYPE_WL_SLICE integer No
WEAPON_TYPE_WL_STAB integer No
WEAPON_TYPE_WM_BASH integer No
WEAPON_TYPE_WM_SLICE integer No
WEAPON_TYPE_WM_STAB integer No
WeaponTypeDebugStr string Yes
WebMissilesGroup group No
WETeleport boolean No
WitchTeleportLocation location No
Turn off Sound
  Events
    Player - Player 1 (Red) types a chat message containing sound (stringnoformat) as An exact match
  Conditions
  Actions
    Sound - Stop LaserLoopSound After fading
Kill Hero
  Events
    Player - Player 1 (Red) types a chat message containing kill (stringnoformat) as An exact match
  Conditions
  Actions
    Unit - Kill Hero
Turn on HP Cheat
  Events
    Player - Player 1 (Red) types a chat message containing hpcheat (stringnoformat) as An exact match
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (HP_Cheat <gen> is on) Equal to True
      Then - Actions
        Trigger - Turn off HP_Cheat <gen>
      Else - Actions
        Trigger - Turn on HP_Cheat <gen>
HP Cheat
  Events
    Game - DamageModifierEvent becomes Equal to 1.00
  Conditions
    DamageEventTarget Equal to Hero
  Actions
    Unit - Set life of DamageEventTarget to 100%
Reset Ability Cooldowns
  Events
    Player - Player 1 (Red) skips a cinematic sequence
  Conditions
  Actions
    Unit - Reset ability cooldowns for Hero.
Damage Engine Config
  Events
    Map initialization
  Conditions
  Actions
    -------- - --------
    -------- You can add extra classifications here if you want to differentiate between your triggered damage --------
    -------- Use DamageTypeExplosive (or any negative value damage type) if you want a unit killed by that damage to explode --------
    -------- - --------
    -------- The pre-defined type Code might be set by Damage Engine if Unit - Damage Target is detected and the user didn't define a type of their own. --------
    -------- "Pure" is especially important because it overrides both the Damage Engine as well as WarCraft 3 damage modification. --------
    -------- I therefore gave the user "Explosive Pure" in case one wants to combine the functionality of the two. --------
    -------- - --------
    Set VariableSet DamageTypePureExplosive = -2
    Set VariableSet DamageTypeExplosive = -1
    Set VariableSet DamageTypeCode = 1
    Set VariableSet DamageTypePure = 2
    -------- - --------
    Set VariableSet DamageTypeHeal = 3
    Set VariableSet DamageTypeBlocked = 4
    Set VariableSet DamageTypeReduced = 5
    -------- - --------
    Set VariableSet DamageTypeCriticalStrike = 6
    -------- - --------
    -------- Added 25 July 2017 to allow detection of things like Bash or Pulverize or AOE spread --------
    -------- - --------
    Set VariableSet DamageEventAOE = 1
    Set VariableSet DamageEventLevel = 1
    -------- - --------
    -------- In-game World Editor doesn't allow Attack Type and Damage Type comparisons. Therefore I need to code them as integers into GUI --------
    -------- - --------
    Set VariableSet ATTACK_TYPE_SPELLS = 0
    Set VariableSet ATTACK_TYPE_NORMAL = 1
    Set VariableSet ATTACK_TYPE_PIERCE = 2
    Set VariableSet ATTACK_TYPE_SIEGE = 3
    Set VariableSet ATTACK_TYPE_MAGIC = 4
    Set VariableSet ATTACK_TYPE_CHAOS = 5
    Set VariableSet ATTACK_TYPE_HERO = 6
    -------- - --------
    Set VariableSet DAMAGE_TYPE_UNKNOWN = 0
    Set VariableSet DAMAGE_TYPE_NORMAL = 4
    Set VariableSet DAMAGE_TYPE_ENHANCED = 5
    Set VariableSet DAMAGE_TYPE_FIRE = 8
    Set VariableSet DAMAGE_TYPE_COLD = 9
    Set VariableSet DAMAGE_TYPE_LIGHTNING = 10
    Set VariableSet DAMAGE_TYPE_POISON = 11
    Set VariableSet DAMAGE_TYPE_DISEASE = 12
    Set VariableSet DAMAGE_TYPE_DIVINE = 13
    Set VariableSet DAMAGE_TYPE_MAGIC = 14
    Set VariableSet DAMAGE_TYPE_SONIC = 15
    Set VariableSet DAMAGE_TYPE_ACID = 16
    Set VariableSet DAMAGE_TYPE_FORCE = 17
    Set VariableSet DAMAGE_TYPE_DEATH = 18
    Set VariableSet DAMAGE_TYPE_MIND = 19
    Set VariableSet DAMAGE_TYPE_PLANT = 20
    Set VariableSet DAMAGE_TYPE_DEFENSIVE = 21
    Set VariableSet DAMAGE_TYPE_DEMOLITION = 22
    Set VariableSet DAMAGE_TYPE_SLOW_POISON = 23
    Set VariableSet DAMAGE_TYPE_SPIRIT_LINK = 24
    Set VariableSet DAMAGE_TYPE_SHADOW_STRIKE = 25
    Set VariableSet DAMAGE_TYPE_UNIVERSAL = 26
    -------- - --------
    -------- The below variables don't affect damage amount, but do affect the sound played --------
    -------- They also give important information about the type of attack used. --------
    -------- They can differentiate between ranged and melee for units who are both --------
    -------- - --------
    Set VariableSet WEAPON_TYPE_NONE = 0
    -------- Metal Light/Medium/Heavy --------
    Set VariableSet WEAPON_TYPE_ML_CHOP = 1
    Set VariableSet WEAPON_TYPE_MM_CHOP = 2
    Set VariableSet WEAPON_TYPE_MH_CHOP = 3
    Set VariableSet WEAPON_TYPE_ML_SLICE = 4
    Set VariableSet WEAPON_TYPE_MM_SLICE = 5
    Set VariableSet WEAPON_TYPE_MH_SLICE = 6
    Set VariableSet WEAPON_TYPE_MM_BASH = 7
    Set VariableSet WEAPON_TYPE_MH_BASH = 8
    Set VariableSet WEAPON_TYPE_MM_STAB = 9
    Set VariableSet WEAPON_TYPE_MH_STAB = 10
    -------- Wood Light/Medium/Heavy --------
    Set VariableSet WEAPON_TYPE_WL_SLICE = 11
    Set VariableSet WEAPON_TYPE_WM_SLICE = 12
    Set VariableSet WEAPON_TYPE_WH_SLICE = 13
    Set VariableSet WEAPON_TYPE_WL_BASH = 14
    Set VariableSet WEAPON_TYPE_WM_BASH = 15
    Set VariableSet WEAPON_TYPE_WH_BASH = 16
    Set VariableSet WEAPON_TYPE_WL_STAB = 17
    Set VariableSet WEAPON_TYPE_WM_STAB = 18
    -------- Claw Light/Medium/Heavy --------
    Set VariableSet WEAPON_TYPE_CL_SLICE = 19
    Set VariableSet WEAPON_TYPE_CM_SLICE = 20
    Set VariableSet WEAPON_TYPE_CH_SLICE = 21
    -------- Axe Medium --------
    Set VariableSet WEAPON_TYPE_AM_CHOP = 22
    -------- Rock Heavy --------
    Set VariableSet WEAPON_TYPE_RH_BASH = 23
    -------- - --------
    -------- Since GUI still doesn't provide Defense Type and Armor Types, I needed to include the below --------
    -------- - --------
    Set VariableSet ARMOR_TYPE_NONE = 0
    Set VariableSet ARMOR_TYPE_FLESH = 1
    Set VariableSet ARMOR_TYPE_METAL = 2
    Set VariableSet ARMOR_TYPE_WOOD = 3
    Set VariableSet ARMOR_TYPE_ETHEREAL = 4
    Set VariableSet ARMOR_TYPE_STONE = 5
    -------- - --------
    Set VariableSet DEFENSE_TYPE_LIGHT = 0
    Set VariableSet DEFENSE_TYPE_MEDIUM = 1
    Set VariableSet DEFENSE_TYPE_HEAVY = 2
    Set VariableSet DEFENSE_TYPE_FORTIFIED = 3
    Set VariableSet DEFENSE_TYPE_NORMAL = 4
    Set VariableSet DEFENSE_TYPE_HERO = 5
    Set VariableSet DEFENSE_TYPE_DIVINE = 6
    Set VariableSet DEFENSE_TYPE_UNARMORED = 7
    -------- - --------
    Custom script: call DamageEngine_DebugStr()
//===========================================================================
//  
//  Damage Engine 5.4.2.3 - update requires copying of the JASS script
//  
//===========================================================================
library DamageEngine initializer Init
   
globals
    private timer   alarm       = CreateTimer()
    private boolean alarmSet    = false
   
    //Values to track the original pre-spirit Link/defensive damage values
    private boolean canKick         = true
    private boolean totem           = false
    private real lastAmount         = 0.00
    private real lastPrevAmt        = 0.00
    private integer lastType        = 0  
    private boolean lastCode        = false
    private real lastPierced        = 0.00
    private integer armorType       = 0
    private integer lastArmor       = 0
    private integer lastPrevArmor   = 0
    private integer defenseType     = 0
    private integer lastDefense     = 0
    private integer lastPrevDefense = 0
   
    //Stuff to track recursive UnitDamageTarget calls.
    private boolean eventsRun       = false
    private boolean kicking         = false
    private integer damageStack     = 0
    private unit array sourceStack
    private unit array targetStack
    private real array amountStack
    private attacktype array attackTStack
    private damagetype array damageTStack
    private weapontype array weaponTStack
    private integer array userTrigStack
    private integer array typeStack
   
    //Added in 5.4 to silently eliminate infinite recursion.
    private integer userTrigs = 9
    private integer eventTrig = 0
    private integer array nextTrig
    private trigger array userTrig
    private boolean array trigFrozen
       
    //Added/re-tooled in 5.4.1 to allow forced recursion (for advanced users only).
    private constant integer    LIMBO           = 16    //Recursion will never go deeper than LIMBO.
    private integer array       levelsDeep              //How deep the user recursion currently is.
    public boolean              inception       = false //You must set DamageEngine_inception = true before dealing damage to utlize this.
                                                        //When true, it allows your trigger to potentially go recursive up to LIMBO.
    private boolean             dreaming        = false
    private boolean array       inceptionTrig           //Added in 5.4.2 to simplify the inception variable for very complex DamageEvent trigger.
    private integer             sleepLevel      = 0
    private group               proclusGlobal   = CreateGroup() //track sources of recursion
    private group               fischerMorrow   = CreateGroup() //track targets of recursion
   
    //Improves readability in the code to have these as named constants.
    private constant integer    MOD_EVENT       = 1
    private constant integer    SHIELD_EVENT    = 4
    private constant integer    DAMAGE_EVENT    = 5
    private constant integer    ZERO_EVENT      = 6
    private constant integer    AFTER_EVENT     = 7
    private constant integer    LETHAL_EVENT    = 8
    private constant integer    AOE_EVENT       = 9
   
    //private string crashStr = ""
endglobals
   
//GUI Vars:
/*
    Retained from 3.8 and prior:
    ----------------------------
    unit            udg_DamageEventSource
    unit            udg_DamageEventTarget
    unit            udg_EnhancedDamageTarget
    group           udg_DamageEventAOEGroup
    integer         udg_DamageEventAOE
    integer         udg_DamageEventLevel
    real            udg_DamageModifierEvent
    real            udg_DamageEvent
    real            udg_AfterDamageEvent
    real            udg_DamageEventAmount
    real            udg_DamageEventPrevAmt
    real            udg_AOEDamageEvent
    boolean         udg_DamageEventOverride
    boolean         udg_NextDamageType
    boolean         udg_DamageEventType
    boolean         udg_IsDamageSpell
   
    //Added in 5.0:
    boolean          udg_IsDamageMelee    
    boolean          udg_IsDamageRanged    
    unit             udg_AOEDamageSource  
    real             udg_LethalDamageEvent
    real             udg_LethalDamageHP    
    real             udg_DamageScalingWC3
    integer          udg_DamageEventAttackT
    integer          udg_DamageEventDamageT
    integer          udg_DamageEventWeaponT
   
    //Added in 5.1:
    boolean          udg_IsDamageCode    
   
    //Added in 5.2:
    integer          udg_DamageEventArmorT  
    integer          udg_DamageEventDefenseT
   
    //Addded in 5.3:
    real             DamageEventArmorPierced
    real             udg_DamageScalingUser  
   
    //Added in 5.4.2 to allow GUI users to re-issue the exact same attack and damage type at the attacker.
    attacktype array udg_CONVERTED_ATTACK_TYPE
    damagetype array udg_CONVERTED_DAMAGE_TYPE
*/

   
    private function RunTrigs takes integer i returns nothing
        local integer cat = i
        if dreaming then
            //call BJDebugMsg("Tried to run triggers while triggers were already running.")
            return
        endif
        set dreaming = true
        //call BJDebugMsg("Start of event running")
        loop
            set i = nextTrig[i]
            exitwhen i == 0
            exitwhen cat == MOD_EVENT and (udg_DamageEventOverride or udg_DamageEventType*udg_DamageEventType == 4)
            exitwhen cat == SHIELD_EVENT and udg_DamageEventAmount <= 0.00
            exitwhen cat == LETHAL_EVENT and udg_LethalDamageHP > 0.405
            //set crashStr = "Bout to inspect " + I2S(i)
            if not trigFrozen[i] and IsTriggerEnabled(userTrig[i]) then
                set eventTrig = i
                //set crashStr = "Bout to evaluate " + I2S(i)
                if TriggerEvaluate(userTrig[i]) then
                    //set crashStr = "Bout to execute " + I2S(i)
                    call TriggerExecute(userTrig[i])
                endif
                //set crashStr = "Ran " + I2S(i)
                //call BJDebugMsg("Ran " + I2S(i))
                //if not (udg_DamageEventPrevAmt == 0.00 or udg_DamageScalingWC3 == 0.00 or udg_DamageEventAmount == 0.00) then
                //    if cat == MOD_EVENT then
                //        set udg_DamageScalingUser = udg_DamageEventAmount/udg_DamageEventPrevAmt
                //    elseif cat == SHIELD_EVENT then
                //        set udg_DamageScalingUser = udg_DamageEventAmount/udg_DamageEventPrevAmt/udg_DamageScalingWC3
                //    endif
                //elseif udg_DamageEventPrevAmt == 0.00 then
                //    call BJDebugMsg("Prev amount 0.00 and User Amount " + R2S(udg_DamageEventAmount))
                //elseif udg_DamageEventAmount == 0.00 then
                //    call BJDebugMsg("User amount 0.00 and Prev Amount " + R2S(udg_DamageEventPrevAmt))
                //elseif udg_DamageScalingWC3 == 0.00 then
                //    call BJDebugMsg("WC3 amount somehow 0.00")
                //endif
                //set crashStr = "Filtered " + I2S(i)
            //elseif i > 9 then
            //    if trigFrozen[i] then
            //        call BJDebugMsg("User Trigger is frozen")
            //    else
            //        call BJDebugMsg("User Trigger is off")
            //    endif
            endif
        endloop
        //call BJDebugMsg("End of event running")
        set dreaming = false
    endfunction
   
    private function OnAOEEnd takes nothing returns nothing
        if udg_DamageEventAOE > 1 then
            call RunTrigs(AOE_EVENT)
            set udg_DamageEventAOE      = 1
        endif
        set udg_DamageEventLevel        = 1
        set udg_EnhancedDamageTarget    = null
        set udg_AOEDamageSource         = null
        call GroupClear(udg_DamageEventAOEGroup)
    endfunction
   
    private function AfterDamage takes nothing returns nothing
        if udg_DamageEventPrevAmt != 0.00 and udg_DamageEventDamageT != udg_DAMAGE_TYPE_UNKNOWN then
            call RunTrigs(AFTER_EVENT)
        endif
    endfunction
   
    private function Finish takes nothing returns nothing
        local integer i = 0
        local integer exit
        if eventsRun then
            //call BJDebugMsg("events ran")
            set eventsRun = false
            call AfterDamage()
        endif
        if canKick and not kicking then
            //call BJDebugMsg("can kick")
            if damageStack > 0 then
                set kicking = true
                //call BJDebugMsg("Clearing queued damage instances: " + I2S(damageStack))
                loop
                    set exit = damageStack
                    set sleepLevel = sleepLevel + 1
                    loop
                        set udg_NextDamageType = typeStack[i]
                        //call BJDebugMsg("Stacking on " + R2S(amountStack[i]))
                        call UnitDamageTarget(sourceStack[i], targetStack[i], amountStack[i], true, false, attackTStack[i], damageTStack[i], weaponTStack[i])
                        call AfterDamage()
                        set i = i + 1 //Need to loop bottom to top to make sure damage order is preserved.
                        exitwhen i == exit
                    endloop
                    //call BJDebugMsg("Exit at: " + I2S(i))
                    exitwhen i == damageStack
                endloop
                //call BJDebugMsg("Terminate at at: " + I2S(i))
                set sleepLevel = 0
                loop
                    set i = i - 1
                    set trigFrozen[userTrigStack[i]] = false //Only re-enable recursive triggers AFTER all damage is dealt.
                    set levelsDeep[userTrigStack[i]] = 0 //Reset this stuff if the user tried some nonsense
                    exitwhen i == 0
                endloop
                //call BJDebugMsg("Cleared queued damage instances: " + I2S(damageStack))
                set damageStack = 0 //Can only be set after all the damage has successfully ended.
                set kicking = false
            endif
            call GroupClear(proclusGlobal)
            call GroupClear(fischerMorrow)
        //elseif kicking then
        //    call BJDebugMsg("Somehow still kicking")
        //else
        //    call BJDebugMsg("Cannot kick")
        endif
    endfunction
   
    private function ResetArmor takes nothing returns nothing
        if udg_DamageEventArmorPierced != 0.00 then
            call BlzSetUnitArmor(udg_DamageEventTarget, BlzGetUnitArmor(udg_DamageEventTarget) + udg_DamageEventArmorPierced)
        endif
        if armorType != udg_DamageEventArmorT then
            call BlzSetUnitIntegerField(udg_DamageEventTarget, UNIT_IF_ARMOR_TYPE, armorType) //revert changes made to the damage instance
        endif
        if defenseType != udg_DamageEventDefenseT then
            call BlzSetUnitIntegerField(udg_DamageEventTarget, UNIT_IF_DEFENSE_TYPE, defenseType)
        endif
    endfunction
   
    private function FailsafeClear takes nothing returns nothing
        //call BJDebugMsg("Damage from " + GetUnitName(udg_DamageEventSource) + " to " + GetUnitName(udg_DamageEventTarget) + " has been messing up Damage Engine.")
        //call BJDebugMsg(R2S(udg_DamageEventAmount) + " " + " " + R2S(udg_DamageEventPrevAmt) + " " + udg_AttackTypeDebugStr[udg_DamageEventAttackT] + " " + udg_DamageTypeDebugStr[udg_DamageEventDamageT])
        call ResetArmor()
        set canKick = true
        set totem = false
        set udg_DamageEventAmount = 0.00
        set udg_DamageScalingWC3  = 0.00
        if udg_DamageEventDamageT != udg_DAMAGE_TYPE_UNKNOWN then
            call RunTrigs(DAMAGE_EVENT) //Run the normal on-damage event based on this failure.
            set eventsRun = true //Run the normal after-damage event based on this failure.
        endif
        call Finish()
    endfunction
   
    private function WakeUp takes nothing returns nothing
        set alarmSet    = false //The timer has expired. Flag off to allow it to be restarted when needed.
        //if dreaming then
        //    set dreaming= false
        //    call BJDebugMsg("Timer set dreaming to False")
        //    call BJDebugMsg(crashStr)
        //endif
        if totem then
            //Something went wrong somewhere; the WarCraft 3 engine didn't run the DAMAGED event despite running the DAMAGING event.
            call FailsafeClear()
        else
            if not canKick and damageStack > 0 then
                //call BJDebugMsg("Damage Engine recursion deployment was failing with application of: " + R2S(udg_DamageEventAmount))
                set canKick = true
            endif
            call Finish() //Wrap up any outstanding damage instance
        endif
        call OnAOEEnd() //Reset things so they don't perpetuate for AoE/Level target detection
        set udg_DamageEventPrevAmt = 0.00 //Added in 5.4.2.1 to try to squash the Cold Arrows glitch (failed to do it)
    endfunction
   
    private function CalibrateMR takes nothing returns nothing
        set udg_IsDamageMelee           = false
        set udg_IsDamageRanged          = false
        set udg_IsDamageSpell           = udg_DamageEventAttackT == 0 //In Patch 1.31, one can just check the attack type to find out if it's a spell.
        if udg_DamageEventDamageT == udg_DAMAGE_TYPE_NORMAL and not udg_IsDamageSpell then //This damage type is the only one that can get reduced by armor.
            set udg_IsDamageMelee       = IsUnitType(udg_DamageEventSource, UNIT_TYPE_MELEE_ATTACKER)
            set udg_IsDamageRanged      = IsUnitType(udg_DamageEventSource, UNIT_TYPE_RANGED_ATTACKER)
            if udg_IsDamageMelee and udg_IsDamageRanged then
                set udg_IsDamageMelee   = udg_DamageEventWeaponT > 0// Melee units play a sound when damaging
                set udg_IsDamageRanged  = not udg_IsDamageMelee     // In the case where a unit is both ranged and melee, the ranged attack plays no sound.
            endif                                                   // The Huntress has a melee sound for her ranged projectile, however it is only an issue
        endif                                                       //if she also had a melee attack, because by default she is only UNIT_TYPE_RANGED_ATTACKER.
    endfunction
   
    private function OnPreDamage takes nothing returns boolean
        local unit src      = GetEventDamageSource()
        local unit tgt      = GetTriggerUnit()
        local real amt      = GetEventDamage()
        local attacktype at = BlzGetEventAttackType()
        local damagetype dt = BlzGetEventDamageType()
        local weapontype wt = BlzGetEventWeaponType()
       
        //call BJDebugMsg("First damage event running")
       
        if dreaming then
            //call BJDebugMsg("Dreaming")
            if amt != 0.00 then
                //Store recursive damage into a queue from index "damageStack" (0-15)
                //This damage will be fired after the current damage instance has wrapped up its events.
                //This damage can only be caused by triggers.
                set amountStack[damageStack]   = amt
                set sourceStack[damageStack]   = src
                set targetStack[damageStack]   = tgt
                set attackTStack[damageStack]  = at
                set damageTStack[damageStack]  = dt
                set weaponTStack[damageStack]  = wt
                set userTrigStack[damageStack] = eventTrig
                if udg_NextDamageType == 0 then
                    set typeStack[damageStack] = udg_DamageTypeCode
                else
                    set typeStack[damageStack] = udg_NextDamageType
                endif
                //Next block added in 5.4.1 to allow *some* control over whether recursion should kick
                //in. Also it's important to track whether the source and target were both involved at
                //some earlier point, so this is a more accurate and lenient method than before.
                set inception = inception or inceptionTrig[eventTrig]
                call GroupAddUnit(proclusGlobal, udg_DamageEventSource)
                call GroupAddUnit(fischerMorrow, udg_DamageEventTarget)
                if kicking and IsUnitInGroup(src, proclusGlobal) and IsUnitInGroup(tgt, fischerMorrow) then
                    if inception and not trigFrozen[eventTrig] then
                        set inceptionTrig[eventTrig] = true
                        if levelsDeep[eventTrig] < sleepLevel then
                            set levelsDeep[eventTrig] = levelsDeep[eventTrig] + 1
                            if levelsDeep[eventTrig] >= LIMBO then
                                set trigFrozen[eventTrig] = true
                            endif
                        endif
                    else
                        set trigFrozen[eventTrig] = true
                    endif
                endif
                set damageStack = damageStack + 1
                //call BJDebugMsg("damageStack: " + I2S(damageStack) + " levelsDeep: " + I2S(levelsDeep[eventTrig]) + " sleepLevel: " + I2S(sleepLevel))
                call BlzSetEventDamage(0.00) //queue the damage instance instead of letting it run recursively
            endif
        else
            if not kicking then
                //Added 25 July 2017 to detect AOE damage or multiple single-target damage
                if alarmSet then
                    if totem then
                        if dt != DAMAGE_TYPE_SPIRIT_LINK and dt != DAMAGE_TYPE_DEFENSIVE and dt != DAMAGE_TYPE_PLANT then
                            //if 'totem' is still set and it's not due to spirit link distribution or defense retaliation,
                            //the next function must be called as a debug. This reverts an issue I created in patch 5.1.3.
                            call FailsafeClear()
                        else
                            set totem           = false
                            set lastAmount      = udg_DamageEventAmount
                            set lastPrevAmt     = udg_DamageEventPrevAmt    //Store the actual pre-armor value.
                            set lastType        = udg_DamageEventType       //also store the damage type.
                            set lastCode        = udg_IsDamageCode          //store this as well.
                            set lastArmor       = udg_DamageEventArmorT
                            set lastPrevArmor   = armorType
                            set lastDefense     = udg_DamageEventDefenseT
                            set lastPrevDefense = defenseType
                            set lastPierced     = udg_DamageEventArmorPierced
                            set canKick         = false
                        endif
                    else
                        call Finish()
                    endif
                    if src != udg_AOEDamageSource then //Source has damaged more than once
                        call OnAOEEnd() //New damage source - unflag everything
                        set udg_AOEDamageSource = src
                    elseif tgt == udg_EnhancedDamageTarget then
                        set udg_DamageEventLevel= udg_DamageEventLevel + 1  //The number of times the same unit was hit.
                    elseif not IsUnitInGroup(tgt, udg_DamageEventAOEGroup) then
                        set udg_DamageEventAOE  = udg_DamageEventAOE + 1    //Multiple targets hit by this source - flag as AOE
                    endif
                else
                    call TimerStart(alarm, 0.00, false, function WakeUp)
                    set alarmSet                = true
                    set udg_AOEDamageSource     = src
                    set udg_EnhancedDamageTarget= tgt
                endif
                call GroupAddUnit(udg_DamageEventAOEGroup, tgt)
            endif
            set udg_DamageEventType             = udg_NextDamageType
            set udg_IsDamageCode                = udg_NextDamageType != 0
            set udg_DamageEventOverride         = dt == null //Got rid of NextDamageOverride in 5.1 for simplicity
            set udg_DamageEventPrevAmt          = amt
            set udg_DamageEventSource           = src
            set udg_DamageEventTarget           = tgt
            set udg_DamageEventAmount           = amt
            set udg_DamageEventAttackT          = GetHandleId(at)
            set udg_DamageEventDamageT          = GetHandleId(dt)
            set udg_DamageEventWeaponT          = GetHandleId(wt)
           
            call CalibrateMR() //Set Melee and Ranged settings.
           
            set udg_DamageEventArmorT           = BlzGetUnitIntegerField(udg_DamageEventTarget, UNIT_IF_ARMOR_TYPE) //Introduced in Damage Engine 5.2.0.0
            set udg_DamageEventDefenseT         = BlzGetUnitIntegerField(udg_DamageEventTarget, UNIT_IF_DEFENSE_TYPE)
            set armorType                       = udg_DamageEventArmorT
            set defenseType                     = udg_DamageEventDefenseT
            set udg_DamageEventArmorPierced     = 0.00
            set udg_DamageScalingUser           = 1.00
            set udg_DamageScalingWC3            = 1.00
           
            if amt != 0.00 then
                if not udg_DamageEventOverride then
                    call RunTrigs(MOD_EVENT)
               
                    //All events have run and the pre-damage amount is finalized.
                    call BlzSetEventAttackType(ConvertAttackType(udg_DamageEventAttackT))
                    call BlzSetEventDamageType(ConvertDamageType(udg_DamageEventDamageT))
                    call BlzSetEventWeaponType(ConvertWeaponType(udg_DamageEventWeaponT))
                    if udg_DamageEventArmorPierced != 0.00 then
                        call BlzSetUnitArmor(udg_DamageEventTarget, BlzGetUnitArmor(udg_DamageEventTarget) - udg_DamageEventArmorPierced)
                    endif
                    if armorType != udg_DamageEventArmorT then
                        call BlzSetUnitIntegerField(udg_DamageEventTarget, UNIT_IF_ARMOR_TYPE, udg_DamageEventArmorT) //Introduced in Damage Engine 5.2.0.0
                    endif
                    if defenseType != udg_DamageEventDefenseT then
                        call BlzSetUnitIntegerField(udg_DamageEventTarget, UNIT_IF_DEFENSE_TYPE, udg_DamageEventDefenseT) //Introduced in Damage Engine 5.2.0.0
                    endif
                    call BlzSetEventDamage(udg_DamageEventAmount)
                endif
                //call BJDebugMsg("Ready to deal " + R2S(udg_DamageEventAmount))
                set totem = true
            else
                call RunTrigs(ZERO_EVENT)
                set canKick = true
                call Finish()
            endif
        endif
        set src = null
        set tgt = null
        set inception = false
        set udg_NextDamageType = 0
        return false
    endfunction
   
    //The traditional on-damage response, where armor reduction has already been factored in.
    private function OnDamage takes nothing returns boolean
        local real r = GetEventDamage()
        //call BJDebugMsg("Second damage event running")
        if dreaming or udg_DamageEventPrevAmt == 0.00 then
            //if dreaming then
            //    call BJDebugMsg("Dreaming")
            //else
            //    call BJDebugMsg("Prev amount is zero")
            //endif
            return false
        endif
        if totem then
            set totem = false   //This should be the case in almost all circumstances
        else
            call AfterDamage() //Wrap up the outstanding damage instance
            set canKick                     = true
            //Unfortunately, Spirit Link and Thorns Aura/Spiked Carapace fire the DAMAGED event out of sequence with the DAMAGING event,
            //so I have to re-generate a buncha stuff here.
            set udg_DamageEventSource       = GetEventDamageSource()
            set udg_DamageEventTarget       = GetTriggerUnit()
            set udg_DamageEventAmount       = lastAmount
            set udg_DamageEventPrevAmt      = lastPrevAmt
            set udg_DamageEventAttackT      = GetHandleId(BlzGetEventAttackType())
            set udg_DamageEventDamageT      = GetHandleId(BlzGetEventDamageType())
            set udg_DamageEventWeaponT      = GetHandleId(BlzGetEventWeaponType())
            set udg_DamageEventType         = lastType
            set udg_IsDamageCode            = lastCode
            set udg_DamageEventArmorT       = lastArmor
            set udg_DamageEventDefenseT     = lastDefense
            set udg_DamageEventArmorPierced = lastPierced
            set armorType                   = lastPrevArmor
            set defenseType                 = lastPrevDefense
            call CalibrateMR() //Apply melee/ranged settings once again.
        endif
        call ResetArmor()
        if udg_DamageEventAmount != 0.00 and r != 0.00 then
            set udg_DamageScalingWC3 = r / udg_DamageEventAmount
        elseif udg_DamageEventAmount > 0.00 then
            set udg_DamageScalingWC3 = 0.00
        else
            set udg_DamageScalingWC3 = 1.00
            set udg_DamageScalingUser = udg_DamageEventAmount / udg_DamageEventPrevAmt
        endif
        set udg_DamageEventAmount = udg_DamageEventAmount*udg_DamageScalingWC3
       
        if udg_DamageEventAmount > 0.00 then
            //This event is used for custom shields which have a limited hit point value
            //The shield here kicks in after armor, so it acts like extra hit points.
            call RunTrigs(SHIELD_EVENT)
            set udg_LethalDamageHP = GetWidgetLife(udg_DamageEventTarget) - udg_DamageEventAmount
            if udg_LethalDamageHP <= 0.405 then
                call RunTrigs(LETHAL_EVENT) //Added 10 May 2019 to detect and potentially prevent lethal damage. Instead of
                //modifying the damage, you need to modify LethalDamageHP instead (the final HP of the unit).
               
                set udg_DamageEventAmount = GetWidgetLife(udg_DamageEventTarget) - udg_LethalDamageHP
                if udg_DamageEventType < 0 and udg_LethalDamageHP <= 0.405 then
                    call SetUnitExploded(udg_DamageEventTarget, true)   //Explosive damage types should blow up the target.
                endif
            endif
            set udg_DamageScalingUser = udg_DamageEventAmount/udg_DamageEventPrevAmt/udg_DamageScalingWC3
        endif
        call BlzSetEventDamage(udg_DamageEventAmount)   //Apply the final damage amount.
        if udg_DamageEventDamageT != udg_DAMAGE_TYPE_UNKNOWN then
            call RunTrigs(DAMAGE_EVENT)
        endif
        set eventsRun = true
        if udg_DamageEventAmount == 0.00 then
            call Finish()
        endif
        return false
    endfunction
   
    //===========================================================================
    private function Init takes nothing returns nothing
        local trigger trig = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_DAMAGED) //Thanks to this I no longer have to create an event for every unit in the map.
        call TriggerAddCondition(trig, Filter(function OnDamage))

        set trig = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_DAMAGING) //The new 1.31 event which fires before damage.
        call TriggerAddCondition(trig, Filter(function OnPreDamage))
        set trig = null
    endfunction
   
    public function DebugStr takes nothing returns nothing
        local integer i = 0
        loop
            set udg_CONVERTED_ATTACK_TYPE[i] = ConvertAttackType(i)
            exitwhen i == 6
            set i = i + 1
        endloop
        set i = 0
        loop
            set udg_CONVERTED_DAMAGE_TYPE[i] = ConvertDamageType(i)
            exitwhen i == 26
            set i = i + 1
        endloop
        set udg_AttackTypeDebugStr[0] = "SPELLS"    //ATTACK_TYPE_NORMAL in JASS
        set udg_AttackTypeDebugStr[1] = "NORMAL"    //ATTACK_TYPE_MELEE in JASS
        set udg_AttackTypeDebugStr[2] = "PIERCE"
        set udg_AttackTypeDebugStr[3] = "SIEGE"
        set udg_AttackTypeDebugStr[4] = "MAGIC"
        set udg_AttackTypeDebugStr[5] = "CHAOS"
        set udg_AttackTypeDebugStr[6] = "HERO"
       
        set udg_DamageTypeDebugStr[0]  = "UNKNOWN"
        set udg_DamageTypeDebugStr[4]  = "NORMAL"
        set udg_DamageTypeDebugStr[5]  = "ENHANCED"
        set udg_DamageTypeDebugStr[8]  = "FIRE"
        set udg_DamageTypeDebugStr[9]  = "COLD"
        set udg_DamageTypeDebugStr[10] = "LIGHTNING"
        set udg_DamageTypeDebugStr[11] = "POISON"
        set udg_DamageTypeDebugStr[12] = "DISEASE"
        set udg_DamageTypeDebugStr[13] = "DIVINE"
        set udg_DamageTypeDebugStr[14] = "MAGIC"
        set udg_DamageTypeDebugStr[15] = "SONIC"
        set udg_DamageTypeDebugStr[16] = "ACID"
        set udg_DamageTypeDebugStr[17] = "FORCE"
        set udg_DamageTypeDebugStr[18] = "DEATH"
        set udg_DamageTypeDebugStr[19] = "MIND"
        set udg_DamageTypeDebugStr[20] = "PLANT"
        set udg_DamageTypeDebugStr[21] = "DEFENSIVE"
        set udg_DamageTypeDebugStr[22] = "DEMOLITION"
        set udg_DamageTypeDebugStr[23] = "SLOW_POISON"
        set udg_DamageTypeDebugStr[24] = "SPIRIT_LINK"
        set udg_DamageTypeDebugStr[25] = "SHADOW_STRIKE"
        set udg_DamageTypeDebugStr[26] = "UNIVERSAL"

        set udg_WeaponTypeDebugStr[0]  = "NONE"     //WEAPON_TYPE_WHOKNOWS in JASS
        set udg_WeaponTypeDebugStr[1]  = "METAL_LIGHT_CHOP"
        set udg_WeaponTypeDebugStr[2]  = "METAL_MEDIUM_CHOP"
        set udg_WeaponTypeDebugStr[3]  = "METAL_HEAVY_CHOP"
        set udg_WeaponTypeDebugStr[4]  = "METAL_LIGHT_SLICE"
        set udg_WeaponTypeDebugStr[5]  = "METAL_MEDIUM_SLICE"
        set udg_WeaponTypeDebugStr[6]  = "METAL_HEAVY_SLICE"
        set udg_WeaponTypeDebugStr[7]  = "METAL_MEDIUM_BASH"
        set udg_WeaponTypeDebugStr[8]  = "METAL_HEAVY_BASH"
        set udg_WeaponTypeDebugStr[9]  = "METAL_MEDIUM_STAB"
        set udg_WeaponTypeDebugStr[10] = "METAL_HEAVY_STAB"
        set udg_WeaponTypeDebugStr[11] = "WOOD_LIGHT_SLICE"
        set udg_WeaponTypeDebugStr[12] = "WOOD_MEDIUM_SLICE"
        set udg_WeaponTypeDebugStr[13] = "WOOD_HEAVY_SLICE"
        set udg_WeaponTypeDebugStr[14] = "WOOD_LIGHT_BASH"
        set udg_WeaponTypeDebugStr[15] = "WOOD_MEDIUM_BASH"
        set udg_WeaponTypeDebugStr[16] = "WOOD_HEAVY_BASH"
        set udg_WeaponTypeDebugStr[17] = "WOOD_LIGHT_STAB"
        set udg_WeaponTypeDebugStr[18] = "WOOD_MEDIUM_STAB"
        set udg_WeaponTypeDebugStr[19] = "CLAW_LIGHT_SLICE"
        set udg_WeaponTypeDebugStr[20] = "CLAW_MEDIUM_SLICE"
        set udg_WeaponTypeDebugStr[21] = "CLAW_HEAVY_SLICE"
        set udg_WeaponTypeDebugStr[22] = "AXE_MEDIUM_CHOP"
        set udg_WeaponTypeDebugStr[23] = "ROCK_HEAVY_BASH"

        set udg_DefenseTypeDebugStr[0] = "LIGHT"
        set udg_DefenseTypeDebugStr[1] = "MEDIUM"
        set udg_DefenseTypeDebugStr[2] = "HEAVY"
        set udg_DefenseTypeDebugStr[3] = "FORTIFIED"
        set udg_DefenseTypeDebugStr[4] = "NORMAL"   //Typically deals flat damage to all armor types
        set udg_DefenseTypeDebugStr[5] = "HERO"
        set udg_DefenseTypeDebugStr[6] = "DIVINE"
        set udg_DefenseTypeDebugStr[7] = "UNARMORED"
       
        set udg_ArmorTypeDebugStr[0] = "NONE"       //ARMOR_TYPE_WHOKNOWS in JASS, added in 1.31
        set udg_ArmorTypeDebugStr[1] = "FLESH"
        set udg_ArmorTypeDebugStr[2] = "METAL"
        set udg_ArmorTypeDebugStr[3] = "WOOD"
        set udg_ArmorTypeDebugStr[4] = "ETHEREAL"
        set udg_ArmorTypeDebugStr[5] = "STONE"
    endfunction
   
    //This function exists mainly to make it easier to switch from another DDS, like PDD.
    function UnitDamageTargetEx takes unit src, unit tgt, real amt, boolean a, boolean r, attacktype at, damagetype dt, weapontype wt returns boolean
        if udg_NextDamageType == 0 then
           set udg_NextDamageType = udg_DamageTypeCode
        endif
        call UnitDamageTarget(src, tgt, amt, a, r, at, dt, wt)
        return dreaming
    endfunction
   
    public function SetupEvent takes trigger whichTrig, string var, integer index returns nothing
        local integer max = 1
        local integer off = 0
        local integer exit = 0
        local integer i
        if var == "udg_DamageModifierEvent" then //MOD_EVENT 1-4 -> Events 1-4
            if index < 3 then
                set exit = index + 1
            endif
            if nextTrig[1] == 0 then
                set nextTrig[1] = 2
                set nextTrig[2] = 3
                set trigFrozen[2] = true
                set trigFrozen[3] = true
            endif
            set max = 4
        elseif var == "udg_DamageEvent" then //DAMAGE_EVENT 1,2 -> Events 5,6
            set max = 2
            set off = 4
        elseif var == "udg_AfterDamageEvent" then //AFTER_EVENT -> Event 7
            set off = 6
        elseif var == "udg_LethalDamageEvent" then //LETHAL_EVENT -> Event 8
            set off = 7
        elseif var == "udg_AOEDamageEvent" then //AOE_EVENT -> Event 9
            set off = 8
        else
            return
        endif
        set i = IMaxBJ(IMinBJ(index, max), 1) + off
        //call BJDebugMsg("Root index: " + I2S(i))
        loop
            set index = i
            set i = nextTrig[i]
            exitwhen i == exit
        endloop
        set userTrigs = userTrigs + 1   //User list runs from index 10 and up
        set nextTrig[index] = userTrigs
        set nextTrig[userTrigs] = exit
        set userTrig[userTrigs] = whichTrig
        //call BJDebugMsg("Registered " + I2S(userTrigs) + " to " + I2S(index))
    endfunction
   
    private function PreSetup takes trigger whichTrig, string var, limitop op, real value returns nothing
        call SetupEvent(whichTrig, var, R2I(value))
    endfunction
   
    hook TriggerRegisterVariableEvent PreSetup
   
endlibrary
Damage Text and Calculations
  Events
    Game - DamageModifierEvent becomes Equal to 1.00
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        DamageEventSource Equal to Hero
        (Hero has buff Resurrection Sickness) Equal to True
      Then - Actions
        Set VariableSet DamageEventAmount = (DamageEventAmount x 0.50)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        DamageEventTarget Equal to Hero
        (Hero has buff Ensnare (Ground Custom)) Equal to True
        Or - Any (Conditions) are true
          Conditions
            (Unit-type of DamageEventSource) Equal to Giant Spider
            (Unit-type of DamageEventSource) Equal to Spider Lord
      Then - Actions
        Set VariableSet DamageEventAmount = (DamageEventAmount x 1.20)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        IsDamageSpell Equal to True
        DC_Split Equal to True
        Or - Any (Conditions) are true
          Conditions
            DamageEventTarget Equal to Bosses[3]
            (DamageEventTarget is in DC_Clones.) Equal to True
      Then - Actions
        Set VariableSet DamageEventAmount = 0.00
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Hero has an item of type |cff00ffffPower Amplifier|r) Equal to True
        IsDamageSpell Equal to True
        DamageEventSource Equal to Hero
      Then - Actions
        Set VariableSet DamageEventAmount = (DamageEventAmount x 1.20)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Hero has an item of type |cffffff00Seraphs Chalice|r) Equal to True
        (Hero has an item of type |cffffff00Wings of the Seraph|r) Equal to True
        (Hero has an item of type |cffffff00Ring of the Seraph|r) Equal to True
        (Hero has an item of type |cffffff00Feather of the Seraph|r) Equal to True
        DamageEventTarget Equal to Hero
      Then - Actions
        Set VariableSet DamageEventAmount = (DamageEventAmount x 0.75)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Hero has an item of type |cff800000Skull of Baphomet|r) Equal to True
        (Hero has an item of type |cff800000Sword of Alastor|r) Equal to True
        (Hero has an item of type |cff800000Skulls of the Four Horsemen|r) Equal to True
        (Hero has an item of type |cff800000Wand of Belphegor|r) Equal to True
        DamageEventSource Equal to Hero
      Then - Actions
        Set VariableSet DamageEventAmount = (DamageEventAmount x 1.25)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Hero has an item of type |cffffff00Seraphs Chalice|r) Equal to True
        DamageEventTarget Equal to Hero
      Then - Actions
        Set VariableSet Critchance = 5.00
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            DamageEventSource Equal to Hero
            (Hero has an item of type |cff800000Skulls of the Four Horsemen|r) Equal to True
          Then - Actions
            Set VariableSet Critchance = 20.00
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (DC_LightningOrb is alive) Equal to True
                DamageEventTarget Equal to Hero
              Then - Actions
                Set VariableSet Critchance = 0.00
              Else - Actions
                Set VariableSet Critchance = 15.00
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            DamageEventTarget Equal to Bosses[2]
            DamageEventTarget Equal to Samuel
        Or - Any (Conditions) are true
          Conditions
            (NW_Wards[1] is alive) Equal to True
            (NW_Wards[2] is alive) Equal to True
      Then - Actions
        Set VariableSet DamageEventAmount = 0.00
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Random real number between 0 and 100.00) Less than or equal to Critchance
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Hero has an item of type |cff800000Skulls of the Four Horsemen|r) Equal to True
            DamageEventSource Equal to Hero
          Then - Actions
            Set VariableSet DamageEventAmount = (DamageEventAmount x 2.10)
          Else - Actions
            Set VariableSet DamageEventAmount = (DamageEventAmount x 2.00)
        Set VariableSet FontSize = 20.00
      Else - Actions
        Set VariableSet FontSize = 10.00
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        IsDamageSpell Equal to True
      Then - Actions
        Set VariableSet FontColor[1] = 0.00
        Set VariableSet FontColor[2] = 0.00
        Set VariableSet FontColor[3] = 100.00
      Else - Actions
        Set VariableSet FontColor[1] = 100.00
        Set VariableSet FontColor[2] = 0.00
        Set VariableSet FontColor[3] = 0.00
    Set VariableSet DamageInteger = (Integer(DamageEventAmount))
    Set VariableSet TempLocation[1] = (Position of DamageEventTarget)
    Floating Text - Create floating text that reads (- + (String(DamageInteger))) at TempLocation[1] with Z offset 80.00, using font size FontSize, color (FontColor[1]%, FontColor[2]%, FontColor[3]%), and 0% transparency
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Floating Text - Set the velocity of (Last created floating text) to 250.00 towards 90.00 degrees
    Floating Text - Change (Last created floating text): Disable permanence
    Floating Text - Change the lifespan of (Last created floating text) to 1.00 seconds
    Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
Delete the Unit Indexer trigger below if you already have Unit Indexer in your map.
This trigger works in two key phases:

1) During map initialization, enumerate all units of all players to give them an index.
2) Adds a second event to itself to index new units as they enter the map.

As a unit enters the map, check for any old units that may have been removed at some point in order to free their index.
Unit Indexer
  Events
    Map initialization
  Conditions
  Actions
    Custom script: call ExecuteFunc("InitializeUnitIndexer")
    Custom script: endfunction
    -------- --------
    -------- This is the most important function - it provides an index for units as they enter the map --------
    -------- --------
    Custom script: function IndexUnit takes nothing returns boolean
    Custom script: local integer pdex = udg_UDex
    -------- --------
    -------- You can use the boolean UnitIndexerEnabled to protect some of your undesirable units from being indexed --------
    -------- - Example: --------
    -------- -- Set UnitIndexerEnabled = False --------
    -------- -- Unit - Create 1 Dummy for (Triggering player) at TempLoc facing 0.00 degrees --------
    -------- -- Set UnitIndexerEnabled = True --------
    -------- --------
    -------- You can also customize the following block - if conditions are false the (Matching unit) won't be indexed. --------
    -------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        UnitIndexerEnabled Equal to True
      Then - Actions
        -------- --------
        -------- Generate a unique integer index for this unit --------
        -------- --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            UDexRecycle Equal to 0
          Then - Actions
            Set VariableSet UDex = (UDexGen + 1)
            Set VariableSet UDexGen = UDex
          Else - Actions
            Set VariableSet UDex = UDexRecycle
            Set VariableSet UDexRecycle = UDexNext[UDex]
        -------- --------
        -------- Link index to unit, unit to index --------
        -------- --------
        Set VariableSet UDexUnits[UDex] = (Matching unit)
        Unit - Set the custom value of UDexUnits[UDex] to UDex
        -------- --------
        -------- Use a doubly-linked list to store all active indexes --------
        -------- --------
        Set VariableSet UDexPrev[UDexNext[0]] = UDex
        Set VariableSet UDexNext[UDex] = UDexNext[0]
        Set VariableSet UDexNext[0] = UDex
        -------- --------
        -------- Fire index event for UDex --------
        -------- --------
        Set VariableSet UnitIndexEvent = 0.00
        Set VariableSet UnitIndexEvent = 1.00
        Set VariableSet UnitIndexEvent = 0.00
        Custom script: set udg_UDex = pdex
      Else - Actions
    Custom script: return false
    Custom script: endfunction
    -------- --------
    -------- The next function is called each time a unit enters the map --------
    -------- --------
    Custom script: function IndexNewUnit takes nothing returns boolean
    Custom script: local integer pdex = udg_UDex
    Custom script: local integer ndex
    -------- --------
    -------- Recycle indices of units no longer in-play every (15) units created --------
    -------- --------
    Set VariableSet UDexWasted = (UDexWasted + 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        UDexWasted Equal to 15
      Then - Actions
        Set VariableSet UDexWasted = 0
        Set VariableSet UDex = UDexNext[0]
        Custom script: loop
        Custom script: exitwhen udg_UDex == 0
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Custom value of UDexUnits[UDex]) Equal to 0
          Then - Actions
            -------- --------
            -------- Remove index from linked list --------
            -------- --------
            Custom script: set ndex = udg_UDexNext[udg_UDex]
            Custom script: set udg_UDexNext[udg_UDexPrev[udg_UDex]] = ndex
            Custom script: set udg_UDexPrev[ndex] = udg_UDexPrev[udg_UDex]
            Set VariableSet UDexPrev[UDex] = 0
            -------- --------
            -------- Fire deindex event for UDex --------
            -------- --------
            Set VariableSet UnitIndexEvent = 2.00
            Set VariableSet UnitIndexEvent = 0.00
            -------- --------
            -------- Recycle the index for later use --------
            -------- --------
            Set VariableSet UDexUnits[UDex] = No unit
            Set VariableSet UDexNext[UDex] = UDexRecycle
            Set VariableSet UDexRecycle = UDex
            Custom script: set udg_UDex = ndex
          Else - Actions
            Set VariableSet UDex = UDexNext[UDex]
        Custom script: endloop
        Custom script: set udg_UDex = pdex
      Else - Actions
    -------- --------
    -------- Handle the entering unit (Matching unit) --------
    -------- --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Custom value of (Matching unit)) Equal to 0
      Then - Actions
        Custom script: call IndexUnit()
      Else - Actions
    Custom script: return false
    Custom script: endfunction
    -------- --------
    -------- The next function initializes the core of the system --------
    -------- --------
    Custom script: function InitializeUnitIndexer takes nothing returns nothing
    Custom script: local integer i = 0
    Custom script: local region re = CreateRegion()
    Custom script: local rect r = GetWorldBounds()
    Set VariableSet UnitIndexerEnabled = True
    Custom script: call RegionAddRect(re, r)
    Custom script: call TriggerRegisterEnterRegion(CreateTrigger(), re, Filter(function IndexNewUnit))
    Custom script: call RemoveRect(r)
    Custom script: set re = null
    Custom script: set r = null
    Custom script: loop
    Custom script: call GroupEnumUnitsOfPlayer(bj_lastCreatedGroup, Player(i), Filter(function IndexUnit))
    Custom script: set i = i + 1
    Custom script: exitwhen i == 16
    Custom script: endloop
    -------- --------
    -------- This is the "Unit Indexer Initialized" event, use it instead of "Map Initialization" for best results --------
    -------- --------
    Set VariableSet UnitIndexEvent = 3.00
    Set VariableSet UnitIndexEvent = 0.00
Knockback 2D version 4.2.3.1

Flying units now display special effect art attached to their "origin". Simplified the pathing check for flying units to only check for air unit pathability.

For the full list of changes, please review the Knockback 2D Spell resource on HiveWorkshop.com
Knockback 2D Config
  Events
    Game - UnitIndexEvent becomes Equal to 3.00
  Conditions
  Actions
    -------- --------
    -------- Configure things below --------
    -------- --------
    -------- Set the timeout to be used throughout the system --------
    -------- --------
    Set VariableSet K2DTimeout = (1.00 / 60.00)
    -------- --------
    -------- Robust Pathing at 0 is only safe for collision sizes 16 and lower, but requires only one SetItemPosition check per timeout. --------
    -------- -------- 1 checks collision vertically and horizontally to momentum. Uses an extra 4 SetItemPosition checks pet timeout. --------
    -------- -------- 2 checks collision diagonally with momentum. Uses a total of 9 SetItemPosition checks per timeout. --------
    -------- In any case, if the unit only has size 16 or lower collision, only one SetItemPosition check will be used for it. --------
    -------- If RobustPathing is set to 2 and the unit has 36 or less collision, it will only use the normal check of 5 SetItemPosition calls --------
    -------- The only reason to use robustness above 1 is for visual continuity - it features potentially-less glitchy movement. --------
    -------- --------
    Set VariableSet Knockback2DRobustPathing = 1
    -------- --------
    -------- Keep the friction between 0.00 and 1.00, At 0.00, friction keeps the unit at the same speed for the knockback --------
    -------- 1.00 friction will be an evenly-distributed deceleration which sees the unit slow to a complete stop --------
    -------- Friction outside of these bounds gives the knockback a boomerang-effect, so you are welcome to experiment. --------
    -------- --------
    Set VariableSet Knockback2DDefaultFriction = 1.00
    Set VariableSet Knockback2DFriction = Knockback2DDefaultFriction
    -------- --------
    -------- Determine the default bouncing behavior of units. You can set this before knocking a unit back. --------
    -------- --------
    Set VariableSet Knockback2DDefaultBounce = False
    Set VariableSet Knockback2DBounces = Knockback2DDefaultBounce
    -------- --------
    -------- Determine the default mechanics of whether a unit should be unable to move while knocked back --------
    -------- --------
    Set VariableSet Knockback2DDefaultPause = False
    Set VariableSet Knockback2DPause = Knockback2DDefaultPause
    -------- --------
    -------- Determine if surrounding trees should be killed by default or not --------
    -------- --------
    Set VariableSet Knockback2DDefaultKillTrees = False
    Set VariableSet Knockback2DKillTrees = Knockback2DDefaultKillTrees
    -------- --------
    -------- If so, how wide should the radius be? 128.00 should be the minimum if you use pathing robustness greater than 0. --------
    -------- The minimum should be 64 if you use a robustness of 0. --------
    -------- --------
    Set VariableSet Knockback2DDefaultDestRadius = 128.00
    Set VariableSet Knockback2DDestRadius = Knockback2DDefaultDestRadius
    -------- --------
    -------- The "attack" option below will destroy any valid debris, from trees to barrels to creep homes. --------
    -------- If you just want to destroy trees, change the string to: harvest --------
    -------- --------
    Set VariableSet Knockback2DTreeOrDebris = harvest
    -------- --------
    -------- 0.50 gravity will have equal ascend and decline rate, 1.00 is instant descend, 0.67 is twice as fast, 0.75 is three times as fast. --------
    -------- --------
    Set VariableSet Knockback2DDefaultGravity = 0.71
    Set VariableSet Knockback2DGravity = Knockback2DDefaultGravity
    -------- --------
    -------- Change the following to the default type of looping FX you want to have if you use Knockback Effects --------
    -------- --------
    Set VariableSet Knockback2DDefaultFX = Abilities\Spells\Items\AIlb\AIlbSpecialArt.mdl
    Set VariableSet Knockback2DLoopFX = Knockback2DDefaultFX
    -------- --------
    -------- How frequently should the effects appear per unit? This can also be customized per-knockback --------
    -------- --------
    Set VariableSet Knockback2DDefaultFXRate = 0.10
    Set VariableSet Knockback2DFXRate = Knockback2DDefaultFXRate
    -------- --------
    -------- Create an item to help verify pathing throughout the game --------
    -------- --------
    Set VariableSet CenterPoint = (Point(K2DX, K2DY))
    Item - Create Slippers of Agility +3 at CenterPoint
    Set VariableSet K2DItem = (Last created item)
    -------- --------
    -------- Create a harvest-capable unit to check if debris can be killed --------
    -------- --------
    Set VariableSet UnitIndexerEnabled = False
    Unit - Create 1.Ghoul for Neutral Passive at CenterPoint facing 0.00 degrees
    Set VariableSet K2DDebrisKiller = (Last created unit)
    -------- --------
    -------- End Configuration --------
    -------- --------
    Set VariableSet UnitIndexerEnabled = True
    Custom script: call RemoveLocation(udg_CenterPoint)
    Game - Preload Knockback2DDefaultFX
    Item - Hide K2DItem
    Unit - Hide K2DDebrisKiller
    Unit - Pause K2DDebrisKiller
    Custom script: call UnitAddAbility(udg_K2DDebrisKiller, 'Aloc')
    Set VariableSet Radians_Turn = (Radians(360.00))
    Set VariableSet Radians_QuarterTurn = (Radians(90.00))
    Set VariableSet Radians_QuarterPi = (Radians(45.00))
    Set VariableSet K2DRegion = (Entire map)
    Set VariableSet K2DMaxX = (Max X of K2DRegion)
    Set VariableSet K2DMaxY = (Max Y of K2DRegion)
    Set VariableSet K2DMinX = (Min X of K2DRegion)
    Set VariableSet K2DMinY = (Min Y of K2DRegion)
    Set VariableSet K2DMaxDestRadius = (Knockback2DDefaultDestRadius x 2.00)
    Custom script: call SetRect(udg_K2DRegion, 0.00, 0.00, udg_K2DMaxDestRadius, udg_K2DMaxDestRadius)
    Set VariableSet K2DItemsFound = False
    Set VariableSet K2DItemOffset = False
Knockback 2D Destroy
  Events
    Game - UnitIndexEvent becomes Equal to 2.00
  Conditions
    IsUnitBeingKnockedBack[UDex] Equal to True
  Actions
    -------- --------
    -------- This trigger destroys any knockback; you can execute it yourself by first setting UDex to the custom value --------
    -------- --------
    Set VariableSet IsUnitBeingKnockedBack[UDex] = False
    Set VariableSet K2DNext[K2DPrev[UDex]] = K2DNext[UDex]
    Set VariableSet K2DPrev[K2DNext[UDex]] = K2DPrev[UDex]
    Set VariableSet K2DPrev[UDex] = 0
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        K2DNext[0] Equal to 0
      Then - Actions
        Countdown Timer - Pause K2DTimer
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        K2DHeight[UDex] Not equal to 0.00
      Then - Actions
        Animation - Change Knockback2DUnit flying height to (Default flying height of Knockback2DUnit) at 0.00
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        K2DFreeze[UDex] Not equal to True
        (K2DImpact[UDex] is on) Equal to True
      Then - Actions
        Trigger - Run K2DImpact[UDex] (checking conditions)
      Else - Actions
    Set VariableSet K2DOverride[UDex] = False
    Set VariableSet K2DSource[UDex] = No unit
You can run this trigger, checking conditions if you want to play it safe.
Knockback 2D
  Events
  Conditions
    (Default movement speed of Knockback2DUnit) Not equal to 0.00
    K2DOverride[(Custom value of Knockback2DUnit)] Equal to False
  Actions
    Custom script: local integer pdex = udg_UDex
    Set VariableSet UDex = (Custom value of Knockback2DUnit)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        IsUnitBeingKnockedBack[UDex] Equal to True
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Knockback2DOverride Equal to False
          Then - Actions
            Set VariableSet K2DAngle[UDex] = (Degrees(K2DAngle[UDex]))
            Set VariableSet Knockback2DAngle = ((Knockback2DAngle + K2DAngle[UDex]) x 0.50)
            Set VariableSet Knockback2DDistance = ((K2DDistanceLeft[UDex] + Knockback2DDistance) x 0.50)
            Set VariableSet Knockback2DTime = ((K2DTimeLeft[UDex] + Knockback2DTime) x 0.50)
          Else - Actions
        Trigger - Run Knockback_2D_Destroy <gen> (ignoring conditions)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        K2DNext[0] Equal to 0
      Then - Actions
        Custom script: call ExecuteFunc("StartKnockback2DTimer")
      Else - Actions
    Set VariableSet IsUnitBeingKnockedBack[UDex] = True
    Set VariableSet K2DPrev[K2DNext[0]] = UDex
    Set VariableSet K2DNext[UDex] = K2DNext[0]
    Set VariableSet K2DNext[0] = UDex
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Knockback2DHeight Not equal to 0.00
      Then - Actions
        Set VariableSet K2DHeight[UDex] = Knockback2DHeight
        Custom script: if UnitAddAbility(udg_Knockback2DUnit, 'Amrf') then
        Custom script: call UnitRemoveAbility(udg_Knockback2DUnit, 'Amrf')
        Custom script: endif
        Animation - Change Knockback2DUnit flying height to ((Default flying height of Knockback2DUnit) + Knockback2DHeight) at ((Knockback2DHeight - (Default flying height of Knockback2DUnit)) / (Knockback2DGravity x Knockback2DTime))
        Set VariableSet K2DHeightThreshold[UDex] = ((1 - Knockback2DGravity) x Knockback2DTime)
        Set VariableSet Knockback2DHeight = 0.00
      Else - Actions
        Set VariableSet K2DHeight[UDex] = 0.00
    Custom script: set udg_K2DX = GetUnitX(udg_Knockback2DUnit)
    Custom script: set udg_K2DY = GetUnitY(udg_Knockback2DUnit)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Knockback2DPause Equal to True
      Then - Actions
        Set VariableSet K2DLastX[UDex] = K2DX
        Set VariableSet K2DLastY[UDex] = K2DY
      Else - Actions
    Set VariableSet K2DAngle[UDex] = (Radians(Knockback2DAngle))
    Set VariableSet K2DCos[UDex] = (Cos(Knockback2DAngle))
    Set VariableSet K2DSin[UDex] = (Sin(Knockback2DAngle))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Knockback2DUnit is A flying unit) Equal to True
      Then - Actions
        Set VariableSet K2DFlying[UDex] = True
      Else - Actions
        Set VariableSet K2DFlying[UDex] = False
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Knockback2DRobustPathing Greater than 0
          Then - Actions
            -------- --------
            -------- Handle the pathing checker based on the unit's collision size --------
            -------- --------
            Custom script: if not IsUnitInRangeXY(udg_Knockback2DUnit, udg_K2DX + 17, udg_K2DY, 0) then
            Set VariableSet K2DRadius[UDex] = 0
            Custom script: else
            Custom script: if not IsUnitInRangeXY(udg_Knockback2DUnit, udg_K2DX + 25, udg_K2DY, 0) then
            Set VariableSet K2DRadius[UDex] = 8
            Custom script: elseif not IsUnitInRangeXY(udg_Knockback2DUnit, udg_K2DX + 33, udg_K2DY, 0) then
            Set VariableSet K2DRadius[UDex] = 16
            Custom script: elseif not IsUnitInRangeXY(udg_Knockback2DUnit, udg_K2DX + 49, udg_K2DY, 0) then
            Set VariableSet K2DRadius[UDex] = 32
            Custom script: else
            Set VariableSet K2DRadius[UDex] = 48
            Custom script: endif
            Set VariableSet Knockback2DAngle = ((Knockback2DAngle + 90.00) mod 360.00)
            Set VariableSet K2DCosH[UDex] = (Cos(Knockback2DAngle))
            Set VariableSet K2DSinH[UDex] = (Sin(Knockback2DAngle))
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Knockback2DRobustPathing Equal to 2
                K2DRadius[UDex] Greater than 16
              Then - Actions
                Set VariableSet Knockback2DAngle = ((Knockback2DAngle + 45.00) mod 360.00)
                Set VariableSet K2DCosD1[UDex] = (Cos(Knockback2DAngle))
                Set VariableSet K2DSinD1[UDex] = (Sin(Knockback2DAngle))
                Set VariableSet Knockback2DAngle = ((Knockback2DAngle + 90.00) mod 360.00)
                Set VariableSet K2DCosD2[UDex] = (Cos(Knockback2DAngle))
                Set VariableSet K2DSinD2[UDex] = (Sin(Knockback2DAngle))
              Else - Actions
            Custom script: endif
          Else - Actions
    Set VariableSet K2DDistanceLeft[UDex] = Knockback2DDistance
    Set VariableSet Knockback2DDistance = (((1.00 + Knockback2DFriction) x Knockback2DDistance) / Knockback2DTime)
    Set VariableSet K2DFriction[UDex] = ((Knockback2DDistance / Knockback2DTime) x ((1.00 - (1 - Knockback2DFriction)) x (K2DTimeout x K2DTimeout)))
    Set VariableSet K2DVelocity[UDex] = (Knockback2DDistance x K2DTimeout)
    -------- --------
    Set VariableSet K2DKillTrees[UDex] = Knockback2DKillTrees
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Knockback2DKillTrees Equal to True
      Then - Actions
        -------- Square the radius so we don't have to use SquareRoot when comparing distance. --------
        Set VariableSet K2DDestRadius[UDex] = (Knockback2DDestRadius x Knockback2DDestRadius)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Knockback2DDestRadius x 2.00) Greater than K2DMaxDestRadius
          Then - Actions
            -------- Update the size of the enumerating rect to compensate for the desired extra radius. --------
            Set VariableSet K2DMaxDestRadius = (Knockback2DDestRadius x 2.00)
            Custom script: call SetRect(udg_K2DRegion, 0.00, 0.00, udg_K2DMaxDestRadius, udg_K2DMaxDestRadius)
          Else - Actions
        Set VariableSet Knockback2DDestRadius = Knockback2DDefaultDestRadius
      Else - Actions
    -------- --------
    Set VariableSet K2DAmphibious[UDex] = Knockback2DAmphibious
    Set VariableSet K2DBounce[UDex] = Knockback2DBounces
    Set VariableSet K2DCollision[UDex] = Knockback2DCollision
    Set VariableSet K2DFreeze[UDex] = False
    Set VariableSet K2DFXModel[UDex] = Knockback2DLoopFX
    Set VariableSet K2DFXRate[UDex] = Knockback2DFXRate
    Set VariableSet K2DFXTimeLeft[UDex] = Knockback2DFXRate
    Set VariableSet K2DImpact[UDex] = Knockback2DOnImpact
    Set VariableSet K2DOverride[UDex] = Knockback2DOverride
    Set VariableSet K2DPause[UDex] = Knockback2DPause
    Set VariableSet K2DSimple[UDex] = Knockback2DSimple
    Set VariableSet K2DSource[UDex] = Knockback2DSource
    Set VariableSet K2DTimeLeft[UDex] = Knockback2DTime
    Set VariableSet K2DUnbiasedCollision[UDex] = Knockback2DUnbiasedCollision
    Set VariableSet Knockback2DAmphibious = False
    Set VariableSet Knockback2DBounces = Knockback2DDefaultBounce
    Set VariableSet Knockback2DCollision = 0.00
    Set VariableSet Knockback2DFriction = Knockback2DDefaultFriction
    Set VariableSet Knockback2DFXRate = Knockback2DDefaultFXRate
    Set VariableSet Knockback2DGravity = Knockback2DDefaultGravity
    Set VariableSet Knockback2DKillTrees = Knockback2DDefaultKillTrees
    Set VariableSet Knockback2DLoopFX = Knockback2DDefaultFX
    Custom script: set udg_Knockback2DOnImpact = null
    Set VariableSet Knockback2DOverride = False
    Set VariableSet Knockback2DPause = Knockback2DDefaultPause
    Set VariableSet Knockback2DSimple = False
    Set VariableSet Knockback2DSource = No unit
    Set VariableSet Knockback2DUnbiasedCollision = False
    Custom script: set udg_UDex = pdex
//TESH.scrollpos=205
//TESH.alwaysfold=0
function K2DItemCheckXY takes real x, real y returns boolean
    call SetItemPosition(udg_K2DItem, x, y)
    return GetWidgetX(udg_K2DItem) == x and GetWidgetY(udg_K2DItem) == y
endfunction

function K2DItemCheckAxis takes real x, real y returns boolean
    local real x2 = x*udg_K2DRadius[udg_UDex]
    local real y2 = y*udg_K2DRadius[udg_UDex]
    set x = udg_K2DX + x2
    set y = udg_K2DY + y2
    if K2DItemCheckXY(x, y) and not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY) then
        set x = udg_K2DX - x2
        set y = udg_K2DY - y2
        return K2DItemCheckXY(x, y) and not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY)
    endif
    return false
endfunction

function K2DItemCheck takes nothing returns boolean
    local boolean result = K2DItemCheckXY(udg_K2DX, udg_K2DY)
   
    //Only perform additional pathing checks if the unit has a larger collision.
    if result and udg_Knockback2DRobustPathing > 0 and udg_K2DRadius[udg_UDex] > 0 then

        //Check horizontal axis of unit to make sure nothing is going to collide
        set result = K2DItemCheckAxis(udg_K2DCosH[udg_UDex], udg_K2DSinH[udg_UDex])
       
        //Check vertical axis of unit to ensure nothing will collide
        set result = result and K2DItemCheckAxis(udg_K2DCos[udg_UDex], udg_K2DSin[udg_UDex])
       
        if result and udg_Knockback2DRobustPathing == 2 and udg_K2DRadius[udg_UDex] > 16 then

            //Check diagonal axis of unit if more thorough pathing is desired
            set result = K2DItemCheckAxis(udg_K2DCosD1[udg_UDex], udg_K2DSinD1[udg_UDex])
            set result = result and K2DItemCheckAxis(udg_K2DCosD2[udg_UDex], udg_K2DSinD2[udg_UDex])
        endif
    endif
   
    //Reset item so it won't interfere with the map
    call SetItemPosition(udg_K2DItem, udg_K2DMaxX, udg_K2DMaxY)
    call SetItemVisible(udg_K2DItem, false)
   
    return result
endfunction

function K2DItemFilter takes nothing returns boolean
    //Check for visible items, temporarily hide them and add them to the filter.
    if IsItemVisible(GetFilterItem()) then
        call SetItemVisible(GetFilterItem(), false)
        return true
    endif
    return false
endfunction
function K2DItemCode takes nothing returns nothing
    //Perform the item-pathing check only once, then unhide those filtered items
    if not udg_K2DItemsFound then
        set udg_K2DItemsFound = true
        set udg_K2DItemOffset = K2DItemCheck()
    endif
    call SetItemVisible(GetEnumItem(), true)
endfunction

function K2DKillDest takes nothing returns nothing
    local real x
    local real y
    //Handle destruction of debris
    set bj_destRandomCurrentPick = GetEnumDestructable()
    if GetWidgetLife(bj_destRandomCurrentPick) > 0.405 and IssueTargetOrder(udg_K2DDebrisKiller, udg_Knockback2DTreeOrDebris, bj_destRandomCurrentPick) then
        set x = GetWidgetX(bj_destRandomCurrentPick) - udg_K2DX
        set y = GetWidgetY(bj_destRandomCurrentPick) - udg_K2DY
        if x*x + y*y <= udg_K2DDestRadius[udg_UDex] then
            call KillDestructable(bj_destRandomCurrentPick)
        endif
    endif
endfunction

function K2DEnumDests takes nothing returns nothing
    call MoveRectTo(udg_K2DRegion, udg_K2DX, udg_K2DY)
    if udg_K2DKillTrees[udg_UDex] then
        call SetUnitX(udg_K2DDebrisKiller, udg_K2DX)
        call SetUnitY(udg_K2DDebrisKiller, udg_K2DY)
        call EnumDestructablesInRect(udg_K2DRegion, null, function K2DKillDest)
    endif
endfunction

function Knockback2DCheckXY takes real x, real y returns boolean
    set udg_K2DX = x + udg_K2DVelocity[udg_UDex]*udg_K2DCos[udg_UDex]
    set udg_K2DY = y + udg_K2DVelocity[udg_UDex]*udg_K2DSin[udg_UDex]
    if udg_K2DSimple[udg_UDex] then
        //A "pull" effect or a missile system does not require complex pathing.
        if udg_K2DX <= udg_K2DMaxX and udg_K2DX >= udg_K2DMinX and udg_K2DY <= udg_K2DMaxY and udg_K2DY >= udg_K2DMinY then
            call K2DEnumDests()
            return true
        endif
        return false
    elseif udg_K2DFlying[udg_UDex] then
        return not IsTerrainPathable(udg_K2DX, udg_K2DY, PATHING_TYPE_FLYABILITY)
    elseif not IsTerrainPathable(udg_K2DX, udg_K2DY, PATHING_TYPE_WALKABILITY) then
        call K2DEnumDests()
        set udg_K2DItemOffset = false
        call EnumItemsInRect(udg_K2DRegion, Filter(function K2DItemFilter), function K2DItemCode)
        if udg_K2DItemsFound then
            //If items were found, the check was already performed.
            set udg_K2DItemsFound = false
        else
            //Otherwise, perform the check right now.
            set udg_K2DItemOffset = K2DItemCheck()
        endif
        return udg_K2DItemOffset
    endif
    return udg_K2DAmphibious[udg_UDex] and not IsTerrainPathable(udg_K2DX, udg_K2DY, PATHING_TYPE_FLOATABILITY)
endfunction

function Knockback2DApplyAngle takes real angle returns nothing
    set angle = ModuloReal(angle, udg_Radians_Turn)
    set udg_K2DCos[udg_UDex] = Cos(angle)
    set udg_K2DSin[udg_UDex] = Sin(angle)
    set udg_K2DAngle[udg_UDex] = angle
    if udg_Knockback2DRobustPathing > 0 then
        set angle = ModuloReal(angle + udg_Radians_QuarterTurn, udg_Radians_Turn)
        set udg_K2DCosH[udg_UDex] = Cos(angle)
        set udg_K2DSinH[udg_UDex] = Sin(angle)
        if udg_Knockback2DRobustPathing == 2 and udg_K2DRadius[udg_UDex] > 16 then
            set angle = ModuloReal(angle + udg_Radians_QuarterPi, udg_Radians_Turn)
            set udg_K2DCosD1[udg_UDex] = Cos(angle)
            set udg_K2DSinD1[udg_UDex] = Sin(angle)
            set angle = ModuloReal(angle + udg_Radians_QuarterTurn, udg_Radians_Turn)
            set udg_K2DCosD2[udg_UDex] = Cos(angle)
            set udg_K2DSinD2[udg_UDex] = Sin(angle)
        endif
    endif
endfunction

function Knockback2DLooper takes nothing returns nothing
    local integer i = 0
    local unit u
    local real x
    local real y
   
    call PauseUnit(udg_K2DDebrisKiller, false)
   
    loop
        set i = udg_K2DNext[i]
        exitwhen i == 0
        set udg_UDex = i
        set udg_K2DTimeLeft[i] = udg_K2DTimeLeft[i] - udg_K2DTimeout
        set udg_K2DDistanceLeft[i] = udg_K2DDistanceLeft[i] - udg_K2DVelocity[i]
        set u = udg_UDexUnits[i]
       
        if udg_K2DTimeLeft[i] > 0.00 then
            if udg_K2DTimeLeft[i] < udg_K2DHeightThreshold[i] and udg_K2DHeightThreshold[i] != 0.00 then
                call SetUnitFlyHeight(u, GetUnitDefaultFlyHeight(u), GetUnitFlyHeight(u) - GetUnitDefaultFlyHeight(u)/udg_K2DHeightThreshold[i])
                set udg_K2DHeightThreshold[i] = 0.00
            endif
            if udg_K2DPause[i] then
                set x = udg_K2DLastX[i]
                set y = udg_K2DLastY[i]
            else
                set x = GetUnitX(u)
                set y = GetUnitY(u)
            endif
           
            if not Knockback2DCheckXY(x, y) then
                if not udg_K2DFreeze[i] and IsTriggerEnabled(udg_K2DImpact[i]) and TriggerEvaluate(udg_K2DImpact[i]) then
                    call TriggerExecute(udg_K2DImpact[i])
                endif
                if udg_K2DBounce[i] then
                    call Knockback2DApplyAngle(udg_Radians_Turn - udg_K2DAngle[i])
                    if not Knockback2DCheckXY(x, y) then
                        call Knockback2DApplyAngle(udg_K2DAngle[i] + bj_PI)
                        if not Knockback2DCheckXY(x, y) then
                            call Knockback2DApplyAngle(udg_Radians_Turn - udg_K2DAngle[i])
                            set udg_K2DX = x
                            set udg_K2DY = y
                        endif
                    endif
                else
                    set udg_K2DX = x
                    set udg_K2DY = y
                    set udg_K2DFreeze[i] = true
                endif
            endif
            call SetUnitX(u, udg_K2DX)
            call SetUnitY(u, udg_K2DY)
            set udg_K2DLastX[i] = udg_K2DX
            set udg_K2DLastY[i] = udg_K2DY
            if udg_K2DFXModel[i] != "" then
                set udg_K2DFXTimeLeft[i] = udg_K2DFXTimeLeft[i] - udg_K2DTimeout
                if udg_K2DFXTimeLeft[i] <= 0.00 then
                    set udg_K2DFXTimeLeft[i] = udg_K2DFXRate[i]
                    if udg_K2DFlying[i] then
                        call DestroyEffect(AddSpecialEffectTarget(udg_K2DFXModel[i], u, "origin"))
                    else
                        call DestroyEffect(AddSpecialEffect(udg_K2DFXModel[i], udg_K2DX, udg_K2DY))
                    endif
                endif
            endif
            if udg_K2DCollision[i] >= 0.00 then
                set udg_Knockback2DSource = u
                call GroupEnumUnitsInRange(bj_lastCreatedGroup, udg_K2DX, udg_K2DY, 200.00, null)
                call GroupRemoveUnit(bj_lastCreatedGroup, u)
                loop
                    set udg_Knockback2DUnit = FirstOfGroup(bj_lastCreatedGroup)
                    exitwhen udg_Knockback2DUnit == null
                    call GroupRemoveUnit(bj_lastCreatedGroup, udg_Knockback2DUnit)
                   
                    if IsUnitInRange(udg_Knockback2DUnit, u, udg_K2DCollision[i]) and udg_K2DFlying[i] == IsUnitType(udg_Knockback2DUnit, UNIT_TYPE_FLYING) and (not IsUnitType(udg_Knockback2DUnit, UNIT_TYPE_STRUCTURE)) and not IsUnitType(udg_Knockback2DUnit, UNIT_TYPE_DEAD) and (udg_K2DUnbiasedCollision[i] or IsUnitAlly(udg_Knockback2DUnit, GetOwningPlayer(u))) and TriggerEvaluate(gg_trg_Knockback_2D) then
                        set udg_Knockback2DAngle = bj_RADTODEG * Atan2(GetUnitY(udg_Knockback2DUnit) - udg_K2DY, GetUnitX(udg_Knockback2DUnit) - udg_K2DX)
                        set udg_Knockback2DDistance = udg_K2DDistanceLeft[i]
                        set udg_Knockback2DBounces = udg_K2DBounce[i]
                        set udg_Knockback2DCollision = udg_K2DCollision[i]
                        if udg_K2DHeight[i] != 0.00 then
                            set udg_Knockback2DHeight = GetUnitFlyHeight(u) - GetUnitDefaultFlyHeight(u)
                        endif
                        set udg_Knockback2DLoopFX = udg_K2DFXModel[i]
                        set udg_Knockback2DTime = udg_K2DTimeLeft[i]
                        set udg_Knockback2DUnbiasedCollision = udg_K2DUnbiasedCollision[i]
                        call TriggerExecute(gg_trg_Knockback_2D)
                        set udg_Knockback2DSource = u //in case of a recursive knockback
                    endif
                endloop
            endif
            set udg_K2DVelocity[i] = udg_K2DVelocity[i] - udg_K2DFriction[i]
        else
            call TriggerExecute(gg_trg_Knockback_2D_Destroy)
        endif
    endloop
    set u = null
   
    //Disable dummy after the loop finishes so it doesn't interfere with the map
    call PauseUnit(udg_K2DDebrisKiller, true)
endfunction

//===========================================================================
function StartKnockback2DTimer takes nothing returns nothing
    call TimerStart(udg_K2DTimer, udg_K2DTimeout, true, function Knockback2DLooper)
endfunction
function InitTrig_Knockback_2D_System takes nothing returns nothing
endfunction
Using the event K2DTimer expires ensures your onLoop triggers only run when a knockback is running.
K2D OnLoop Template
  Events
    Time - K2DTimer expires
  Conditions
  Actions
    Set VariableSet LoopInt = K2DNext[0]
    Custom script: loop
    Custom script: exitwhen udg_LoopInt == 0
    -------- --------
    -------- Put your stuff that you want to happen every K2DTimeout seconds here. To reference the knocked back unit, use UDexUnits[LoopInt] --------
    -------- --------
    Set VariableSet LoopInt = K2DNext[LoopInt]
    Custom script: endloop
Map Initialization
  Events
  Conditions
  Actions
    Set VariableSet SkipCinematic[1] = False
    Trigger - Turn off Skip_Intro_Kill_Switch <gen>
    Animation - Play the hide (animationname) animation for all doodads of type D010 (doodadcode) within Region_124 <gen>.
    Animation - Play the hide (animationname) animation for all doodads of type D010 (doodadcode) within Boss_Soul_Region_4 <gen>.
    Animation - Play the hide (animationname) animation for all doodads of type D02F (doodadcode) within Region_124 <gen>.
    Animation - Play the hide (animationname) animation for all doodads of type D02G (doodadcode) within Boss_Soul_Region_4 <gen>.
    Animation - Play the show (animationname) animation for all doodads of type D010 (doodadcode) within Camera_Bounds <gen>.
    Camera - Reset camera for Player 1 (Red) to standard game-view over 0 seconds
    Camera - Lock camera target for Player 1 (Red) to Hero, offset by (0, 100.00) using Default rotation
    Selection - Select Hero for Player 1 (Red)
    Quest - Display to (All players) the Hint message: Click on the '|cffd45e19QUEST LOG|r' or press '|cffd45e19F9|r' to read important game information.Made by |cffd45e19FeelsGoodMan |rfor |cffd45e19Hiveworkshop|r's 16th mini map contest.
    Camera - Set the camera bounds for Player 1 (Red) to Camera_Bounds <gen>
    Cinematic - Fade in over 4.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Trigger - Turn on Camera_Height_1 <gen>
    Wait 4.00 seconds
    Cinematic - Turn cinematic mode Off for (All players)
    Selection - Select Hero for Player 1 (Red)
    Unit - Set mana of Hero to 0
    Trigger - Run Show_Movement_Dialog <gen> (ignoring conditions)
Intro Cinematic
  Events
    Map initialization
  Conditions
  Actions
    Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)
    Sound - Disable dawn and dusk sounds
    Game - Turn the day/night cycle Off
    Sound - Stop music After fading
    Sound - Clear the music list
    Set VariableSet Playlist = war3mapImported\Dante1.mp3;war3mapImported\Dante2.mp3;war3mapImported\Dante3.mp3;war3mapImported\Dante4.mp3;war3mapImported\Dante5.mp3;war3mapImported\Dante6.mp3
    Set VariableSet Playlist2 = war3mapImported\Boss1.mp3;war3mapImported\Boss2.mp3;war3mapImported\Boss3.mp3
    Custom script: call SetMapMusic(udg_Playlist, false, 0)
    Animation - Play the hide (animationname) animation for all doodads of type D010 (doodadcode) within Camera_Bounds <gen>.
    Cinematic - Fade out over 0.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Cinematic - Turn on letterbox mode (hide interface) for (All players): fade out over 0.00 seconds
    Environment - Set fog to style Linear, z-start 0.00, z-end 600.00, density 0.50 and color (0.00%, 0.00%, 0.00%)
    Visibility - Enable fog of war
    Set VariableSet SkipCinematic[1] = True
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Wait 2 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Game - Display to (All players) for 5.00 seconds the text: The world of men is over.
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Wait 8.50 seconds
    Cinematic - Clear the screen of text messages for (All players).
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Game - Display to (All players) for 6.00 seconds the text: After years of war against demons, humanity eventually lost.
    Wait 9.50 seconds
    Cinematic - Clear the screen of text messages for (All players).
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Game - Display to (All players) for 8.00 seconds the text: Darkness engulfed the world, and the realm of men is now a desolate place, void of life or warmth.
    Wait 12.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_23 <gen>)
    Sound - Play Lightning_1 <gen> at 100% volume, located at TempLocation[1] with Z offset 0
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.40 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_23 <gen>)
    Sound - Play Intro_Lightning_Loop <gen> at 100% volume, located at TempLocation[1] with Z offset 0
    Set VariableSet IntroLoop = (Last played sound)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Camera - .Apply. gg_cam_Camera_014 for Player 1 (Red) over 0 seconds
    Camera - .Apply. gg_cam_Camera_015 for Player 1 (Red) over 600.00 seconds
    Cinematic - Fade out over 0.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Cinematic - Fade in over 3.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Wait 10.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Camera_015 for Player 1 (Red) over 40.00 seconds
    Wait 25.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 4.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 4.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Environment - Set fog to style Linear, z-start 0.00, z-end 500.00, density 0.50 and color (0.00%, 0.00%, 0.00%)
    Camera - .Apply. gg_cam_Camera_016 for Player 1 (Red) over 0 seconds
    Cinematic - Fade in over 2.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 5.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 4.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 4.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Camera_018 for Player 1 (Red) over 0 seconds
    Cinematic - Fade in over 4.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 6.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 4.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 4.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Camera_017 for Player 1 (Red) over 0 seconds
    Cinematic - Fade in over 4.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 6.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 5.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 5.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Environment - Set fog to style Linear, z-start 0.00, z-end 1000.00, density 0.50 and color (0.00%, 0.00%, 0.00%)
    Cinematic - Fade in over 5.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Camera - .Apply. gg_cam_Camera_019 for Player 1 (Red) over 0 seconds
    Wait 2 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_23 <gen>)
    Sound - Play Lightning_2 <gen> at 100% volume, located at TempLocation[1] with Z offset 0
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.30 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 0.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Cinematic - Fade in over 3.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Wait 1.50 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Spawn_Angel_Region <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Ebb.mdx
    Set VariableSet SeraphielEffect[1] = (Last created special effect)
    Sound - Play Combined <gen> at 60.00% volume, located at TempLocation[1] with Z offset 0
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 4.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Spawn_Angel_Region <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\HolyAurora.MDX
    Set VariableSet SeraphielEffect[2] = (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 3.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Special Effect - Destroy SeraphielEffect[1]
    Special Effect - Destroy SeraphielEffect[2]
    Set VariableSet TempLocation[1] = (Center of Spawn_Angel_Region <gen>)
    Unit - Create 1.Seraphiel for Neutral Passive at TempLocation[1] facing 204.36 degrees
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\LevelupCaster.MDX
    Special Effect - Destroy (Last created special effect)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Heal.mdx
    Special Effect - Set Scale of (Last created special effect) to 1.50
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Animation - Play (Last created unit)'s Birth (animationname) animation
    Special Effect - Create a special effect attached to the chest (attachpoint) of (Last created unit) using war3mapImported\Wings (6) SMALLER.mdx
    Special Effect - Create a special effect attached to the chest (attachpoint) of (Last created unit) using war3mapImported\OmniLightOrangeSmall.mdx
    Animation - Queue (Last created unit)'s stand (animationname) animation
    Set VariableSet Seraphiel = (Last created unit)
    Camera - Shake the camera for Player 1 (Red) with magnitude 5.00
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Camera - Stop swaying/shaking the camera for Player 1 (Red).
    Wait 8.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Move_to_Region <gen>)
    Unit - Order Seraphiel to Move To.TempLocation[1]
    Custom script: call RemoveLocation (udg_TempLocation[1])
Intro Enter region
  Events
    Unit - A unit enters Angel_Camera_Pan <gen>
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Camera - .Apply. gg_cam_Camera_022 for Player 1 (Red) over 0 seconds
    Camera - .Apply. gg_cam_Camera_023 for Player 1 (Red) over 6.00 seconds
Intro Enter region 2
  Events
    Unit - A unit enters Angel_Move_to_Region <gen>
  Conditions
  Actions
    Trigger - Turn off (This trigger)
    Wait 4.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Animation - Reset Seraphiel's animation
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Animation - Play Seraphiel's Spell (animationname) animation
    Wait 0.40 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Animation - Change Seraphiel's animation speed to 0.00% of its original speed
    Special Effect - Create a special effect attached to the weapon (attachpoint) of Seraphiel using war3mapImported\Shining Flare.mdx
    Special Effect - Destroy (Last created special effect)
    Special Effect - Create a special effect attached to the weapon (attachpoint) of Seraphiel using war3mapImported\Radiance Holy.mdx
    Set VariableSet SeraphielEffect[1] = (Last created special effect)
    Set VariableSet TempLocation[1] = (Center of Angel_Move_to_Region <gen>)
    Sound - Play AngelSpell2 <gen> at 100% volume, located at TempLocation[1] with Z offset 0
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Camera - Shake the camera for Player 1 (Red) with magnitude 10.00
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Camera - Stop swaying/shaking the camera for Player 1 (Red).
    Wait 0.90 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_8 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[1] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_9 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[2] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_7 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[3] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_48 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[4] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_5 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[5] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_6 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[6] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_1 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[7] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_2 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[8] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_4 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[9] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_3 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[10] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_49 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[11] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_50 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[12] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_10 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[13] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_11 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[14] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_13 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[15] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_24 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[16] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_23 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[17] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_21 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[18] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_22 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[19] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_20 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[20] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_17 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[21] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_16 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[22] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_18 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[23] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_19 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[24] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_15 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[25] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_14 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[26] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_52 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[27] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_51 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[28] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_46 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[29] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_47 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[30] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_54 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[31] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_53 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[32] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_30 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[33] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_31 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[34] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_32 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[35] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_27 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[36] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_26 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[37] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_25 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[38] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_28 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[39] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_29 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[40] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_35 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[41] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_36 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[42] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_34 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[43] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_33 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[44] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_40 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[45] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_43 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[46] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_42 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[47] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_45 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[48] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_44 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[49] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_38 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[50] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_37 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[51] = (Last created special effect)
    Wait 0.10 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    -------- ------------- --------
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_39 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Radiance Holy.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet SkeletonEffect[52] = (Last created special effect)
    -------- ------------- --------
    Wait 2.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 2.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 2.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Trigger - Run Intro_Cinematic_Souls <gen> (ignoring conditions)
Intro Cinematic Souls
  Events
  Conditions
  Actions
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Environment - Set fog to style Linear, z-start 50.00, z-end 3250.00, density 0.50 and color (0.00%, 0.00%, 0.00%)
    Camera - .Apply. gg_cam_Camera_024 for Player 1 (Red) over 0 seconds
    Camera - .Apply. gg_cam_Camera_025 for Player 1 (Red) over 20.00 seconds
    Cinematic - Fade in over 2.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 2.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Special Effect - Destroy SkeletonEffect[1]
    Special Effect - Destroy SkeletonEffect[2]
    Special Effect - Destroy SkeletonEffect[3]
    Special Effect - Destroy SkeletonEffect[4]
    Special Effect - Destroy SkeletonEffect[5]
    Special Effect - Destroy SkeletonEffect[6]
    Special Effect - Destroy SkeletonEffect[7]
    Special Effect - Destroy SkeletonEffect[8]
    Special Effect - Destroy SkeletonEffect[9]
    Special Effect - Destroy SkeletonEffect[10]
    Special Effect - Destroy SkeletonEffect[11]
    Special Effect - Destroy SkeletonEffect[12]
    Special Effect - Destroy SkeletonEffect[13]
    Special Effect - Destroy SkeletonEffect[14]
    Special Effect - Destroy SkeletonEffect[15]
    Special Effect - Destroy SkeletonEffect[16]
    Special Effect - Destroy SkeletonEffect[17]
    Special Effect - Destroy SkeletonEffect[18]
    Special Effect - Destroy SkeletonEffect[19]
    Special Effect - Destroy SkeletonEffect[20]
    Special Effect - Destroy SkeletonEffect[21]
    Special Effect - Destroy SkeletonEffect[22]
    Special Effect - Destroy SkeletonEffect[23]
    Special Effect - Destroy SkeletonEffect[24]
    Special Effect - Destroy SkeletonEffect[25]
    Special Effect - Destroy SkeletonEffect[26]
    Special Effect - Destroy SkeletonEffect[27]
    Special Effect - Destroy SkeletonEffect[28]
    Special Effect - Destroy SkeletonEffect[29]
    Special Effect - Destroy SkeletonEffect[30]
    Special Effect - Destroy SkeletonEffect[31]
    Special Effect - Destroy SkeletonEffect[32]
    Special Effect - Destroy SkeletonEffect[33]
    Special Effect - Destroy SkeletonEffect[34]
    Special Effect - Destroy SkeletonEffect[35]
    Special Effect - Destroy SkeletonEffect[36]
    Special Effect - Destroy SkeletonEffect[37]
    Special Effect - Destroy SkeletonEffect[38]
    Special Effect - Destroy SkeletonEffect[39]
    Special Effect - Destroy SkeletonEffect[40]
    Special Effect - Destroy SkeletonEffect[41]
    Special Effect - Destroy SkeletonEffect[42]
    Special Effect - Destroy SkeletonEffect[43]
    Special Effect - Destroy SkeletonEffect[44]
    Special Effect - Destroy SkeletonEffect[45]
    Special Effect - Destroy SkeletonEffect[46]
    Special Effect - Destroy SkeletonEffect[47]
    Special Effect - Destroy SkeletonEffect[48]
    Special Effect - Destroy SkeletonEffect[49]
    Special Effect - Destroy SkeletonEffect[50]
    Special Effect - Destroy SkeletonEffect[51]
    Special Effect - Destroy SkeletonEffect[52]
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_1 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_2 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_3 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_4 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_5 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_6 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_7 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_8 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_9 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_10 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_11 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_12 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_13 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_14 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_15 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_16 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_17 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_18 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_19 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_20 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_21 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_22 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_23 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_24 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_25 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_26 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_27 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_28 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_29 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_30 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_31 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_32 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_33 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_34 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_35 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_36 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_37 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Animation - Change Seraphiel's animation speed to 100% of its original speed
    Animation - Queue Seraphiel's stand (animationname) animation
    Special Effect - Destroy SeraphielEffect[1]
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_38 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_39 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_40 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_41 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_42 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_43 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_44 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_45 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_46 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_47 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_48 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_49 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_50 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_51 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_52 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_53 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_54 <gen>)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Cinematic - Fade out over 2 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 2.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Environment - Set fog to style Linear, z-start 0.00, z-end 1000.00, density 0.50 and color (0.00%, 0.00%, 0.00%)
    Trigger - Run Intro_Cinematic_Spawn_Spirit <gen> (ignoring conditions)
Intro Cinematic Spawn Spirit
  Events
  Conditions
  Actions
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade in over 2 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Camera - .Apply. gg_cam_Camera_026 for Player 1 (Red) over 0 seconds
    Wait 2 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Spawn_Spirit_Region <gen>)
    Unit - Create 1.Spirit of Hatred for Player 1 (Red) at TempLocation[1] facing 359.97 degrees
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Set VariableSet Hero = (Last created unit)
    Set VariableSet HeroTransparency = 100.00
    Animation - Change Hero's vertex coloring to (100%, 100%, 100%) with 100.00% transparency
    Trigger - Turn on Set_Hero_Transparency <gen>
    Trigger - Turn on Intro_Spawn_Souls <gen>
    Wait 2 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_23 <gen>)
    Sound - Play Lightning_1 <gen> at 100% volume, located at TempLocation[1] with Z offset 0
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Wait 0.40 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 0.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Cinematic - Fade in over 3.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
Set Hero Transparency
  Events
    Time - Every 0.05 seconds of game time
  Conditions
  Actions
    Set VariableSet HeroTransparency = (HeroTransparency - 1)
    Animation - Change Hero's vertex coloring to (100%, 100%, 100%) with HeroTransparency% transparency
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        HeroTransparency Equal to 0.00
      Then - Actions
        Trigger - Turn off (This trigger)
        Trigger - Turn off Intro_Spawn_Souls <gen>
        Trigger - Run Intro_Cinematic_Angel_and_Spirit_Dialogue <gen> (ignoring conditions)
      Else - Actions
Default melee game initialization for all players
Intro Spawn Souls
  Events
    Time - Every 0.50 seconds of game time
  Conditions
  Actions
    Set VariableSet TempLocation[1] = (Center of Spawn_Spirit_Region <gen>)
    Set VariableSet TempLocation[2] = (TempLocation[1] offset by (Random real number between 0 and 75.00) towards (Random real number between 0 and 360.00) degrees.)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\undeaddissipate2.mdx
    Special Effect - Set Height of (Last created special effect) to: (Random real number between 500.00 and 600.00)
    Special Effect - Set Orientation of (Last created special effect) to yaw: 0.00, pitch: 600.00, roll: 0.00
    Special Effect - Destroy (Last created special effect)
    Custom script: call RemoveLocation (udg_TempLocation[1])
Intro Cinematic Angel and Spirit Dialogue
  Events
  Conditions
  Actions
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play SS11 <gen> and display W. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display Wh. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display Wha. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display What. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display What a. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display What am. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display What am I. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display What am I?. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display What am I?.. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display What am I?... Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display What am I?.... Modify duration: Set to 4.00 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_1 <gen> and display You are what remains of a defeated race.. Modify duration: Set to 1.50 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Camera_027 for Player 1 (Red) over 0 seconds
    Camera - .Apply. gg_cam_Camera_028 for Player 1 (Red) over 40.00 seconds
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play No sound and display You are what remains of a defeated race.. Modify duration: Set to 1.50 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_2 <gen> and display You are pure hatred in both mind and spirit. Humanity is your progenitor, and you are simply a manifestation of their collective anger.. Modify duration: Set to 9.50 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_4 <gen> and display I am Seraphiel, leader of the Seraphs, and the one who will make sure you have your vengeance.. Modify duration: Set to 3.20 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Camera_029 for Player 1 (Red) over 0 seconds
    Camera - .Apply. gg_cam_Camera_030 for Player 1 (Red) over 80.00 seconds
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play No sound and display I am Seraphiel, leader of the Seraphs, and the one who will make sure you have your vengeance.. Modify duration: Set to 3.00 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play SS12 <gen> and display All the voices in my head. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display All the voices in my head.. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display All the voices in my head... Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display All the voices in my head.... Modify duration: Set to 2.50 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display Are they dead?. Modify duration: Set to 2.70 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_5 <gen> and display They are souls, eternally damned in Sheol.. Modify duration: Set to 4.00 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_6 <gen> and display You can hear their anger, because you were born from it.. Modify duration: Set to 4.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_7 <gen> and display When the door to Sheol opened we Seraphs were too slow to close it as we met heavy resistance.. Modify duration: Set to 6.30 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_8 <gen> and display Now that all human souls are trapped in Sheol we angels are working hard to free them, but there is one problem. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play No sound and display Now that all human souls are trapped in Sheol we angels are working hard to free them, but there is one problem.. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play No sound and display Now that all human souls are trapped in Sheol we angels are working hard to free them, but there is one problem... Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play No sound and display Now that all human souls are trapped in Sheol we angels are working hard to free them, but there is one problem.... Modify duration: Set to 3.60 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_23 <gen>)
    Sound - Play Lightning_1 <gen> at 100% volume, located at TempLocation[1] with Z offset 0
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play No sound and display Now that all human souls are trapped in Sheol we angels are working hard to free them, but there is one problem.... Modify duration: Set to 0.40 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 0.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Cinematic - Fade in over 3.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play No sound and display Now that all human souls are trapped in Sheol we angels are working hard to free them, but there is one problem.... Modify duration: Set to 3.30 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_9 <gen> and display We can't enter Sheol.. Modify duration: Set to 2.50 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_10 <gen> and display Even if we forced their gates open and stepped inside we would instantly cease to be.. Modify duration: Set to 3.00 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Camera - .Apply. gg_cam_Camera_035 for Player 1 (Red) over 0 seconds
    Camera - .Apply. gg_cam_Camera_036 for Player 1 (Red) over 80.00 seconds
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play No sound and display Even if we forced their gates open and stepped inside we would instantly cease to be.. Modify duration: Set to 2.70 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play SS13 <gen> and display So. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display So.. Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display So... Modify duration: Set to 0.10 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display So.... Modify duration: Set to 1.50 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display So... You want me to go to Sheol?. Modify duration: Set to 3.00 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_11 <gen> and display That is the only way you can be truly free. . Modify duration: Set to 3.40 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play SS14 <gen> and display My whole being screams for vengeance. . Modify duration: Set to 4.60 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play SS15 <gen> and display If the demons are responsible for this unbearable suffering then I will go into the deepest pits of hell and deliver retribution to them all.. Modify duration: Set to 6.00 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of Angel_Skeleton_Effects_23 <gen>)
    Sound - Play Lightning_2 <gen> at 100% volume, located at TempLocation[1] with Z offset 0
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display If the demons are responsible for this unbearable suffering then I will go into the deepest pits of hell and deliver retribution to them all.. Modify duration: Set to 0.40 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Fade out over 0.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Cinematic - Fade in over 3.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play No sound and display If the demons are responsible for this unbearable suffering then I will go into the deepest pits of hell and deliver retribution to them all.. Modify duration: Set to 3.60 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_12 <gen> and display It is settled then.. Modify duration: Set to 2.00 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_13 <gen> and display I will teleport you into purgatory, from there on you have to find the entrance to Sheol.. Modify duration: Set to 5.50 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Hero named Unnamed: Play SS16 <gen> and display I will do what I have to, show me the way.. Modify duration: Set to 5.50 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Cinematic - Send transmission to (All players) from Seraphiel named Seraphiel: Play Seraphiel_Intro_14 <gen> and display May light illuminate your path. Carry out your task without fail so humanity will get salvation.. Modify duration: Set to 7.30 seconds and Wait
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Animation - Reset Seraphiel's animation
    Wait 0.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Animation - Play Seraphiel's Spell (animationname) animation
    Animation - Queue Seraphiel's stand (animationname) animation
    Wait 0.50 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Position of Hero)
    Special Effect - Create a special effect at TempLocation[1] using war3mapImported\Soul Discharge Blue.mdx
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Special Effect - Destroy (Last created special effect)
    Cinematic - Fade out over 4.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Wait 0.20 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Unit - Remove Hero from the game
    Wait 1.00 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Sound - Stop IntroLoop After fading
    Wait 2.80 seconds
    If (SkipCinematic[1] Equal to False) then do (Skip remaining actions) else do (Do nothing)
    Set VariableSet TempLocation[1] = (Center of (Playable map area))
    Sound - Play CEAmbience <gen> at 70.00% volume, located at TempLocation[1] with Z offset 0
    Custom script: call RemoveLocation (udg_TempLocation[1])
    Environment - Set fog to style Linear, z-start 200.00, z-end 3250.00, density 0.50 and color (3.92%, 0.00%, 3.92%)
    Cinematic - Fade in over 4.00 seconds using texture Black Mask and color (0%, 0%, 0%) with 0% transparency
    Unit - Remove Seraphiel from the game
    Set VariableSet Hero = Spirit of Hatred 0001 <gen>
    Unit - Hide Hero
    Camera - .Apply. gg_cam_Camera_033 for Player 1 (Red) over 0 seconds
    Camera - .Apply. gg_cam_Camera_034 for Player 1 (Red) over 30.00 seconds
    Wait 6.00 seconds