Create

This code is over 6 months old. The code may have expired and might no longer function.

settings
{
main
{
Description: "Surive endless waves of an increasingly powerful army of Reinhardts coming at your team. Now with random modifiers, a final boss, prettier effects and intermission trivia!\r\n\r\nRemaster by Alomare#4788, Original by StalkerPL.\r\nMore cool modes: workshop.codes"
Mode Name: "Rein Invasion Remastered"
}

lobby
{
Allow Players Who Are In Queue: Yes
Map Rotation: Paused
Max Spectators: 4
Max Team 1 Players: 10
Max Team 2 Players: 0
Return To Lobby: Never
Swap Teams After Match: No
}

modes
{
Team Deathmatch
{
enabled maps
{
Workshop Chamber 0
Workshop Expanse Night 0
}
}

General
{
Allow Hero Switching: Off
Game Mode Start: Immediately
Hero Limit: Off
}
}

heroes
{
Team 1
{
Ability Cooldown Time: 25%
Ammunition Clip Size Scalar: 500%
Healing Dealt: 125%
Jump Vertical Speed: 120%
Movement Speed: 120%
Projectile Speed: 125%
Ultimate Duration: 200%
Ultimate Generation: 200%
Ultimate Generation - Passive: 200%

D.Va
{
Defense Matrix Maximum Time: 200%
Defense Matrix Recharge Rate: 200%
}

Genji
{
Damage Received: 66%
}

Lúcio
{
Damage Dealt: 125%
Projectile Speed: 500%
Soundwave Knockback Scalar: 150%
}

Mei
{
Blizzard Freeze Rate Scalar: 125%
Freeze Stacking: On
Weapon Freeze Duration Scalar: 150%
Weapon Freeze Rate Scalar: 125%
}

Mercy
{
Projectile Speed: 500%
}

Moira
{
Biotic Orb Max Damage Scalar: 500%
Biotic Orb Max Healing Scalar: 500%
Damage Dealt: 125%
Projectile Speed: 50%
}

Pharah
{
Concussive Blast Cooldown Time: 66%
Concussive Blast Knockback Scalar: 25%
Hover Jets Recharge Rate: 75%
Jump Jet Acceleration Scalar: 75%
}

Ramattra
{
Damage Received: 50%
}

Reaper
{
Damage Received: 75%
}

Reinhardt
{
Damage Received: 50%
}

Roadhog
{
Whole Hog Knockback Scalar: 75%
}

Torbjörn
{
Overload Duration Scalar: 200%
}

Winston
{
Damage Dealt: 125%
Damage Received: 25%
}

Wrecking Ball
{
Grappling Claw Knockback Scalar: 200%
Jump Vertical Speed: 200%
Projectile Gravity: 150%
}
}

Team 2
{
Ability Cooldown Time: 0%
Projectile Speed: 80%
Ultimate Generation: 125%
Ultimate Generation - Passive: 400%

enabled heroes
{
Reinhardt
}
}

General
{
Spawn With Ultimate Ready: On

Ashe
{
Dynamite Fuse Time Scalar: 1%
}

Brigitte
{
Damage Dealt: 125%
Damage Received: 40%
}

Doomfist
{
Ammunition Regeneration Time Scalar: 75%
Damage Received: 40%
Power Block Charge Rate: 500%
Projectile Speed: 500%
Rocket Punch Knockback Scalar: 250%
}

Hanzo
{
Storm Arrows Quantity: 12
}

Junker Queen
{
Damage Received: 50%
Jagged Blade Delay Before Automatic Recall: 400%
Projectile Speed: 500%
}

Kiriko
{
Damage Dealt: 150%
Projectile Speed: 500%
Ultimate Generation - Combat Kitsune Rush: 150%
}

Orisa
{
Projectile Speed: 500%
}
}
}

extensions
{
Buff Status Effects
Buff and Debuff Sounds
Energy Explosion Effects
Kinetic Explosion Effects
Explosion Sounds
Spawn More Dummy Bots
}
}
variables {
global:
0: Modifier
1: Countdown
2: CurrentTrivia
3: IsEndless
4: CurrentWave
5: BeatWave
6: Timer
7: BossRein
8: ReinHealthPool
9: ModifierNames
10: antiCrashActivated
11: WaveUnlocks
12: BlacklistLength
13: CtrlVarCountdown
14: NextWaveIncrement
15: CountdownTarget
16: HitRange
17: ReinPossibleSpawns
18: CtrlVar
19: ReinCurrentSpawn
20: ModifiersAvailable
21: TriviaArray
22: TempFX
23: CtrlVarFX
24: SuperExplosive
25: HackedBar
26: HackedBarValue

player:
0: HeroBlacklist
1: Active
2: BotTarget
3: Array
4: Target
5: CtrlVar
6: TempFX
}

subroutines {
0: DisableReins
1: EnableAndSpawnReins
2: AI_PriFire
}

disabled rule("TEST")
{
event
{
Ongoing - Each Player;
All;
All;
}

conditions
{
Is Button Held(Event Player, Button(Interact)) == True;
}

actions
{
disabled Create Dummy Bot(Random Value In Array(All Heroes), Team Of(Event Player), -1, Event Player, Vector(0, 0, 0));
Global.Modifier = 6;
}
}

disabled rule("SETUP")
{
event
{
Ongoing - Global;
}
}

rule("[G] Init / HUD")
{
event
{
Ongoing - Global;
}

actions
{
Set Match Time(10);
Disable Inspector Recording;
Disable Built-In Game Mode Completion;
Disable Built-In Game Mode Announcer;
Disable Built-In Game Mode Music;
Create HUD Text(All Players(All Teams), Null, Custom String("Code 'S3PY3' — 09/01/2023"), Custom String(
"Join the Discord at\nworkshop.codes/reininvasion"), Right, -1, Null, Color(White), Color(Yellow), Visible To and String,
Default Visibility);
"TRIVIA"
Create In-World Text(Global.Countdown ? All Players(All Teams) : Null, Custom String("[{0}] DID YOU KNOW?\r\n\r\n{1}",
Hero Icon String(Hero(Reinhardt)), Global.CurrentTrivia), Vector(0, 1.500, 0), 1.200, Clip Against Surfaces,
Visible To and String, Color(White), Default Visibility);
"TOP HUD"
If(Global.IsEndless);
Create HUD Text(All Players(All Teams), Custom String(" WAVE — {0} ", Global.CurrentWave), Custom String(" \r\n "),
Custom String(" "), Top, 0, Color(White), Null, Null, Visible To and String, Default Visibility);
Else;
Create HUD Text(All Players(All Teams), Custom String(" WAVE — {0} / {1} ", Global.CurrentWave, Global.BeatWave),
Custom String(" \r\n "), Custom String(" "), Top, 0, Color(White), Null, Null, Visible To and String, Default Visibility);
End;
Create HUD Text(Global.Countdown ? Null : All Players(All Teams), Null, Null, Global.Timer, Top, 1, Null, Null, Color(Lime Green),
Visible To and String, Default Visibility);
Create Progress Bar HUD Text(Global.Countdown ? All Players(All Teams) : Null, Global.Countdown * 12.500, Custom String(
"INCOMING! {0} S", Global.Countdown), Top, 1, Global.Countdown > 1.600 ? Color(Yellow) : Color(Red), Color(White),
Visible To Values and Color, Default Visibility);
"LEFT HUD"
Create HUD Text(All Players(All Teams), Null, Null, Custom String(" \r\n\r\n\r\n\r\n "), Left, -1, Null, Null, Null, Visible To,
Default Visibility);
Create HUD Text(All Players(All Teams), Null, Null, Custom String("REINS KILLED — {0}\r\nTEAM DEATHS — {1}\r\n ", Team Score(
Team 1), Team Score(Team 2)), Left, 0, Null, Color(White), Color(White), Visible To and String, Default Visibility);
Create HUD Text(All Players(All Teams), Hero Icon String(Hero(Reinhardt)), Custom String(" \r\n\r\n\r\n{0}", Entity Exists(
Global.BossRein) ? Custom String("FINAL BOSS") : Custom String("{0} MAX. HP", 500 + Global.ReinHealthPool)), Custom String(
"{1}", Null, Global.ModifierNames[Global.Modifier]), Left, 1, Color(Black), Color(Yellow), Color(White), Visible To and String,
Default Visibility);
}
}

rule("[EP1] Init")
{
event
{
Ongoing - Each Player;
Team 1;
All;
}

actions
{
Disable Game Mode HUD(Event Player);
Disable Messages(Event Player);
Add Health Pool To Player(Event Player, Health, Min(100, Global.CurrentWave * 2), True, True);
Event Player.HeroBlacklist = Empty Array;
Wait Until(Has Spawned(Event Player), 99999);
Modify Player Variable(Event Player, HeroBlacklist, Append To Array, Hero Of(Event Player));
}
}

rule("[EP2] Init")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Has Spawned(Event Player) == True;
}

actions
{
Wait(0.500, Ignore Condition);
Disable Built-In Game Mode Respawning(Event Player);
Start Forcing Dummy Bot Name(Event Player, Custom String("{0}", Slot Of(Event Player) + 1));
}
}

rule("[G] Anti-Crash On")
{
event
{
Ongoing - Global;
}

conditions
{
Server Load Average > 250;
}

actions
{
Wait(2, Abort When False);
Small Message(All Players(All Teams), Custom String(" \r\n Anti-Crash Activated \r\n "));
Set Slow Motion(33);
Global.antiCrashActivated = True;
}
}

rule("[G] Anti-Crash Off")
{
event
{
Ongoing - Global;
}

conditions
{
Global.antiCrashActivated == True;
Server Load Average < 250;
}

actions
{
Global.antiCrashActivated = False;
Set Slow Motion(100);
}
}

rule("[G] WS Settings")
{
event
{
Ongoing - Global;
}

actions
{
Global.WaveUnlocks[0] = Workshop Setting Integer(Custom String("REIN WAVE UNLOCKS"), Custom String("FIRE STRIKE"), 5, 5, 500, 0);
Global.WaveUnlocks[1] = Workshop Setting Integer(Custom String("REIN WAVE UNLOCKS"), Custom String("CHARGE"), 15, 5, 500, 1);
Global.WaveUnlocks[2] = Workshop Setting Integer(Custom String("REIN WAVE UNLOCKS"), Custom String("BARRIER FIELD"), 25, 5, 500,
2);
Global.WaveUnlocks[3] = Workshop Setting Integer(Custom String("REIN WAVE UNLOCKS"), Custom String("EARTHSHATTER"), 30, 5, 500, 3);
Global.IsEndless = Workshop Setting Toggle(Custom String("GENERAL"), Custom String("ENDLESS MODE (DISABLES FINAL WAVE)"), False,
1);
Global.BeatWave = Workshop Setting Integer(Custom String("GENERAL"), Custom String("FINAL WAVE NUMBER"), 80, 5, 500, 2);
Global.BlacklistLength = Workshop Setting Integer(Custom String("GENERAL"), Custom String("HERO BLACKLIST LENGTH"), 10, 1, 31, 3);
}
}

rule("[G] Variables / Effects")
{
event
{
Ongoing - Global;
}

conditions
{
Is Assembling Heroes == False;
}

actions
{
Global.CtrlVarCountdown = 0;
Global.NextWaveIncrement = 1;
Global.CountdownTarget = 7;
Global.Countdown = 15;
Global.Timer = 69;
Global.HitRange = 7;
Global.ReinPossibleSpawns = Array(Vector(19.500, 0, 19.500), Vector(19.500, 0, -19.500), Vector(-19.500, 0, -19.500), Vector(
-19.500, 0, 19.500), Vector(0, 0, 19.500), Vector(0, 0, -19.500), Vector(19.500, 0, 0), Vector(-19.500, 0, 0));
For Global Variable(CtrlVar, 0, Count Of(Global.ReinPossibleSpawns), 1);
Create Effect(All Players(All Teams), Light Shaft, Color(Orange), Global.ReinPossibleSpawns[Global.CtrlVar], 0.135, Visible To);
Create Effect(All Players(All Teams), Ring, Color(Orange), Global.ReinPossibleSpawns[Global.CtrlVar], 5, Visible To);
Create Icon(Players Within Radius(Evaluate Once(Global.ReinPossibleSpawns[Global.CtrlVar]), 5.500, Team 1, Surfaces),
Global.ReinPossibleSpawns[Global.CtrlVar], Arrow: Up, Visible To, Color(Orange), True);
Create In-World Text(Players Within Radius(Evaluate Once(Global.ReinPossibleSpawns[Global.CtrlVar]), 5.500, Team 1, Surfaces),
Custom String("[{0}]", Input Binding String(Button(Jump))), Evaluate Once(Global.ReinPossibleSpawns[Global.CtrlVar]), 1,
Do Not Clip, Visible To Position and String, Color(Orange), Default Visibility);
End;
Create Effect(All Players(All Teams), Sphere, Color(Green), Vector(0, -5, 0), 5.200, Visible To);
Global.ReinCurrentSpawn = Random Value In Array(Global.ReinPossibleSpawns);
Global.ModifiersAvailable = Array(1, 1, 2, 3, 4, 5, 6);
Global.ModifierNames = Array(Custom String("NO MODIFIER"), Custom String("EXPLOSIVE"), Custom String("NANOBOOSTED"), Custom String(
"TINY & FAST"), Custom String("DUPLICATED"), Custom String("BIG & SLOW"), Custom String("FADING"));
Global.TriviaArray = Array(Custom String("Chris Metzen has described Reinhardt\r\nas \"kinda a Don Quixote\"."), Custom String(
"An inflatable Reinhardt hammer was\r\navailable in the \"goodie bag\" of BlizzCon\r\n2016."), Custom String(
"Darin De Paul performs Reinhardt as an\r\nexaggerated version of his father's voice."), Custom String(
"Reinhardt is one of only two heroes to not\r\nhave a \"Quick Melee\" attack. The other\r\nbeing Brigitte."), Custom String(
"A Reinhardt-themed hoodie is\r\navailable from JINX."), Custom String(
"Reinhardt is the second oldest\r\ncharacter, with the oldest being Sigma,\r\nwho is one year older."), Custom String(
"During the game's late alpha (and possibly\r\nbefore), Barrier Field was called Shield."), Custom String(
"Reinhardt appears as a skin for Johanna\r\nin Heroes of the Storm."), Custom String(
"Reinhardt's design stems from the\r\nplayable Juggernaut class in the\r\ncancelled Project Titan."), Custom String(
"Arnold Tsang revealed that Reinhardt's\r\ndesign for Overwatch 2 marks the\r\nninth iteration of his armor."), Custom String(
"When Winston initiated the Overwatch\r\nrecall from Gibraltar, Reinhardt's location\r\nwas southwestern Greenland."),
Custom String("During the Omnic Crisis, Reinhardt took\r\npart in Operation White Dome, where he\r\nsaved Torbjörn's life."),
Custom String("This gamemode took one day to\r\ndevelop and another one to polish."));
Global.CurrentTrivia = Random Value In Array(Global.TriviaArray);
Skip If(Current Map == Map(Workshop Chamber), 1);
Create Effect(All Players(All Teams), Light Shaft, Color(Black), Vector(0, 0, 0), 75, Visible To);
}
}

rule("[G] Temp Countdown Fix")
{
event
{
Ongoing - Global;
}

actions
{
Global.Countdown = Max(Global.Countdown - 0.032, 0);
Wait(0.032, Ignore Condition);
Loop;
}
}

rule("[EP] Expanse Boundaries")
{
event
{
Ongoing - Each Player;
All;
All;
}

conditions
{
(Current Map == Map(Workshop Chamber)) == False;
}

actions
{
Wait(0.100, Ignore Condition);
If(Distance Between(Event Player, Vector(0, 0, 0)) > 70);
Apply Impulse(Event Player, Direction Towards(Event Player, Vector(0, 0, 0)), Distance Between(Event Player, Vector(0, 0, 0)) / 5,
To World, Cancel Contrary Motion);
End;
Loop;
}
}

disabled rule("GAMEPLAY")
{
event
{
Ongoing - Global;
}
}

rule("[EP1] Alive/Spawned")
{
event
{
Ongoing - Each Player;
Team 1;
All;
}

conditions
{
Is Alive(Event Player) == True;
Has Spawned(Event Player) == True;
}

actions
{
Event Player.Active = True;
Stop All Damage Over Time(Event Player);
Stop All Heal Over Time(Event Player);
Wait(0.100, Ignore Condition);
Start Heal Over Time(Event Player, Null, 9999, 10);
Wait(0.900, Ignore Condition);
If(Is True For Any(Array(Hero(Brigitte), Hero(Doomfist), Hero(Junker Queen), Hero(Winston), Hero(Ramattra), Hero(Reinhardt), Hero(
Genji), Hero(Reaper)), Hero Of(Event Player) == Current Array Element) == True);
Small Message(Event Player, Custom String("CLOSE RANGE HERO — MORE RESILIENCE"));
End;
}
}

rule("[EP1] Died")
{
event
{
Player Died;
Team 1;
All;
}

actions
{
Wait(1.750, Ignore Condition);
Abort If(Is Alive(Event Player));
Event Player.Active = False;
Wait Until(Is Alive(Event Player), 999);
Skip If(Attacker == Event Player, 2);
Skip If(Count Of(Filtered Array(Remove From Array(Players On Hero(Hero(Mercy), Team 1), Event Player), Distance Between(
Event Player, Current Array Element) <= 5.500 && Ability Cooldown(Current Array Element, Button(Ability 2)) != 0)) > 0, 1);
Start Forcing Player To Be Hero(Event Player, Random Value In Array(Remove From Array(All Heroes, Event Player.HeroBlacklist)));
Event Player.Active = True;
Wait(1, Ignore Condition);
Abort If(Global.BossRein.BotTarget != Null);
Global.BossRein.BotTarget = Event Player;
Modify Player Variable(Event Player, HeroBlacklist, Append To Array, Hero Of(Event Player));
Skip If(Count Of(Event Player.HeroBlacklist) <= Global.BlacklistLength, 1);
Modify Player Variable(Event Player, HeroBlacklist, Remove From Array By Index, 0);
}
}

rule("[EP] Jump Pad")
{
event
{
Ongoing - Each Player;
All;
All;
}

conditions
{
Event Player.Active == True;
}

actions
{
Wait(0.100, Abort When False);
If(Distance Between(Event Player, Vector(0, 0, 0)) <= 1.400 && !(Hero Of(Event Player) == Hero(Orisa) && Is Using Ultimate(
Event Player)));
Apply Impulse(Event Player, Up, 20, To World, Cancel Contrary Motion);
Play Effect(All Players(All Teams), Ring Explosion, Color(Green), Vector(0, 0, 0), 4);
Play Effect(All Players(All Teams), Pharah Concussive Blast Sound, Color(Team 1), Vector(0, 0, 0), 50);
End;
Loop If Condition Is True;
}
}

rule("[EP1] Float")
{
event
{
Ongoing - Each Player;
Team 1;
All;
}

actions
{
Wait(0.150, Ignore Condition);
If(Is Button Held(Event Player, Button(Jump)) && Is True For Any(Global.ReinPossibleSpawns, Distance Between(Event Player,
Current Array Element) <= 5));
Start Accelerating(Event Player, Up, 35, 10, To World, None);
Else;
Stop Accelerating(Event Player);
End;
Loop;
}
}

rule("[G] Countdown 0")
{
event
{
Ongoing - Global;
}

conditions
{
Is Assembling Heroes == False;
Is Game In Progress == True;
Global.Countdown <= 1.600;
}

actions
{
Global.ReinCurrentSpawn = Random Value In Array(Global.ReinPossibleSpawns);
If(Random Integer(1, 4) == 4);
If(Entity Exists(Global.BossRein));
Global.Modifier = Random Value In Array(Remove From Array(Global.ModifiersAvailable, Array(3, 5)));
Else;
Global.Modifier = Random Value In Array(Global.ModifiersAvailable);
End;
disabled Global.Modifier = 6;
Big Message(All Players(All Teams), Custom String("REINS ARE {1}!", Null, Global.ModifierNames[Global.Modifier]));
End;
For Global Variable(CtrlVarCountdown, 0, 2, 1);
Play Effect(All Players(All Teams), Ring Explosion, Color(Orange), Global.ReinCurrentSpawn, 10);
Play Effect(All Players(All Teams), Ring Explosion, Color(Orange), Global.ReinCurrentSpawn, 60);
Play Effect(All Players(All Teams), Echo Sticky Bomb Explosion Sound, Color(Team 2), Global.ReinCurrentSpawn, 150);
Wait(0.800, Ignore Condition);
End;
Play Effect(All Players(All Teams), Ring Explosion, Color(Orange), Global.ReinCurrentSpawn, 70);
Play Effect(All Players(All Teams), Echo Sticky Bomb Explosion Sound, Color(Team 2), Global.ReinCurrentSpawn, 200);
Global.CurrentWave += Global.NextWaveIncrement;
Global.ReinHealthPool = Global.CurrentWave * (20 + Number Of Players(Team 1) * 4);
Play Effect(All Players(All Teams), Doomfist Meteor Strike Impact Effect, Color(Team 2), Global.ReinCurrentSpawn, 1);
Play Effect(All Players(All Teams), Doomfist Meteor Strike Impact Sound, Color(Team 2), Global.ReinCurrentSpawn, 100);
Play Effect(All Players(All Teams), Bad Explosion, Color(Orange), Global.ReinCurrentSpawn, 20);
Play Effect(All Players(All Teams), Ring Explosion Sound, Null, Global.ReinCurrentSpawn, 120);
Set Match Time(31);
Enable Built-In Game Mode Music;
Start Rule(EnableAndSpawnReins, Do Nothing);
Global.Timer = 0;
Chase Global Variable At Rate(Timer, 9999, 1, None);
Heal(All Players(Team 1), Null, 9999);
}
}

rule("[G] All Reins Dead")
{
event
{
Ongoing - Global;
}

conditions
{
Is Game In Progress == True;
Is True For All(All Players(Team 2), Is Dead(Current Array Element)) == True;
}

actions
{
Stop Chasing Global Variable(Timer);
Wait(0.050, Abort When False);
All Players(Team 2).Active = False;
If(Global.Timer > 15);
Global.NextWaveIncrement = 1;
Big Message(All Players(All Teams), Custom String("WAVE CLEARED IN {0} SECONDS!", Round To Integer(Global.Timer, To Nearest)));
Else;
If(Global.Timer <= 5);
Global.NextWaveIncrement = 4;
Else If(Global.Timer <= 10);
Global.NextWaveIncrement = 3;
Else If(Global.Timer <= 15);
Global.NextWaveIncrement = 2;
End;
Big Message(All Players(All Teams), Custom String("WAVE CLEARED IN {0} SECONDS!\r\nSKIPPING {1} WAVE(S)!", Round To Integer(
Global.Timer, To Nearest), Global.NextWaveIncrement - 1));
End;
Play Effect(All Players(All Teams), Ring Explosion, Color(White), Vector(0, 0, 0), 70);
Play Effect(All Players(All Teams), Buff Explosion Sound, Null, Vector(0, 0, 0), 80);
Play Effect(All Players(All Teams), Ring Explosion Sound, Null, Vector(0, 0, 0), 80);
Global.Modifier = 0;
Global.CurrentTrivia = Random Value In Array(Global.TriviaArray);
Disable Built-In Game Mode Music;
Set Match Time(60);
Skip If(Global.IsEndless || Global.CurrentWave < Global.BeatWave, 1);
Small Message(All Players(All Teams), Custom String("MATCH WILL RESTART AFTER PLAY OF THE GAME!"));
Wait(3, Ignore Condition);
Global.Countdown = Global.CountdownTarget;
Abort If(Global.IsEndless || Global.CurrentWave < Global.BeatWave);
Declare Team Victory(Team 1);
Enable Built-In Game Mode Music;
Wait(25.600, Ignore Condition);
Restart Match;
}
}

disabled rule("REINS")
{
event
{
Ongoing - Global;
}
}

rule("[G] Create Reins")
{
event
{
Ongoing - Global;
}

actions
{
Wait(0.250, Ignore Condition);
For Global Variable(CtrlVar, 0, Workshop Setting Integer(Custom String("GENERAL"), Custom String(
"NUMBER OF REINS — MUST NOT EXCEED TOTAL NUMBER OF 24 HEROES (BOTS + PLAYERS)"), 14, 1, 23, 0), 1);
Create Dummy Bot(Hero(Doomfist), Team 2, Global.CtrlVar, Vector(0, 200, 0), Vector(0, 0, 0));
Wait(0.016, Ignore Condition);
End;
Wait(0.100, Ignore Condition);
Call Subroutine(DisableReins);
Start Forcing Dummy Bot Name(All Players(Team 2), Hero Icon String(Hero(Reinhardt)));
Add Health Pool To Player(All Players(Team 2), Health, Global.ReinHealthPool, True, True);
}
}

rule("[SR] Disable")
{
event
{
Subroutine;
DisableReins;
}

actions
{
All Players(Team 2).Active = False;
Set Invisible(All Players(Team 2), Enemies);
Set Status(All Players(Team 2), Null, Phased Out, 9999);
Stop Throttle In Direction(All Players(Team 2));
Stop Facing(All Players(Team 2));
}
}

rule("[SR] Enable & Spawn & Boss")
{
event
{
Subroutine;
EnableAndSpawnReins;
}

actions
{
If(Global.CurrentWave < Global.BeatWave);
Teleport(All Players(Team 2), Global.ReinCurrentSpawn);
Resurrect(All Players(Team 2));
All Players(Team 2).Active = True;
Set Invisible(All Players(Team 2), None);
Clear Status(All Players(Team 2), Phased Out);
Skip If(Global.CurrentWave != Global.WaveUnlocks[0], 1);
Big Message(All Players(All Teams), Custom String("REINS LEARNED {0}!", Ability Icon String(Hero(Doomfist), Button(Ability 2))));
Skip If(Global.CurrentWave != Global.WaveUnlocks[1], 1);
Big Message(All Players(All Teams), Custom String("REINS LEARNED {0}!", Ability Icon String(Hero(Doomfist), Button(Ability 1))));
Skip If(Global.CurrentWave != Global.WaveUnlocks[2], 1);
Big Message(All Players(All Teams), Custom String("REINS LEARNED {0}!", Ability Icon String(Hero(Doomfist), Button(
Secondary Fire))));
Skip If(Global.CurrentWave != Global.WaveUnlocks[3], 1);
Big Message(All Players(All Teams), Custom String("REINS WILL SHATTER {0}!", Ability Icon String(Hero(Doomfist), Button(
Ultimate))));
Else;
Global.BossRein = Random Value In Array(All Players(Team 2));
Teleport(Global.BossRein, Global.ReinCurrentSpawn);
Resurrect(Global.BossRein);
Global.BossRein.Active = True;
Set Invisible(Global.BossRein, None);
Clear Status(Global.BossRein, Phased Out);
Add Health Pool To Player(Global.BossRein, Armor, 4000, True, True);
Start Scaling Player(Global.BossRein, 2.500, False);
Big Message(All Players(All Teams), Custom String("{0} DEFEAT THE FINAL BOSS!", Ability Icon String(Hero(Doomfist), Button(
Ultimate))));
Create Progress Bar HUD Text(All Players(All Teams), Health(Global.BossRein) / Max Health(Global.BossRein) * 100, Custom String(
"{0} BOSS REIN! {1} HP | {2}% ULT", Ability Icon String(Hero(Doomfist), Button(Ultimate)),
Round To Integer(Health(Global.BossRein) * 6.666, Up), Round To Integer(Ultimate Charge Percent(Global.BossRein), Down)), Top,
1, Custom Color(220, Health(Global.BossRein) / Max Health(Global.BossRein) * 175, 0, 255), Color(White),
Visible To Values and Color, Default Visibility);
Create Effect(All Players(All Teams), Ring, Color(Red), Update Every Frame(Position Of(Global.BossRein)), 10.800,
Visible To Position and Radius);
Wait(0.500, Ignore Condition);
Set Damage Dealt(Global.BossRein, 200);
Set Projectile Speed(Global.BossRein, 250);
Set Knockback Received(Global.BossRein, 50);
Set Damage Received(Global.BossRein, 15);
Wait Until(Is Dead(Global.BossRein), 99999);
Kill(All Players(Team 2), Null);
End;
}
}

disabled rule("AI")
{
event
{
Ongoing - Global;
}
}

rule("[EP] Is Active")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Event Player.Active == True;
}

actions
{
Wait(Slot Of(Event Player) * 0.025, Ignore Condition);
Start Throttle In Direction(Event Player, Direction Towards(Event Player, Event Player.BotTarget), 1, To World,
Replace existing throttle, Direction and Magnitude);
Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Event Player.BotTarget)), 270, To World,
Direction and Turn Rate);
Start Rule(AI_PriFire, Restart Rule);
}
}

rule("[EP] Pick Target")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Event Player.Active == True;
Global.BossRein != Event Player;
}

actions
{
Wait(Slot Of(Event Player) * 0.025, Ignore Condition);
If(Number Of Living Players(Team 1) > 0);
Event Player.BotTarget = First Of(Sorted Array(Filtered Array(Remove From Array(All Players(Team 1), Filtered Array(
Players On Hero(Hero(Sombra), Team 1), Is Using Ability 1(Current Array Element))), Is Alive(Current Array Element)
&& Has Spawned(Current Array Element)), Distance Between(Eye Position(Event Player), Current Array Element)));
Else;
Event Player.BotTarget = Vector(0, 0, 0);
End;
Skip If(Is True For Any(Array(3, 5), Global.Modifier == Current Array Element), 1);
Set Move Speed(Event Player, 84 + Number Of Living Players(Team 1));
Wait Until(Is Dead(Event Player.BotTarget), Random Real(0.500, 2));
Loop If Condition Is True;
}
}

rule("[SR] PriFire")
{
event
{
Subroutine;
AI_PriFire;
}

actions
{
If(Global.BossRein != Event Player);
If(Distance Between(Eye Position(Event Player), Event Player.BotTarget) < Global.HitRange);
Start Holding Button(Event Player, Button(Primary Fire));
Wait Until(!Event Player.Active || Distance Between(Eye Position(Event Player), Event Player.BotTarget) >= Global.HitRange, 99999);
Stop Holding Button(Event Player, Button(Primary Fire));
End;
Wait(0.500, Ignore Condition);
Loop If(Event Player.Active);
Else;
Disable Nameplates(Global.BossRein, All Players(All Teams));
Start Forcing Player Outlines(Global.BossRein, All Players(All Teams), True, Custom Color(220, Health(Global.BossRein)
/ Max Health(Global.BossRein) * 175, 0, 255), Always);
If(Distance Between(Eye Position(Event Player), Event Player.BotTarget) < 17);
Start Holding Button(Event Player, Button(Primary Fire));
Wait Until(!Event Player.Active || Distance Between(Eye Position(Event Player), Event Player.BotTarget) >= 17, 99999);
Stop Holding Button(Event Player, Button(Primary Fire));
End;
Wait(0.500, Ignore Condition);
Loop If(Event Player.Active);
End;
}
}

rule("[EP2] Ab2")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Global.CurrentWave >= Global.WaveUnlocks[0];
Event Player.Active == True;
}

actions
{
If(Random Integer(1, 3) == 3);
Press Button(Event Player, Button(Ability 2));
End;
Wait(Random Real(3.500, Max(4, 7 - Global.CurrentWave * 0.100)), Ignore Condition);
Loop If(Event Player.Active);
}
}

rule("[EP2] Ab1")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Global.CurrentWave >= Global.WaveUnlocks[1];
Event Player.Active == True;
Number Of Living Players(Team 1) > 0;
}

actions
{
If(Random Integer(1, 3) == 3);
Press Button(Event Player, Button(Ability 1));
End;
Wait(Random Real(8, 11), Ignore Condition);
Loop If(Event Player.Active);
}
}

rule("[EP2] SecFire")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Global.CurrentWave >= Global.WaveUnlocks[2];
Event Player.Active == True;
}

actions
{
If(Random Integer(1, 5) <= 2);
Start Holding Button(Event Player, Button(Secondary Fire));
Wait Until(!Event Player.Active, Random Real(1, 3));
Stop Holding Button(Event Player, Button(Secondary Fire));
End;
Wait(Random Real(4, 6), Ignore Condition);
Loop If(Event Player.Active);
}
}

rule("[EP2] Ult")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Global.CurrentWave >= Global.WaveUnlocks[3];
Event Player.Active == True;
Number Of Living Players(Team 1) > 0;
}

actions
{
Wait(Random Real(0, 0.500), Abort When False);
Skip If(Ultimate Charge Percent(Event Player) != 100, 1);
Press Button(Event Player, Button(Ultimate));
Loop If(Event Player.Active);
}
}

disabled rule("MODS")
{
event
{
Ongoing - Global;
}
}

rule("[G] Explode FX")
{
event
{
Ongoing - Global;
}

conditions
{
Global.Modifier == 1;
}

actions
{
Wait Until(!Global.Countdown, 10);
Global.TempFX = Empty Array;
For Global Variable(CtrlVarFX, 0, Number Of Players(Team 2), 1);
Create Effect(Is Alive(Evaluate Once(All Players(Team 2)[Global.CtrlVarFX])) ? All Players(All Teams) : Null,
Torbjörn Overloading Effect, Color(Team 1), All Players(Team 2)[Global.CtrlVarFX], 1, Visible To);
Modify Global Variable(TempFX, Append To Array, Last Created Entity);
End;
Global.SuperExplosive = Random Value In Array(All Players(Team 2));
Create Effect(Is Alive(Global.SuperExplosive) ? All Players(All Teams) : Null, Winston Primal Rage Effect, Color(Team 2),
Global.SuperExplosive, 1, Visible To Position and Radius);
Modify Global Variable(TempFX, Append To Array, Last Created Entity);
Wait Until(Global.Modifier != 1, 99999);
Destroy Effect(Global.TempFX);
Global.SuperExplosive = Null;
}
}

rule("[EP] Explode")
{
event
{
Player Died;
Team 2;
All;
}

conditions
{
Global.Modifier == 1;
}

actions
{
If(Global.SuperExplosive != Event Player);
Play Effect(All Players(All Teams), Junkrat RIP Tire Explosion Effect, Color(Team 2), Event Player, 1);
Play Effect(All Players(All Teams), Junkrat RIP Tire Explosion Sound, Color(Team 2), Eye Position(Event Player), 150);
Event Player.Array = Players Within Radius(Event Player, 10, All Teams, Surfaces And All Barriers);
For Player Variable(Event Player, CtrlVar, 0, Count Of(Event Player.Array), 1);
Event Player.Target = Event Player.Array[Event Player.CtrlVar];
Skip If(Team Of(Event Player.Target) == Team Of(Event Player), 1);
Damage(Event Player.Target, Event Player, 25 + (10 - Distance Between(Event Player, Event Player.Target)) * 20);
Apply Impulse(Event Player.Target, Up, 1 + (10 - Distance Between(Event Player, Event Player.Target)), To World,
Cancel Contrary Motion);
Apply Impulse(Event Player.Target, Direction Towards(Event Player, Event Player.Target), 4 + (10 - Distance Between(Event Player,
Event Player.Target)) ^ 1.300, To World, Cancel Contrary Motion);
End;
Else;
Play Effect(All Players(All Teams), Ring Explosion, Color(Red), Eye Position(Event Player), 50);
Play Effect(All Players(All Teams), DVa Self Destruct Explosion Effect, Color(Team 2), Eye Position(Event Player), 1);
Play Effect(All Players(All Teams), DVa Self Destruct Explosion Sound, Color(Team 2), Position Of(Event Player), 200);
Event Player.Array = Players Within Radius(Event Player, 25, All Teams, Surfaces And All Barriers);
For Player Variable(Event Player, CtrlVar, 0, Count Of(Event Player.Array), 1);
Event Player.Target = Event Player.Array[Event Player.CtrlVar];
Skip If(Team Of(Event Player.Target) == Team Of(Event Player), 1);
Damage(Event Player.Target, Event Player, 25 + (25 - Distance Between(Event Player, Event Player.Target)) * 10);
Apply Impulse(Event Player.Target, Up, 3 + (25 - Distance Between(Event Player, Event Player.Target)) * 0.400, To World,
Cancel Contrary Motion);
Apply Impulse(Event Player.Target, Direction Towards(Event Player, Event Player.Target), 8 + ((25 - Distance Between(Event Player,
Event Player.Target)) * 0.400) ^ 1.350, To World, Cancel Contrary Motion);
End;
End;
}
}

rule("[G] Nano")
{
event
{
Ongoing - Global;
}

conditions
{
Global.Modifier == 2;
}

actions
{
Wait Until(!Global.Countdown, 10);
Global.TempFX = Empty Array;
Set Damage Dealt(All Players(Team 2), 135);
Set Damage Received(All Players(Team 2), 65);
For Global Variable(CtrlVarFX, 0, Number Of Players(Team 2), 1);
Create Effect(All Players(All Teams), Ana Nano Boosted Effect, Color(Team 1), All Players(Team 2)[Global.CtrlVarFX], 1,
Visible To);
Modify Global Variable(TempFX, Append To Array, Last Created Entity);
Create Effect(All Players(All Teams), Ana Nano Boosted Sound, Color(Team 1), All Players(Team 2)[Global.CtrlVarFX], 20,
Visible To);
Modify Global Variable(TempFX, Append To Array, Last Created Entity);
Wait(0.032, Ignore Condition);
End;
Wait Until(Global.Modifier != 2, 99999);
Destroy Effect(Global.TempFX);
Set Damage Dealt(All Players(Team 2), 100);
Set Damage Received(All Players(Team 2), 100);
}
}

rule("[G] Tiny & Fast")
{
event
{
Ongoing - Global;
}

conditions
{
Global.Modifier == 3;
Global.CurrentWave < Global.BeatWave;
}

actions
{
Start Scaling Player(All Players(Team 2), 0.600, False);
Set Move Speed(All Players(Team 2), Current Map == Map(Workshop Expanse) ? 110 : 105);
Wait Until(Global.Modifier != 3, 99999);
Stop Scaling Player(All Players(Team 2));
}
}

rule("[EP2] Duplicated")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Global.Modifier == 4;
}

actions
{
Wait Until(Is Alive(Event Player), 20);
Wait(0.016 * Slot Of(Event Player), Ignore Condition);
Create Effect(All Players(All Teams), Echo Cloning Effect, Color(Team 2), Event Player, 1, Visible To);
Event Player.TempFX = Last Created Entity;
Wait(0.100, Ignore Condition);
Wait Until(Is Dead(Event Player), 99999);
Destroy Effect(Event Player.TempFX);
Resurrect(Event Player);
Play Effect(All Players(All Teams), Sigma Accretion Impact Effect, Color(Team 2), Eye Position(Event Player), 1);
Set Status(Event Player, Null, Hacked, 15);
}
}

rule("[G] Big & Slow")
{
event
{
Ongoing - Global;
}

conditions
{
Global.Modifier == 5;
Global.CurrentWave < Global.BeatWave;
}

actions
{
Start Scaling Player(All Players(Team 2), 1.750, False);
Set Move Speed(All Players(Team 2), 67);
Wait Until(Global.Modifier != 5, 99999);
Stop Scaling Player(All Players(Team 2));
Global.HitRange = 10;
}
}

rule("[G] Fading")
{
event
{
Ongoing - Global;
}

conditions
{
Global.Modifier == 6;
}

actions
{
Wait Until(!Global.Countdown, 10);
Global.TempFX = Empty Array;
Disable Movement Collision With Players(All Players(Team 2));
Disable Movement Collision With Environment(All Players(Team 2), False);
For Global Variable(CtrlVarFX, 0, Number Of Players(Team 2), 1);
Create Effect(Is Alive(Evaluate Once(All Players(Team 2)[Global.CtrlVarFX])) ? All Players(All Teams) : Null,
Reaper Wraith Form Effect, Color(Team 1), All Players(Team 2)[Global.CtrlVarFX], 1, Visible To);
Modify Global Variable(TempFX, Append To Array, Last Created Entity);
End;
Wait(Random Real(0.250, 1), Ignore Condition);
While(Global.Modifier == 6);
For Global Variable(CtrlVarFX, 0, Number Of Living Players(Team 2), 1);
Play Effect(All Players(All Teams), Bad Explosion, Color(Black), Position Of(All Living Players(Team 2)[Global.CtrlVarFX]), 3);
Play Effect(All Players(All Teams), Moira Fade Disappear Sound, Color(Team 2), Eye Position(All Living Players(Team 2)
[Global.CtrlVarFX]), 30);
End;
Set Invisible(All Living Players(Team 2), All);
Set Status(All Living Players(Team 2), Null, Phased Out, 2);
Wait Until(Global.Modifier != 6, Random Real(0.800, 1.500));
For Global Variable(CtrlVarFX, 0, Number Of Living Players(Team 2), 1);
Play Effect(All Players(All Teams), Ring Explosion, Color(Black), Position Of(All Living Players(Team 2)[Global.CtrlVarFX]), 6);
Play Effect(All Players(All Teams), Moira Fade Reappear Sound, Color(Team 2), Eye Position(All Living Players(Team 2)
[Global.CtrlVarFX]), 30);
End;
Set Invisible(All Living Players(Team 2), None);
Clear Status(All Living Players(Team 2), Phased Out);
Wait Until(Global.Modifier != 6, Random Real(2, 10));
End;
Destroy Effect(Global.TempFX);
Enable Movement Collision With Players(All Players(Team 2));
Enable Movement Collision With Environment(All Players(Team 2));
}
}

disabled rule("BOSS REIN")
{
event
{
Ongoing - Global;
}
}

rule("[EP] Boss Pick Target")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Global.BossRein == Event Player;
Event Player.Active == True;
}

actions
{
If(Number Of Living Players(Team 1) > 0);
Event Player.BotTarget = First Of(Sorted Array(Filtered Array(Remove From Array(All Players(Team 1), Filtered Array(
Players On Hero(Hero(Sombra), Team 1), Is Using Ability 1(Current Array Element))), Is Alive(Current Array Element)
&& Has Spawned(Current Array Element)), Distance Between(Eye Position(Event Player), Current Array Element)));
Else;
Event Player.BotTarget = Vector(0, 0, 0);
End;
Set Move Speed(Event Player, 105 + Number Of Players(Team 1) * 2);
Wait Until(Is Dead(Event Player.BotTarget), Random Real(2, 6));
Loop If Condition Is True;
}
}

rule("[EP1] Shatter Knockdown")
{
event
{
Player Took Damage;
Team 1;
All;
}

conditions
{
Attacker == Global.BossRein;
Attacker != Null;
Event Ability == Button(Ultimate);
}

actions
{
Play Effect(All Players(All Teams), Wrecking Ball Piledriver Impact Effect, Color(Team 2), Position Of(Event Player), 1);
Play Effect(All Players(All Teams), Wrecking Ball Piledriver Impact Sound, Color(Team 2), Position Of(Event Player), 80);
}
}

rule("[EP1] Fire Linger")
{
event
{
Player Took Damage;
Team 1;
All;
}

conditions
{
Attacker == Global.BossRein;
Attacker != Null;
Event Ability == Button(Ability 2);
}

actions
{
Set Status(Event Player, Attacker, Burning, 3);
Start Damage Over Time(Event Player, Attacker, 3, 35);
}
}

rule("[EP2] Cleanse CC")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Global.BossRein == Event Player;
}

actions
{
Wait(0.100, Ignore Condition);
If(Is True For Any(Array(Has Status(Event Player, Hacked), Has Status(Event Player, Knocked Down), Has Status(Event Player,
Asleep), Has Status(Event Player, Frozen), Has Status(Event Player, Stunned)), Current Array Element == True));
Wait(0.600, Ignore Condition);
Clear Status(Event Player, Hacked);
Clear Status(Event Player, Knocked Down);
Clear Status(Event Player, Asleep);
Clear Status(Event Player, Frozen);
Clear Status(Event Player, Stunned);
End;
Loop If Condition Is True;
}
}

rule("[G] Boss Hack")
{
event
{
Ongoing - Global;
}

conditions
{
Entity Exists(Global.BossRein) == True;
Is Using Ultimate(Global.BossRein) == True;
}

actions
{
Destroy Progress Bar In-World Text(Global.HackedBar);
Wait(0.016, Ignore Condition);
Set Status(All Players(Team 1), Global.BossRein, Hacked, 6);
Chase Global Variable Over Time(HackedBarValue, 0, 6, None);
Global.HackedBarValue = 100;
Create Progress Bar In-World Text(All Players(Team 1), Global.HackedBarValue, Custom String(
"ABILITIES DISABLED {0} S", Global.HackedBarValue / 12.500), Update Every Frame(Eye Position(
Local Player) + Direction From Angles(Horizontal Facing Angle Of(Local Player), Vertical Facing Angle Of(Local Player) + 17)
* 1000), 0.800, Do Not Clip, Color(Violet), Color(White), Position and Values, Default Visibility);
Global.HackedBar = Last Text ID;
Play Effect(All Players(All Teams), Ring Explosion, Color(Purple), Position Of(Global.BossRein), 70);
Play Effect(All Players(All Teams), Ring Explosion, Color(Purple), Position Of(Global.BossRein), 60);
Play Effect(All Players(All Teams), Ring Explosion, Color(Purple), Position Of(Global.BossRein), 50);
Play Effect(All Players(All Teams), Sombra EMP Explosion Sound, Color(Team 2), Position Of(Global.BossRein), 80);
Wait(5.984, Restart When True);
Destroy Progress Bar In-World Text(Global.HackedBar);
}
}

disabled rule("GIMMICKS")
{
event
{
Ongoing - Global;
}
}

rule("[EP1] Cap Shatter")
{
event
{
Ongoing - Each Player;
Team 1;
All;
}

conditions
{
Has Status(Event Player, Knocked Down) == True;
}

actions
{
Abort If(Entity Exists(Global.BossRein));
Wait(1, Ignore Condition);
While(Has Status(Event Player, Knocked Down));
Clear Status(Event Player, Knocked Down);
Wait(0.100, Ignore Condition);
End;
}
}

rule("[EP1] Genji Protection")
{
event
{
Ongoing - Each Player;
Team 1;
Genji;
}

conditions
{
Is Using Ultimate(Event Player) == True;
}

actions
{
Set Damage Received(Event Player, 15);
Create Effect(All Players(All Teams), Baptiste Immortality Field Protected Effect, Color(Team 1), Event Player, 1, None);
Event Player.TempFX = Last Created Entity;
Small Message(Event Player, Custom String("PROTECTED — 85% LESS DAMAGE"));
Wait Until(!Is Using Ultimate(Event Player), 9999);
Wait(0.500, Ignore Condition);
Set Damage Received(Event Player, 100);
Destroy Effect(Event Player.TempFX);
}
}

rule("[EP1] Reaper Protection")
{
event
{
Ongoing - Each Player;
Team 1;
Reaper;
}

conditions
{
Is Using Ultimate(Event Player) == True;
}

actions
{
Set Status(Event Player, Null, Phased Out, 3.500);
Create Effect(All Players(All Teams), Reaper Wraith Form Effect, Color(Team 1), Event Player, 1, None);
Event Player.TempFX = Last Created Entity;
Small Message(Event Player, Custom String("PROTECTED — PHASED OUT"));
Wait Until(!Is Using Ultimate(Event Player), 5);
Destroy Effect(Event Player.TempFX);
}
}

rule("[EP1] Bastion Protection")
{
event
{
Ongoing - Each Player;
Team 1;
All;
}

conditions
{
Hero Of(Event Player) == Hero(Bastion);
Is Using Ultimate(Event Player) == True;
}

actions
{
Set Status(Event Player, Null, Phased Out, 20);
Create Effect(All Players(All Teams), Reaper Wraith Form Effect, Color(Team 1), Event Player, 1, None);
Event Player.TempFX = Last Created Entity;
Small Message(Event Player, Custom String("PROTECTED — PHASED OUT"));
Wait Until(!Is Using Ultimate(Event Player), 20);
Wait(0.500, Ignore Condition);
Clear Status(Event Player, Phased Out);
Destroy Effect(Event Player.TempFX);
}
}

rule("[EP1] Junk Protection")
{
event
{
Ongoing - Each Player;
Team 1;
Junkrat;
}

conditions
{
Is Using Ultimate(Event Player) == True;
}

actions
{
Set Damage Received(Event Player, 25);
Create Effect(All Players(All Teams), Baptiste Immortality Field Protected Effect, Color(Team 1), Event Player, 1, None);
Event Player.TempFX = Last Created Entity;
Small Message(Event Player, Custom String("PROTECTED — 75% LESS DAMAGE"));
Wait Until(!Is Using Ultimate(Event Player), 9999);
Wait(1.500, Ignore Condition);
Set Damage Received(Event Player, 100);
Destroy Effect(Event Player.TempFX);
}
}

rule("[EP1] Mercy Protection")
{
event
{
Ongoing - Each Player;
Team 1;
Mercy;
}

conditions
{
Is Using Ability 2(Event Player) == True;
}

actions
{
Set Damage Received(Event Player, 25);
Set Knockback Received(Event Player, 15);
Create Effect(All Players(All Teams), Baptiste Immortality Field Protected Effect, Color(Team 1), Event Player, 1, None);
Event Player.TempFX = Last Created Entity;
Small Message(Event Player, Custom String("PROTECTED — 75% LESS DAMAGE"));
Wait Until(!Is Using Ability 2(Event Player), 10);
Wait(0.500, Ignore Condition);
Set Damage Received(Event Player, 100);
Set Knockback Received(Event Player, 100);
Destroy Effect(Event Player.TempFX);
}
}

rule("[EP1] Orisa Stun")
{
event
{
Player Took Damage;
Team 1;
Orisa;
}

conditions
{
Is Using Ability 1(Event Player) == True;
(Event Ability == Button(Primary Fire) || Event Ability == Button(Ability 1)) == True;
Attacker != Global.BossRein;
}

actions
{
Set Status(Attacker, Null, Stunned, 1);
}
}

rule("[EP1] Orisa Protection")
{
event
{
Ongoing - Each Player;
Team 1;
Orisa;
}

conditions
{
Is Using Ultimate(Event Player) == True;
}

actions
{
Set Damage Received(Event Player, 15);
Set Damage Dealt(Event Player, 125 + Global.CurrentWave * 3);
Create Effect(All Players(All Teams), Baptiste Immortality Field Protected Effect, Color(Team 1), Event Player, 1, None);
Event Player.TempFX = Last Created Entity;
Small Message(Event Player, Custom String("PROTECTED — 85% LESS DAMAGE"));
Wait Until(!Is Using Ultimate(Event Player), 9999);
Set Damage Dealt(Event Player, 100);
Wait(3, Ignore Condition);
Set Damage Received(Event Player, 100);
Destroy Effect(Event Player.TempFX);
}
}

rule("[EP1] Ashe Reload")
{
event
{
Ongoing - Each Player;
Team 1;
Ashe;
}

conditions
{
Is Reloading(Event Player) == True;
}

actions
{
Wait(1.850, Abort When False);
Set Ammo(Event Player, 0, Max Ammo(Event Player, 0));
}
}

rule("[EP1] D.Va Ult")
{
event
{
Ongoing - Each Player;
Team 1;
All;
}

conditions
{
Hero Of(Event Player) == Hero(D.Va);
Is In Alternate Form(Event Player) == False;
}

actions
{
Set Ultimate Charge(Event Player, 0);
}
}

rule("[EP2] Hack Sleep")
{
event
{
Ongoing - Each Player;
Team 2;
All;
}

conditions
{
Has Status(Event Player, Hacked) == True;
Global.BossRein != Event Player;
}

actions
{
Set Status(Event Player, Null, Asleep, 3);
}
}

rule("[EP1] Brig Giant")
{
event
{
Ongoing - Each Player;
Team 1;
Brigitte;
}

conditions
{
Is Using Ultimate(Event Player) == True;
}

actions
{
Start Scaling Player(Event Player, 1.300, False);
Small Message(Event Player, Custom String("{0} RANGE INCREASED!", Ability Icon String(Hero(Brigitte), Button(Primary Fire))));
Wait Until(!Is Using Ultimate(Event Player), 99999);
Stop Scaling Player(Event Player);
}
}

rule("[EP1] Brig Area Stun")
{
event
{
Player Dealt Damage;
Team 1;
Brigitte;
}

conditions
{
Event Ability == Button(Primary Fire);
Is Firing Secondary(Event Player) == True;
}

actions
{
Event Player.Array = Players Within Radius(Victim, 3, Team 2, Surfaces And Enemy Barriers);
Set Status(Event Player.Array, Event Player, Stunned, 0.750);
Damage(Event Player.Array, Event Player, 50);
}
}

rule("[EP1] Sig & Cass Ult")
{
event
{
Ongoing - Each Player;
Team 1;
All;
}

conditions
{
Is Using Ultimate(Event Player) == True;
Is True For Any(Array(Hero(Cassidy), Hero(Sigma)), Hero Of(Event Player) == Current Array Element) == True;
}

actions
{
Set Ultimate Charge(Remove From Array(Players On Hero(Hero Of(Event Player), Team 1), Event Player), 0);
Wait Until(!Is Using Ultimate(Event Player), 20);
Set Ultimate Charge(Remove From Array(Players On Hero(Hero Of(Event Player), Team 1), Event Player), 0);
}
}

rule("[EP1] Ana Poison")
{
event
{
Player Dealt Damage;
Team 1;
Ana;
}

conditions
{
Event Ability == Button(Ability 2);
}

actions
{
Start Damage Over Time(Victim, Event Player, 10, Event Damage / 3);
}
}

rule("[EP1] Widow Ulting")
{
event
{
Ongoing - Each Player;
Team 1;
Widowmaker;
}

conditions
{
Is Using Ultimate(Event Player) == True;
}

actions
{
Small Message(Event Player, Custom String("{0} 3X MORE DAMAGE (8X HEADSHOT)!", Ability Icon String(Hero(Widowmaker), Button(
Primary Fire))));
}
}

rule("[EP1] Widow Ulted Damage")
{
event
{
Player Dealt Damage;
Team 1;
Widowmaker;
}

conditions
{
Event Ability == Button(Primary Fire);
Is Firing Secondary(Event Player) == True;
Is Using Ultimate(Event Player) == True;
}

actions
{
Damage(Victim, Event Player, Event Damage * (Event Was Critical Hit ? 7 : 2));
}
}

rule("[EP1] Widow No Penalty")
{
event
{
Ongoing - Each Player;
Team 1;
Widowmaker;
}

conditions
{
Is Firing Secondary(Event Player) == True;
}

actions
{
Wait(0.340, Abort When False);
Set Move Speed(Event Player, 250);
Wait Until(!Is Firing Secondary(Event Player) || !Is Button Held(Event Player, Button(Secondary Fire)), 99999);
Set Move Speed(Event Player, 100);
}
}

rule("[EP1] Hog Insta Heal")
{
event
{
Ongoing - Each Player;
Team 1;
Roadhog;
}

conditions
{
Is Using Ability 2(Event Player) == True;
}

actions
{
Wait(0.500, Abort When False);
Cancel Primary Action(Event Player);
Start Heal Over Time(Event Player, Event Player, 2, 175);
}
}

rule("[EP1] Hog No Penalty")
{
event
{
Ongoing - Each Player;
Team 1;
Roadhog;
}

conditions
{
Is Using Ultimate(Event Player) == True;
}

actions
{
Set Move Speed(Event Player, 133.333);
Wait Until(!Is Using Ultimate(Event Player), 10);
Set Move Speed(Event Player, 100);
}
}

rule("[EP1] Doom No Penalty")
{
event
{
Ongoing - Each Player;
Team 1;
Doomfist;
}

conditions
{
Is Firing Secondary(Event Player) == True;
}

actions
{
Set Move Speed(Event Player, 200);
Wait Until(!Is Firing Secondary(Event Player) || !Is Button Held(Event Player, Button(Secondary Fire)), 10);
Set Move Speed(Event Player, 100);
}
}

rule("[EP1] D.Va No Penalty")
{
event
{
Ongoing - Each Player;
Team 1;
D.Va;
}

conditions
{
Is Firing Primary(Event Player) == True;
Is Using Ability 1(Event Player) == False;
Is In Alternate Form(Event Player) == False;
}

actions
{
Set Move Speed(Event Player, 166.666);
Wait Until(!Is Firing Primary(Event Player) || Is Using Ability 1(Event Player), 99999);
Set Move Speed(Event Player, 100);
}
}

rule("[EP1] Sym Damage")
{
event
{
Player Dealt Damage;
Team 1;
Symmetra;
}

conditions
{
Event Ability == Button(Primary Fire);
}

actions
{
Event Player.Target = Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + Facing Direction Of(
Event Player) * 12, All Players(Team 2), All Players(Team 1), True);
Damage(Remove From Array(Players Within Radius(Event Player.Target, 3, Team 2, Surfaces And Enemy Barriers), Victim), Event Player,
Event Damage * 0.720);
Play Effect(All Players(All Teams), Winston Jump Pack Landing Effect, Color(Team 1), Event Player.Target, 1);
Wait(0.300, Ignore Condition);
}
}

rule("[EP1] Bap Area Push")
{
event
{
Ongoing - Each Player;
Team 1;
Baptiste;
}

conditions
{
Is Using Ability 1(Event Player) == True;
}

actions
{
Wait(0.200, Ignore Condition);
Event Player.Array = Players Within Radius(Event Player, 10, Team 2, Surfaces And Enemy Barriers);
For Player Variable(Event Player, CtrlVar, 0, Count Of(Event Player.Array), 1);
Event Player.Target = Event Player.Array[Event Player.CtrlVar];
Apply Impulse(Event Player.Target, Up, 3, To World, Cancel Contrary Motion);
Apply Impulse(Event Player.Target, Direction Towards(Vector(X Component Of(Position Of(Event Player)), 0, Z Component Of(
Position Of(Event Player))), Event Player.Target), 7, To World, Cancel Contrary Motion);
End;
}
}

rule("[EP1] Pharah Concussive Freeze")
{
event
{
Player Dealt Knockback;
Team 1;
Pharah;
}

conditions
{
Event Ability == Button(Ability 2);
Victim != Event Player;
}

actions
{
Set Status(Victim, Event Player, Frozen, 1.200);
}
}

Players | 1 - 12
Categories: Team Deathmatch
Heroes: D.va, Doomfist, Junker Queen, Orisa, Ramattra, and 31 more...
Created at:
Last updated:

Similar Codes

Join the Workshop.codes Discord