variables { global: 0: isDebug player: 0: isInLastStand 1: isKillWhileLastStand 2: isLastStandAvailable } subroutines { 0: modifyPlayerStatOnEnterLastStand 1: modifyPlayerStatOnEndLastStand } rule("Activate/Deactivate Debug-Rules") { event { Ongoing - Global; } actions { Global.isDebug = True; } } rule("DEBUG Short Assemble Heroes") { event { Ongoing - Each Player; All; All; } conditions { Is Assembling Heroes == True; Global.isDebug == True; } actions { Set Match Time(5); } } rule("DEBUG - manipulate Game Time") { event { Ongoing - Each Player; All; All; } conditions { (Is Button Held(Event Player, Interact) && Is Button Held(Event Player, Crouch)) == True; Host Player == True; Global.isDebug == True; } actions { Set Match Time(5); } } rule("DEBUG - HUD") { event { Ongoing - Each Player; All; All; } conditions { Is Game In Progress == True; Global.isDebug == True; } actions { Create HUD Text(Event Player, Custom String("isInLastStand"), Event Player.isInLastStand, Null, Left, 0, White, White, White, Visible To and String, Default Visibility); Create HUD Text(Event Player, Custom String("isKillWhileLastStand"), Event Player.isKillWhileLastStand, Null, Left, 0, White, White, White, Visible To and String, Default Visibility); Create HUD Text(Event Player, Custom String("isLastStandAvailable"), Event Player.isLastStandAvailable, Null, Left, 0, White, White, White, Visible To and String, Default Visibility); } } rule("Init Player Var") { event { Ongoing - Each Player; All; All; } conditions { Is Game In Progress == True; } actions { Event Player.isInLastStand = False; Event Player.isKillWhileLastStand = False; Event Player.isLastStandAvailable = True; } } rule("Last Stand on death") { event { Player Died; All; All; } conditions { Attacker != Null; Event Player.isInLastStand == False; Event Player.isLastStandAvailable == True; } actions { Wait(1, Ignore Condition); Call Subroutine(modifyPlayerStatOnEnterLastStand); Event Player.isInLastStand = True; Event Player.isLastStandAvailable = False; Big Message(Event Player, Custom String("LAST STAND - KILL ANY ENEMY IN 5s TO SURVIVE")); Resurrect(Event Player); Create Effect(All Players(Team Of(Event Player)), Good Aura Sound, Purple, Event Player, 1, Visible To Position and Radius); Create Effect(All Players(Opposite Team Of(Team Of(Event Player))), Bad Aura Sound, Purple, Event Player, 1, Visible To Position and Radius); Create Effect(All Players(Team Of(Event Player)), Good Aura, Purple, Event Player, 1, Visible To Position and Radius); Create Effect(All Players(Opposite Team Of(Team Of(Event Player))), Bad Aura, Purple, Event Player, 1, Visible To Position and Radius); Wait(5, Ignore Condition); Skip If(Event Player.isKillWhileLastStand == True, 4); Call Subroutine(modifyPlayerStatOnEndLastStand); Kill(Event Player, Null); Destroy All Effects; Wait(0.500, Ignore Condition); Event Player.isInLastStand = False; Event Player.isKillWhileLastStand = False; } } rule("Player got Kill in last stand") { event { Player Earned Elimination; All; All; } conditions { Event Player.isInLastStand == True; Event Player.isKillWhileLastStand == False; } actions { Event Player.isKillWhileLastStand = True; Destroy All Effects; Wait(0.500, Ignore Condition); Big Message(Event Player, Custom String("Kill earned!")); Call Subroutine(modifyPlayerStatOnEndLastStand); } } rule("Reset Last Stand Available for Player on death w/o last stand") { event { Player Died; All; All; } conditions { Event Player.isLastStandAvailable == False; Event Player.isInLastStand == False; } actions { Event Player.isLastStandAvailable = True; } } rule("Player killed while last stand") { event { Player Died; All; All; } actions { Call Subroutine(modifyPlayerStatOnEndLastStand); } } rule("modifyPlayerStatOnEnterLastStand()") { event { Subroutine; modifyPlayerStatOnEnterLastStand; } actions { Set Ultimate Ability Enabled(Event Player, False); Set Ability 1 Enabled(Event Player, False); Set Ability 2 Enabled(Event Player, False); Set Max Health(Event Player, 50); Set Healing Received(Event Player, 0); } } rule("modifyPlayerStatOnEndLastStand()") { event { Subroutine; modifyPlayerStatOnEndLastStand; } actions { Set Ultimate Ability Enabled(Event Player, True); Set Ability 1 Enabled(Event Player, True); Set Ability 2 Enabled(Event Player, True); Set Max Health(Event Player, 100); Set Healing Received(Event Player, 100); } }