Back to home
This game is archived.
If you with to unarchive it, click the "restore" button in the options menu.

Category:
Custom game mode

Author:
CactusPuppy

Rating:
1

Version:
1.2.0

Posted:
5 months ago

Last updated:
5 months ago

Tags:
draft mode captains draft

Project Links

Share this workshop!

Options

Description

This gamemode pretty much emulates the Captain's Draft from DOTA. At the start of the game, both teams must obtain a captain/leader by that player pressing Crouch + Interact. Once both teams have a leader, the ban phases start, which prevents both teams from playing the banned heroes. After the bans are finished, both teams will take turns drafting heroes, with Team 1 getting one pick, then Team 2 getting 2, then back to Team 1 for two picks, etc. Heroes that are picked by one team become unavailable to the other team. After enough heroes are drafted, teams will play the game as normal after a brief period where teams can set up team compositions with their drafted picks.

Notes

  • The number of heroes that are banned / drafted can be changed in the Workshop section quite easily.
  • If the video didn't make it obvious, I'm using my Up voiceline to simulate Team 2 running out of time, and the Down voiceline to simulate both teams getting captains.
  • If a captain leaves the game, the lobby will need to be restarted
rule("N = Number of heroes to draft per team ||| O = Number of heroes to ban per team ||| P = Time Per Phase")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Set Global Variable(N, 12);
		Set Global Variable(O, 2);
		Set Global Variable(P, 25);
	}
}

disabled rule("DEBUG: On Voice Line Down, advance phase")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(D) == True;
		Is Communicating(Event Player, Voice Line Down) == True;
	}

	actions
	{
		Modify Global Variable(S, Add, 1);
	}
}

disabled rule("DEBUG: On Voice Line Up, set U to 0")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(D) == True;
		Is Communicating(Event Player, Voice Line Up) == True;
	}

	actions
	{
		Set Global Variable(U, 0);
	}
}

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

rule("Setup: Create Common Hero Pool (H), Team 1 Hero Pool (I), Team 2 Hero Pool (J)")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Set Global Variable(F, Empty Array);
		Set Global Variable(H, All Heroes);
		Set Global Variable(I, Empty Array);
		Set Global Variable(J, Empty Array);
		Create HUD Text(All Players(All Teams), String("{0}:", String("{0} {1}", Team 1, String("Leader", Null, Null, Null), Null), Null,
			Null), Null, Null, Left, -1.000, Team 2, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), String("{0}:", String("{0} {1}", Team 2, String("Leader", Null, Null, Null), Null), Null,
			Null), Null, Null, Right, -1.000, Team 1, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(Y), !=, 0)), Global Variable(Y), Null, Null, Left,
			-0.900, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Global Variable(Z), !=, 0)), Global Variable(Z), Null, Null, Right,
			-0.900, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, String("----------", Null, Null, Null), Left, -0.500, White, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, String("----------", Null, Null, Null), Right, -0.500, White, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, String("*", Null, Null, Null), Top, 1, White, White, White,
			Visible To and String, Visible Never);
		Modify Global Variable(F, Append To Array, Last Text ID);
		Create HUD Text(All Players(All Teams), Null, Null, String("*", Null, Null, Null), Top, 1.100, White, White, White,
			Visible To and String, Visible Never);
		Modify Global Variable(F, Append To Array, Last Text ID);
		Set Global Variable(E, Empty Array);
		Modify Global Variable(E, Append To Array, 0);
		Modify Global Variable(E, Append To Array, 0);
		Modify Global Variable(E, Append To Array, 0);
		Modify Global Variable(E, Append To Array, 0);
	}
}

rule("Setup: Create Banned Heroes Display")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Team 1, String("Banned", Null, Null, Null), Null),
			String("{0} / {1}", Count Of(Global Variable(K)), Global Variable(O), Null), Null), Null, Null, Left, 0, Team 2, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Team 2, String("Banned", Null, Null, Null), Null),
			String("{0} / {1}", Count Of(Global Variable(L)), Global Variable(O), Null), Null), Null, Null, Right, 0, Team 1, White, White,
			Visible To and String, Default Visibility);
		Set Global Variable(K, Empty Array);
		Set Global Variable(L, Empty Array);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(K)), >=, 1)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 0), 0), Count Of(Global Variable(K))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(K), Modulo(Add(Value In Array(Global Variable(E), 0), 0), Count Of(Global Variable(K))))),
			Value In Array(Global Variable(K), Modulo(Add(Value In Array(Global Variable(E), 0), 0), Count Of(Global Variable(K)))), Null),
			Null), Null, Null, Left, 1, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(K)), >=, 2)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 0), 1), Count Of(Global Variable(K))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(K), Modulo(Add(Value In Array(Global Variable(E), 0), 1), Count Of(Global Variable(K))))),
			Value In Array(Global Variable(K), Modulo(Add(Value In Array(Global Variable(E), 0), 1), Count Of(Global Variable(K)))), Null),
			Null), Null, Null, Left, 1.100, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(K)), >=, 3)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 0), 2), Count Of(Global Variable(K))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(K), Modulo(Add(Value In Array(Global Variable(E), 0), 2), Count Of(Global Variable(K))))),
			Value In Array(Global Variable(K), Modulo(Add(Value In Array(Global Variable(E), 0), 2), Count Of(Global Variable(K)))), Null),
			Null), Null, Null, Left, 1.200, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(K)), >=, 4)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 0), 3), Count Of(Global Variable(K))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(K), Modulo(Add(Value In Array(Global Variable(E), 0), 3), Count Of(Global Variable(K))))),
			Value In Array(Global Variable(K), Modulo(Add(Value In Array(Global Variable(E), 0), 3), Count Of(Global Variable(K)))), Null),
			Null), Null, Null, Left, 1.300, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(L)), >=, 1)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 2), 0), Count Of(Global Variable(L))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(L), Modulo(Add(Value In Array(Global Variable(E), 2), 0), Count Of(Global Variable(L))))),
			Value In Array(Global Variable(L), Modulo(Add(Value In Array(Global Variable(E), 2), 0), Count Of(Global Variable(L)))), Null),
			Null), Null, Null, Right, 1, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(L)), >=, 2)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 2), 1), Count Of(Global Variable(L))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(L), Modulo(Add(Value In Array(Global Variable(E), 2), 1), Count Of(Global Variable(L))))),
			Value In Array(Global Variable(L), Modulo(Add(Value In Array(Global Variable(E), 2), 1), Count Of(Global Variable(L)))), Null),
			Null), Null, Null, Right, 1.100, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(L)), >=, 3)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 2), 2), Count Of(Global Variable(L))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(L), Modulo(Add(Value In Array(Global Variable(E), 2), 2), Count Of(Global Variable(L))))),
			Value In Array(Global Variable(L), Modulo(Add(Value In Array(Global Variable(E), 2), 2), Count Of(Global Variable(L)))), Null),
			Null), Null, Null, Right, 1.200, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(L)), >=, 4)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 2), 3), Count Of(Global Variable(L))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(L), Modulo(Add(Value In Array(Global Variable(E), 2), 3), Count Of(Global Variable(L))))),
			Value In Array(Global Variable(L), Modulo(Add(Value In Array(Global Variable(E), 2), 3), Count Of(Global Variable(L)))), Null),
			Null), Null, Null, Right, 1.300, White, White, White, Visible To and String, Default Visibility);
	}
}

rule("Setup: Create Hero Pool Display")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Team 1, String("Picked", Null, Null, Null), Null),
			String("{0} / {1}", Count Of(Global Variable(I)), Global Variable(N), Null), Null), Null, Null, Left, 2, Team 2, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Team 2, String("Picked", Null, Null, Null), Null),
			String("{0} / {1}", Count Of(Global Variable(J)), Global Variable(N), Null), Null), Null, Null, Right, 2, Team 1, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(I)), >=, 1)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 1), 0), Count Of(Global Variable(I))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 0), Count Of(Global Variable(I))))),
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 0), Count Of(Global Variable(I)))), Null),
			Null), Null, Null, Left, 3, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(I)), >=, 2)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 1), 1), Count Of(Global Variable(I))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 1), Count Of(Global Variable(I))))),
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 1), Count Of(Global Variable(I)))), Null),
			Null), Null, Null, Left, 3.100, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(I)), >=, 3)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 1), 2), Count Of(Global Variable(I))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 2), Count Of(Global Variable(I))))),
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 2), Count Of(Global Variable(I)))), Null),
			Null), Null, Null, Left, 3.200, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(I)), >=, 4)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 1), 3), Count Of(Global Variable(I))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 3), Count Of(Global Variable(I))))),
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 3), Count Of(Global Variable(I)))), Null),
			Null), Null, Null, Left, 3.300, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(I)), >=, 5)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 1), 4), Count Of(Global Variable(I))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 4), Count Of(Global Variable(I))))),
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 4), Count Of(Global Variable(I)))), Null),
			Null), Null, Null, Left, 3.400, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(I)), >=, 6)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 1), 5), Count Of(Global Variable(I))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 5), Count Of(Global Variable(I))))),
			Value In Array(Global Variable(I), Modulo(Add(Value In Array(Global Variable(E), 1), 5), Count Of(Global Variable(I)))), Null),
			Null), Null, Null, Left, 3.500, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(J)), >=, 1)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 3), 0), Count Of(Global Variable(J))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 0), Count Of(Global Variable(J))))),
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 0), Count Of(Global Variable(J)))), Null),
			Null), Null, Null, Right, 3, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(J)), >=, 2)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 3), 1), Count Of(Global Variable(J))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 1), Count Of(Global Variable(J))))),
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 1), Count Of(Global Variable(J)))), Null),
			Null), Null, Null, Right, 3.100, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(J)), >=, 3)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 3), 2), Count Of(Global Variable(J))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 2), Count Of(Global Variable(J))))),
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 2), Count Of(Global Variable(J)))), Null),
			Null), Null, Null, Right, 3.200, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(J)), >=, 4)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 3), 3), Count Of(Global Variable(J))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 3), Count Of(Global Variable(J))))),
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 3), Count Of(Global Variable(J)))), Null),
			Null), Null, Null, Right, 3.300, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(J)), >=, 5)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 3), 4), Count Of(Global Variable(J))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 4), Count Of(Global Variable(J))))),
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 4), Count Of(Global Variable(J)))), Null),
			Null), Null, Null, Right, 3.400, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Filtered Array(All Players(All Teams), Compare(Count Of(Global Variable(J)), >=, 6)), String("{0} - {1}", Add(
			Modulo(Add(Value In Array(Global Variable(E), 3), 5), Count Of(Global Variable(J))), 1), String("{0} {1}", Hero Icon String(
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 5), Count Of(Global Variable(J))))),
			Value In Array(Global Variable(J), Modulo(Add(Value In Array(Global Variable(E), 3), 5), Count Of(Global Variable(J)))), Null),
			Null), Null, Null, Right, 3.500, White, White, White, Visible To and String, Default Visibility);
	}
}

rule("While Draft Mode is Active, ensure that players cannot move")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(D) == True;
		Is In Setup == True;
		Has Spawned(Event Player) == True;
	}

	actions
	{
		Set Ability 1 Enabled(Event Player, False);
		Set Ability 2 Enabled(Event Player, False);
		Set Primary Fire Enabled(Event Player, False);
		Set Secondary Fire Enabled(Event Player, False);
		Set Ultimate Ability Enabled(Event Player, False);
		Set Status(Event Player, Null, Rooted, 9999);
	}
}

rule("While Draft Mode is active, prevent emoting to move")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(D) == True;
		Is Communicating Any Emote(Event Player) == True;
	}

	actions
	{
		Set Status(Event Player, Null, Stunned, 0.016);
	}
}

rule("While Draft Mode is Active, ensure that the game does not exit setup")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(T) > 0;
		Is In Setup == True;
	}

	actions
	{
		Set Match Time(Global Variable(T));
		Pause Match Time;
		Wait(0.950, Ignore Condition);
		Loop If Condition Is True;
	}
}

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

rule("E[0]: Team 1 Ban Scroll")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Count Of(Global Variable(K)) >= 5;
		Global Variable(S) >= 0;
	}

	actions
	{
		Modify Global Variable At Index(E, 0, Add, 1);
		Modify Global Variable At Index(E, 0, Modulo, Count Of(Global Variable(K)));
		Wait(1.500, Ignore Condition);
		Loop If Condition Is True;
		Set Global Variable At Index(E, 0, 0);
	}
}

rule("E[1]: Team 1 Pick Scroll")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Count Of(Global Variable(I)) >= 7;
		Global Variable(S) >= 0;
	}

	actions
	{
		Modify Global Variable At Index(E, 1, Add, 1);
		Modify Global Variable At Index(E, 1, Modulo, Count Of(Global Variable(I)));
		Wait(0.700, Ignore Condition);
		Loop If Condition Is True;
		Set Global Variable At Index(E, 1, 0);
	}
}

rule("E[2]: Team 2 Ban Scroll")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Count Of(Global Variable(L)) >= 5;
		Global Variable(S) >= 0;
	}

	actions
	{
		Modify Global Variable At Index(E, 2, Add, 1);
		Modify Global Variable At Index(E, 2, Modulo, Count Of(Global Variable(L)));
		Wait(1.500, Ignore Condition);
		Loop If Condition Is True;
		Set Global Variable At Index(E, 2, 0);
	}
}

rule("E[3]: Team 2 Pick Scroll")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Count Of(Global Variable(J)) >= 7;
		Global Variable(S) >= 0;
	}

	actions
	{
		Modify Global Variable At Index(E, 3, Add, 1);
		Modify Global Variable At Index(E, 3, Modulo, Count Of(Global Variable(J)));
		Wait(0.700, Ignore Condition);
		Loop If Condition Is True;
		Set Global Variable At Index(E, 3, 0);
	}
}

disabled rule("Phase 1: Captain Selection ||| Y=Team 1 Captain ||| Z=Team 2 Captain")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Set Draft Mode (D), State Counter (S), Create Text (G), and skip to setup")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is Assembling Heroes == True;
		Global Variable(D) != True;
		Global Variable(S) == 0;
	}

	actions
	{
		Set Global Variable(D, True);
		Set Global Variable(S, 0);
		Set Match Time(0);
		Wait(0.010, Ignore Condition);
		Set Global Variable(T, Match Time);
		Pause Match Time;
		Destroy HUD Text(Global Variable(G));
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("Current Phase", Null, Null, Null), String("{0} {1}", String(
			"Selecting", Null, Null, Null), String("Leaders", Null, Null, Null), Null), Null), Null, Null, Top, 0, White, White, White,
			Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
	}
}

rule("Create Text for Team 1 (A) and Team 2 (B) that tells them to Interact to become Captain")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 0;
	}

	actions
	{
		Create HUD Text(All Players(Team 1), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Secure", Null, Null, Null), String("Leader", Null, Null, Null), Null),
			Null), Null, Null, Top, 2, White, White, White, Visible To and String, Visible Never);
		Set Global Variable(A, Last Text ID);
		Create HUD Text(All Players(Team 2), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Secure", Null, Null, Null), String("Leader", Null, Null, Null), Null),
			Null), Null, Null, Top, 2, White, White, White, Visible To and String, Visible Never);
		Set Global Variable(B, Last Text ID);
	}
}

rule("Listen for players during Draft Mode, and make captain if there is none, deleting prompt to become captain")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(D) == True;
		Is Button Held(Event Player, Crouch) == True;
		Is Button Held(Event Player, Interact) == True;
		Is True For Any(All Players(Team Of(Event Player)), Compare(Player Variable(Current Array Element, C), ==, True)) == False;
	}

	actions
	{
		Set Player Variable(Event Player, C, True);
		Big Message(All Players(Team Of(Event Player)), String("{0}: {1}", String("Leader", Null, Null, Null), Event Player, Null));
		Play Effect(All Players(Team Of(Event Player)), Good Pickup Effect, Sky Blue, Event Player, 2);
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, Event Player, 200);
		Skip If(Compare(Team Of(Event Player), ==, Team 1), 5);
		Destroy HUD Text(Global Variable(B));
		Create HUD Text(All Players(Team 2), String("{0}: {1}", String("{0} {1}", String("Team", Null, Null, Null), String("Leader", Null,
			Null, Null), Null), Event Player, Null), Null, Null, Top, 2, White, White, White, Visible To and String, Visible Never);
		Set Global Variable(B, Last Text ID);
		Set Global Variable(Z, Event Player);
		Skip(4);
		Destroy HUD Text(Global Variable(A));
		Create HUD Text(All Players(Team 1), String("{0}: {1}", String("{0} {1}", String("Team", Null, Null, Null), String("Leader", Null,
			Null, Null), Null), Event Player, Null), Null, Null, Top, 2, White, White, White, Visible To and String, Visible Never);
		Set Global Variable(A, Last Text ID);
		Set Global Variable(Y, Event Player);
	}
}

rule("When both teams have selected a captain (P_C = TRUE), move on to Phase 2: Bans")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Is True For Any(All Players(Team 1), Compare(Player Variable(Current Array Element, C), ==, True)) == True;
		Is True For Any(All Players(Team 2), Compare(Player Variable(Current Array Element, C), ==, True)) == True;
	}

	actions
	{
		Set Global Variable(S, 1);
	}
}

disabled rule("Phase 2: Bans")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Set Team 1 to active team (R), start timer (U), track phases elapsed each team (V/W), and prompts (Y_T/Z_T)")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 1;
	}

	actions
	{
		Set Global Variable(R, Team 1);
		Destroy HUD Text(Global Variable(G));
		Set Global Variable(U, Global Variable(P));
		Chase Global Variable At Rate(U, 0, 1, Destination and Rate);
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Global Variable(R), String("Banning", Null, Null,
			Null), Null), String("{0} {1}", String("{0} sec", Round To Integer(Global Variable(U), Up), Null, Null), String("Remaining",
			Null, Null, Null), Null), Null), Null, Null, Top, 0, Team 2, White, White, Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
		Create HUD Text(Global Variable(Y), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Ban", Null, Null, Null), Hero Icon String(Hero Of(Global Variable(Y))),
			Null), Null), Null, Null, Top, 3, Yellow, White, White, Visible To and String, Default Visibility);
		Set Player Variable(Global Variable(Y), T, Last Text ID);
	}
}

rule("Team 1 Ban Selection")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 1;
		Global Variable(R) == Team 1;
		Player Variable(Event Player, C) == True;
		Is Button Held(Event Player, Crouch) == True;
		Is Button Held(Event Player, Interact) == True;
	}

	actions
	{
		Set Global Variable(X, Hero Of(Event Player));
		Modify Global Variable(K, Append To Array, Global Variable(X));
		Modify Global Variable(H, Remove From Array By Value, Global Variable(X));
		Start Forcing Player To Be Hero(Filtered Array(All Players(All Teams), And(Compare(Player Variable(Current Array Element, C), ==,
			True), Compare(Hero Of(Current Array Element), ==, Global Variable(X)))), Random Value In Array(Global Variable(H)));
		Stop Forcing Player To Be Hero(Filtered Array(All Players(All Teams), Compare(Player Variable(Current Array Element, C), ==,
			True)));
		Set Player Allowed Heroes(Filtered Array(All Players(All Teams), Compare(Player Variable(Current Array Element, C), ==, True)),
			Global Variable(H));
		Destroy HUD Text(Global Variable(G));
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Global Variable(R), String("Banning", Null, Null,
			Null), Null), String("{0} {1}", String("{0} sec", Round To Integer(Global Variable(U), Up), Null, Null), String("Remaining",
			Null, Null, Null), Null), Null), Null, Null, Top, 0, Team 1, White, White, Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
		Destroy HUD Text(Player Variable(Event Player, T));
		Create HUD Text(Global Variable(Z), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Ban", Null, Null, Null), Hero Icon String(Hero Of(Global Variable(Z))),
			Null), Null), Null, Null, Top, 3, Yellow, White, White, Visible To and String, Default Visibility);
		Set Player Variable(Global Variable(Z), T, Last Text ID);
		Set Global Variable(U, Global Variable(P));
		Chase Global Variable At Rate(U, 0, 1, Destination and Rate);
		Modify Global Variable(V, Add, 1);
		Set Global Variable(R, Team 2);
		Wait(0.016, Ignore Condition);
		Big Message(All Players(All Teams), String("{0}: {1}", Team 1, String("{0} {1}", String("Banned", Null, Null, Null),
			Hero Icon String(Last Of(Global Variable(K))), Null), Null));
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 200);
	}
}

rule("Team 2 Ban Selection")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 1;
		Global Variable(R) == Team 2;
		Player Variable(Event Player, C) == True;
		Is Button Held(Event Player, Crouch) == True;
		Is Button Held(Event Player, Interact) == True;
	}

	actions
	{
		Set Global Variable(X, Hero Of(Event Player));
		Modify Global Variable(L, Append To Array, Global Variable(X));
		Modify Global Variable(H, Remove From Array By Value, Global Variable(X));
		Start Forcing Player To Be Hero(Filtered Array(All Players(All Teams), And(Compare(Player Variable(Current Array Element, C), ==,
			True), Compare(Hero Of(Current Array Element), ==, Global Variable(X)))), Random Value In Array(Global Variable(H)));
		Stop Forcing Player To Be Hero(Filtered Array(All Players(All Teams), Compare(Player Variable(Current Array Element, C), ==,
			True)));
		Set Player Allowed Heroes(Filtered Array(All Players(All Teams), Compare(Player Variable(Current Array Element, C), ==, True)),
			Global Variable(H));
		Set Global Variable(R, Team 1);
		Destroy HUD Text(Global Variable(G));
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Global Variable(R), String("Banning", Null, Null,
			Null), Null), String("{0} {1}", String("{0} sec", Round To Integer(Global Variable(U), Up), Null, Null), String("Remaining",
			Null, Null, Null), Null), Null), Null, Null, Top, 0, Team 2, White, White, Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
		Destroy HUD Text(Player Variable(Event Player, T));
		Create HUD Text(Global Variable(Y), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Ban", Null, Null, Null), Hero Icon String(Hero Of(Global Variable(Y))),
			Null), Null), Null, Null, Top, 3, Yellow, White, White, Visible To and String, Default Visibility);
		Set Player Variable(Global Variable(Y), T, Last Text ID);
		Set Global Variable(U, Global Variable(P));
		Chase Global Variable At Rate(U, 0, 1, Destination and Rate);
		Modify Global Variable(W, Add, 1);
		Wait(0.016, Ignore Condition);
		Big Message(All Players(All Teams), String("{0}: {1}", Team 2, String("{0} {1}", String("Banned", Null, Null, Null),
			Hero Icon String(Last Of(Global Variable(L))), Null), Null));
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 200);
	}
}

rule("If time (U) runs out, hand ban selection to other team")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 1;
		Or(Compare(Global Variable(R), ==, Team 1), Compare(Global Variable(R), ==, Team 2)) == True;
		Global Variable(U) == 0;
	}

	actions
	{
		Set Global Variable(R, Opposite Team Of(Global Variable(R)));
		Big Message(All Players(All Teams), String("{0}: {1}", Opposite Team Of(Global Variable(R)), String("{0} {1}", String("No", Null,
			Null, Null), String("Ban", Null, Null, Null), Null), Null));
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, First Of(All Players(All Teams)), 200);
		Set Global Variable(U, Global Variable(P));
		Chase Global Variable At Rate(U, 0, 1, Destination and Rate);
		Destroy HUD Text(Global Variable(G));
		Skip If(Compare(Global Variable(R), ==, Team 2), 8);
		Modify Global Variable(L, Append To Array, Null);
		Modify Global Variable(W, Add, 1);
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Global Variable(R), String("Banning", Null, Null,
			Null), Null), String("{0} {1}", String("{0} sec", Round To Integer(Global Variable(U), Up), Null, Null), String("Remaining",
			Null, Null, Null), Null), Null), Null, Null, Top, 0, Team 2, White, White, Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
		Destroy HUD Text(Player Variable(Global Variable(Z), T));
		Create HUD Text(Global Variable(Y), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Ban", Null, Null, Null), Hero Icon String(Hero Of(Global Variable(Y))),
			Null), Null), Null, Null, Top, 3, Yellow, White, White, Visible To and String, Default Visibility);
		Set Player Variable(Global Variable(Y), T, Last Text ID);
		Skip(7);
		Modify Global Variable(K, Append To Array, Null);
		Modify Global Variable(V, Add, 1);
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Global Variable(R), String("Banning", Null, Null,
			Null), Null), String("{0} {1}", String("{0} sec", Round To Integer(Global Variable(U), Up), Null, Null), String("Remaining",
			Null, Null, Null), Null), Null), Null, Null, Top, 0, Team 1, White, White, Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
		Destroy HUD Text(Player Variable(Global Variable(Y), T));
		Create HUD Text(Global Variable(Z), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Ban", Null, Null, Null), Hero Icon String(Hero Of(Global Variable(Z))),
			Null), Null), Null, Null, Top, 3, Yellow, White, White, Visible To and String, Default Visibility);
		Set Player Variable(Global Variable(Z), T, Last Text ID);
	}
}

rule("Once both teams have banned (O) heroes, move on to drafting")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 1;
		Global Variable(V) == Global Variable(O);
		Global Variable(W) == Global Variable(O);
	}

	actions
	{
		Set Global Variable(S, 2);
	}
}

disabled rule("Phase 3: Drafting")
{
	event
	{
		Ongoing - Global;
	}
}

rule("Set Team 1 to active team (R), reset (V) and (W), and set current select streak to 1 (C)")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 2;
	}

	actions
	{
		Destroy HUD Text(Player Variable(Global Variable(Y), T));
		Destroy HUD Text(Player Variable(Global Variable(Z), T));
		Set Global Variable(V, 0);
		Set Global Variable(W, 0);
		Set Global Variable(C, 1);
		Set Global Variable(R, Team 1);
		Set Global Variable(U, Global Variable(P));
		Chase Global Variable At Rate(U, 0, 1, Destination and Rate);
		Destroy HUD Text(Global Variable(G));
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Team 1, String("Picking", Null, Null, Null), Null),
			String("{0} {1}", String("{0} sec", Round To Integer(Global Variable(U), Up), Null, Null), String("Remaining", Null, Null,
			Null), Null), Null), Null, Null, Top, 0, Team 2, White, White, Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
		Create HUD Text(Global Variable(Y), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Pick", Null, Null, Null), Hero Icon String(Hero Of(Global Variable(Y))),
			Null), Null), Null, Null, Top, 3, Yellow, White, White, Visible To and String, Default Visibility);
		Set Player Variable(Global Variable(Y), T, Last Text ID);
	}
}

rule("Team Draft: Remove hero from global hero pool (H) and add to team hero pool (I/J)")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 2;
		Team Of(Event Player) == Global Variable(R);
		Player Variable(Event Player, C) == True;
		Is Button Held(Event Player, Crouch) == True;
		Is Button Held(Event Player, Interact) == True;
	}

	actions
	{
		Set Global Variable(X, Hero Of(Event Player));
		Set Global Variable(U, Global Variable(P));
		Chase Global Variable At Rate(U, 0, 1, Destination and Rate);
		Modify Global Variable(H, Remove From Array By Value, Global Variable(X));
		Start Forcing Player To Be Hero(Filtered Array(All Players(All Teams), And(Compare(Player Variable(Current Array Element, C), ==,
			True), Compare(Hero Of(Current Array Element), ==, Global Variable(X)))), Random Value In Array(Global Variable(H)));
		Stop Forcing Player To Be Hero(Filtered Array(All Players(All Teams), Compare(Player Variable(Current Array Element, C), ==,
			True)));
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, Event Player, 200);
		Skip If(Compare(Global Variable(R), ==, Team 2), 3);
		Set Global Variable(M, 1);
		Modify Global Variable(I, Append To Array, Global Variable(X));
		Skip(2);
		Set Global Variable(M, 2);
		Modify Global Variable(J, Append To Array, Global Variable(X));
		Set Player Allowed Heroes(Global Variable(Y), Global Variable(H));
		Set Player Allowed Heroes(Global Variable(Z), Global Variable(H));
		Modify Global Variable(C, Add, 1);
		Wait(0.016, Ignore Condition);
		Skip If(Compare(Global Variable(M), !=, 1), 1);
		Big Message(All Players(All Teams), String("{0}: {1}", Team 1, String("{0} {1}", String("Picked", Null, Null, Null),
			Hero Icon String(Last Of(Global Variable(I))), Null), Null));
		Skip If(Compare(Global Variable(M), !=, 2), 1);
		Big Message(All Players(All Teams), String("{0}: {1}", Team 2, String("{0} {1}", String("Picked", Null, Null, Null),
			Hero Icon String(Last Of(Global Variable(J))), Null), Null));
	}
}

rule("If time (U) runs out, choose random hero and advance streak")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 2;
		Or(Compare(Global Variable(R), ==, Team 1), Compare(Global Variable(R), ==, Team 2)) == True;
		Global Variable(U) == 0;
	}

	actions
	{
		Set Global Variable(X, Random Value In Array(Global Variable(H)));
		Set Global Variable(U, Global Variable(P));
		Chase Global Variable At Rate(U, 0, 1, Destination and Rate);
		Modify Global Variable(H, Remove From Array By Value, Global Variable(X));
		Start Forcing Player To Be Hero(Filtered Array(All Players(All Teams), And(Compare(Player Variable(Current Array Element, C), ==,
			True), Compare(Hero Of(Current Array Element), ==, Global Variable(X)))), Random Value In Array(Global Variable(H)));
		Stop Forcing Player To Be Hero(Filtered Array(All Players(All Teams), Compare(Player Variable(Current Array Element, C), ==,
			True)));
		Skip If(Compare(Global Variable(R), ==, Team 2), 4);
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, First Of(All Players(All Teams)), 200);
		Modify Global Variable(I, Append To Array, Global Variable(X));
		Set Global Variable(M, 1);
		Skip(3);
		Modify Global Variable(J, Append To Array, Global Variable(X));
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, Global Variable(Z), 200);
		Set Global Variable(M, 2);
		Set Player Allowed Heroes(Global Variable(Y), Global Variable(H));
		Set Player Allowed Heroes(Global Variable(Z), Global Variable(H));
		Modify Global Variable(C, Add, 1);
		Wait(0.016, Ignore Condition);
		Skip If(Compare(Global Variable(M), !=, 1), 1);
		Big Message(All Players(All Teams), String("{0}: {1}", Team 1, String("{0} {1}", String("Picked", Null, Null, Null),
			Hero Icon String(Last Of(Global Variable(I))), Null), Null));
		Skip If(Compare(Global Variable(M), !=, 2), 1);
		Big Message(All Players(All Teams), String("{0}: {1}", Team 2, String("{0} {1}", String("Picked", Null, Null, Null),
			Hero Icon String(Last Of(Global Variable(J))), Null), Null));
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, First Of(All Players(All Teams)), 200);
	}
}

rule("If active team reaches end of streak, switch to other team")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(D) == True;
		Global Variable(S) == 2;
		Global Variable(C) == 2;
	}

	actions
	{
		Destroy HUD Text(Global Variable(G));
		Set Global Variable(R, Opposite Team Of(Global Variable(R)));
		Set Global Variable(C, 0);
		Skip If(Compare(Global Variable(R), ==, Team 2), 6);
		Destroy HUD Text(Player Variable(Global Variable(Z), T));
		Create HUD Text(Global Variable(Y), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Pick", Null, Null, Null), Hero Icon String(Hero Of(Global Variable(Y))),
			Null), Null), Null, Null, Top, 3, Yellow, White, White, Visible To and String, Default Visibility);
		Set Player Variable(Global Variable(Y), T, Last Text ID);
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Team 1, String("Picking", Null, Null, Null), Null),
			String("{0} {1}", String("{0} sec", Round To Integer(Global Variable(U), Up), Null, Null), String("Remaining", Null, Null,
			Null), Null), Null), Null, Null, Top, 0, Team 2, White, White, Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
		Skip(5);
		Destroy HUD Text(Player Variable(Global Variable(Y), T));
		Create HUD Text(Global Variable(Z), String("{0}: {1}", String("{0}   {1}", String("Crouch", Null, Null, Null), String("Interact",
			Null, Null, Null), Null), String("{0} {1}", String("Pick", Null, Null, Null), Hero Icon String(Hero Of(Global Variable(Z))),
			Null), Null), Null, Null, Top, 3, Yellow, White, White, Visible To and String, Default Visibility);
		Set Player Variable(Global Variable(Z), T, Last Text ID);
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", Team 2, String("Picking", Null, Null, Null), Null),
			String("{0} {1}", String("{0} sec", Round To Integer(Global Variable(U), Up), Null, Null), String("Remaining", Null, Null,
			Null), Null), Null), Null, Null, Top, 0, Team 1, White, White, Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
	}
}

rule("Once both teams have drafted (N) heroes, start pseudo-assemble heroes phase")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Count Of(Global Variable(I)) == Global Variable(N);
		Count Of(Global Variable(J)) == Global Variable(N);
		Global Variable(S) == 2;
	}

	actions
	{
		Modify Global Variable(S, Add, 1);
		Big Message(All Players(All Teams), String("{0} {1}", String("{0} / {1}", String("Pick", Null, Null, Null), String("Ban", Null,
			Null, Null), Null), String("Finished", Null, Null, Null), Null));
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, All Players(All Teams), 200);
		Set Player Allowed Heroes(All Players(Team 1), Global Variable(I));
		Set Player Allowed Heroes(All Players(Team 2), Global Variable(J));
		Destroy HUD Text(Global Variable(A));
		Destroy HUD Text(Global Variable(B));
		Destroy HUD Text(Value In Array(Global Variable(F), 0));
		Destroy HUD Text(Value In Array(Global Variable(F), 1));
		Set Global Variable(U, 25);
		Chase Global Variable At Rate(U, 0, 1, Destination and Rate);
		Destroy HUD Text(Global Variable(G));
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("{0} {1}", String("Building", Null, Null, Null), String("Teams",
			Null, Null, Null), Null), String("{0} sec", Round To Integer(Global Variable(U), Up), Null, Null), Null), Null, Null, Top, 0,
			White, White, White, Visible To and String, Default Visibility);
		Set Global Variable(G, Last Text ID);
		Destroy HUD Text(Player Variable(Global Variable(Y), T));
		Destroy HUD Text(Player Variable(Global Variable(Z), T));
	}
}

rule("At end of pseudo-assemble, resume game")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global Variable(S) == 3;
		Global Variable(U) == 0;
	}

	actions
	{
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Global Variable(Y), 200);
		Set Global Variable(D, False);
		Destroy HUD Text(Global Variable(G));
		Set Ability 1 Enabled(All Players(All Teams), True);
		Set Ability 2 Enabled(All Players(All Teams), True);
		Set Primary Fire Enabled(All Players(All Teams), True);
		Set Secondary Fire Enabled(All Players(All Teams), True);
		Set Ultimate Ability Enabled(All Players(All Teams), True);
		Clear Status(All Players(All Teams), Rooted);
		Pause Match Time;
		Set Match Time(Global Variable(T));
		Unpause Match Time;
		Destroy All HUD Text;
		Set Global Variable(S, -100.000);
	}
}

disabled rule("Rule 34: Lenny Face")
{
	event
	{
		Ongoing - Global;
	}
}

disabled rule("If a captain leaves the game, reset back to Phase 0")
{
	event
	{
		Player Left Match;
		All;
		All;
	}

	conditions
	{
		Player Variable(Event Player, C) == True;
		And(Compare(Global Variable(S), >=, 0), Compare(Global Variable(S), <=, 2)) == True;
	}

	actions
	{
		Destroy HUD Text(Global Variable(A));
		Destroy HUD Text(Global Variable(B));
		Stop Chasing Global Variable(U);
		Set Global Variable(S, 0);
		Set Global Variable(H, All Heroes);
		Destroy HUD Text(Global Variable(G));
		Create HUD Text(All Players(All Teams), String("{0}: {1}", String("Current Phase", Null, Null, Null), String("{0} {1}", String(
			"Selecting", Null, Null, Null), String("Leaders", Null, Null, Null), Null), Null), Null, Null, Top, 0, White, White, White,
			Visible To and String, Visible Always);
		Set Global Variable(G, Last Text ID);
		Big Message(All Players(All Teams), String("{0}, {1}", String("{0} {1}", Event Player, String("Left", Null, Null, Null), Null),
			String("{0} {1}", String("Recovering", Null, Null, Null), String("...", Null, Null, Null), Null), Null));
		Set Global Variable(Y, Null);
		Set Global Variable(Z, Null);
		Set Player Variable(All Players(All Teams), C, 0);
	}
}

Changelog

5 months ago 1.2.0

Streamlined the ban/draft process by preventing captains from being put into the hero select screen with every selection.

EX1QSP
click to copy
5 months ago 1.1.0

Added sound effects for actions such as banning a hero, drafting a hero, and selecting a captain.

QP59D
click to copy
5 months ago 1.0.1

Fixed a bug where the prompt for team captains to pick a hero would stick around even after drafting was complete.

00ZQT
click to copy
5 months ago 1.0.0

This revision contains no notes

70SFR
click to copy