Create
Return to post

Comparing difference between and

View raw
  • settings
  • {
  • main
  • {
  • Description: "Minewatch. A Minesweeper remake for dps plebs stuck in queue. For up to 6 players. Someone had to do it. By Deadlibor#2872."
  • }
  • lobby
  • {
  • Max Team 2 Players: 0
  • }
  • modes
  • {
  • disabled Assault
  • {
  • Limit Roles: 2 Of Each Role Per Team
  • }
  • disabled Control
  • {
  • Limit Roles: 2 Of Each Role Per Team
  • }
  • disabled Escort
  • {
  • Limit Roles: 2 Of Each Role Per Team
  • }
  • disabled Hybrid
  • {
  • Limit Roles: 2 Of Each Role Per Team
  • }
  • Skirmish
  • {
  • Hero Limit: Off
  • Respawn Time Scalar: 30%
  • enabled maps
  • {
  • Workshop Expanse
  • Workshop Expanse Night
  • }
  • }
  • }
  • heroes
  • {
  • General
  • {
  • No Ammunition Requirement: On
  • }
  • }
  • main
  • {
  • Description: "Minewatch. A Minesweeper remake for dps plebs stuck in queue. For up to 6 players. Someone had to do it. By Deadlibor#2872. v1.1."
  • }
  • lobby
  • {
  • Max Team 2 Players: 0
  • }
  • modes
  • {
  • disabled Assault
  • {
  • Limit Roles: 2 Of Each Role Per Team
  • }
  • disabled Control
  • {
  • Limit Roles: 2 Of Each Role Per Team
  • }
  • disabled Escort
  • {
  • Limit Roles: 2 Of Each Role Per Team
  • }
  • disabled Hybrid
  • {
  • Limit Roles: 2 Of Each Role Per Team
  • }
  • Skirmish
  • {
  • Hero Limit: Off
  • Respawn Time Scalar: 30%
  • enabled maps
  • {
  • Workshop Expanse
  • Workshop Expanse Night
  • }
  • }
  • }
  • heroes
  • {
  • General
  • {
  • No Ammunition Requirement: On
  • Ana
  • {
  • No Scope: On
  • }
  • Ashe
  • {
  • No Scope: On
  • }
  • Baptiste
  • {
  • Secondary Fire: Off
  • }
  • Bastion
  • {
  • Self-Repair: Off
  • }
  • Brigitte
  • {
  • Barrier Shield: Off
  • }
  • D.Va
  • {
  • Defense Matrix: Off
  • }
  • Echo
  • {
  • Sticky Bombs: Off
  • }
  • Genji
  • {
  • Secondary Fire: Off
  • }
  • Lúcio
  • {
  • Soundwave: Off
  • }
  • McCree
  • {
  • Secondary Fire: Off
  • }
  • Mei
  • {
  • Secondary Fire: Off
  • }
  • Orisa
  • {
  • Halt!: Off
  • }
  • Reinhardt
  • {
  • Barrier Field: Off
  • }
  • Roadhog
  • {
  • Secondary Fire: Off
  • }
  • Sigma
  • {
  • Experimental Barrier: Off
  • }
  • Soldier: 76
  • {
  • Helix Rockets: Off
  • }
  • Sombra
  • {
  • Hack: Off
  • }
  • Symmetra
  • {
  • Secondary Fire: Off
  • }
  • Torbjörn
  • {
  • Secondary Fire: Off
  • }
  • Widowmaker
  • {
  • No Scope: On
  • }
  • Zarya
  • {
  • Secondary Fire: Off
  • }
  • Zenyatta
  • {
  • Secondary Fire: Off
  • }
  • }
  • }
  • }
  • variables
  • {
  • global:
  • 0: settings
  • 1: game_state
  • 2: grid_size
  • 3: mine_count
  • 4: game_over
  • 5: player_grid
  • 6: real_grid
  • 7: random
  • 10: cell_positions
  • 11: steps
  • 12: cooldown
  • 13: cells_left
  • 14: count
  • 15: taunts
  • 16: compliments
  • global:
  • 0: settings
  • 1: game_state
  • 2: grid_size
  • 3: mine_count
  • 4: game_over
  • 5: player_grid
  • 6: real_grid
  • 7: random
  • 10: cell_positions
  • 11: steps
  • 12: cooldown
  • 13: cells_left
  • 14: count
  • 15: taunts
  • 16: compliments
  • 17: timer
  • 18: mines_left
  • }
  • subroutines
  • {
  • 0: initialize
  • 2: draw_stuff
  • 3: game_over
  • 4: count_mines
  • 5: victory
  • 6: newgame
  • 0: initialize
  • 1: dump_mines
  • 2: draw_stuff
  • 3: game_over
  • 4: count_mines
  • 5: victory
  • 6: newgame
  • }
  • disabled rule("---------- SETUP ----------")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("setup")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.settings = Array();
  • Modify Global Variable(settings, Append To Array, Vector(-32, 30, -2));
  • Modify Global Variable(settings, Append To Array, Vector(-32, 20, -2));
  • Modify Global Variable(settings, Append To Array, Vector(-32, 10, -2));
  • Start Rule(newgame, Restart Rule);
  • }
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.settings = Array();
  • Modify Global Variable(settings, Append To Array, Vector(-32, 30, -2));
  • Modify Global Variable(settings, Append To Array, Vector(-32, 20, -2));
  • Modify Global Variable(settings, Append To Array, Vector(-32, 10, -2));
  • Start Rule(newgame, Restart Rule);
  • }
  • }
  • rule("taunts")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.taunts = Array();
  • Modify Global Variable(taunts, Append To Array, Custom String("... oof ..."));
  • Modify Global Variable(taunts, Append To Array, Custom String("rolled"));
  • Modify Global Variable(taunts, Append To Array, Custom String("lost to rectangle game"));
  • Modify Global Variable(taunts, Append To Array, Custom String("boom"));
  • Modify Global Variable(taunts, Append To Array, Custom String("kaboom!"));
  • Modify Global Variable(taunts, Append To Array, Custom String("nope"));
  • Modify Global Variable(taunts, Append To Array, Custom String("theheheee"));
  • Modify Global Variable(taunts, Append To Array, Custom String("wow"));
  • Modify Global Variable(taunts, Append To Array, Custom String("clap"));
  • Modify Global Variable(taunts, Append To Array, Custom String("really?"));
  • Modify Global Variable(taunts, Append To Array, Custom String("-52 sr"));
  • Modify Global Variable(taunts, Append To Array, Custom String("another one bites the dust"));
  • }
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.taunts = Array();
  • Modify Global Variable(taunts, Append To Array, Custom String("... oof ..."));
  • Modify Global Variable(taunts, Append To Array, Custom String("rolled"));
  • Modify Global Variable(taunts, Append To Array, Custom String("lost to rectangle game"));
  • Modify Global Variable(taunts, Append To Array, Custom String("boom"));
  • Modify Global Variable(taunts, Append To Array, Custom String("kaboom!"));
  • Modify Global Variable(taunts, Append To Array, Custom String("nope"));
  • Modify Global Variable(taunts, Append To Array, Custom String("theheheee"));
  • Modify Global Variable(taunts, Append To Array, Custom String("wow"));
  • Modify Global Variable(taunts, Append To Array, Custom String("clap"));
  • Modify Global Variable(taunts, Append To Array, Custom String("really?"));
  • Modify Global Variable(taunts, Append To Array, Custom String("-52 sr"));
  • Modify Global Variable(taunts, Append To Array, Custom String("another one bites the dust"));
  • }
  • }
  • rule("compliments")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.compliments = Array();
  • Modify Global Variable(compliments, Append To Array, Custom String("you win!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("well done!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("+3 sr"));
  • Modify Global Variable(compliments, Append To Array, Custom String("no boom boom today"));
  • Modify Global Variable(compliments, Append To Array, Custom String("kabo - nope!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("oh yeah"));
  • Modify Global Variable(compliments, Append To Array, Custom String("nice"));
  • Modify Global Variable(compliments, Append To Array, Custom String("wow"));
  • Modify Global Variable(compliments, Append To Array, Custom String("clap!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("that was close!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("wubba lubba dub dub!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("cheers!"));
  • }
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Global.compliments = Array();
  • Modify Global Variable(compliments, Append To Array, Custom String("you win!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("well done!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("+3 sr"));
  • Modify Global Variable(compliments, Append To Array, Custom String("no boom boom today"));
  • Modify Global Variable(compliments, Append To Array, Custom String("kabo - nope!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("oh yeah"));
  • Modify Global Variable(compliments, Append To Array, Custom String("nice"));
  • Modify Global Variable(compliments, Append To Array, Custom String("wow"));
  • Modify Global Variable(compliments, Append To Array, Custom String("clap!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("that was close!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("wubba lubba dub dub!"));
  • Modify Global Variable(compliments, Append To Array, Custom String("cheers!"));
  • }
  • }
  • disabled rule("---------- MOD LOGIC ----------")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("player spawning")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Has Spawned(Event Player) == True;
  • }
  • actions
  • {
  • If(Event Player == Players In Slot(0, Team 1));
  • Teleport(Event Player, Vector(-2, 20, -2));
  • Else If(Event Player == Players In Slot(1, Team 1));
  • Teleport(Event Player, Vector(-10, 20, -2));
  • Else If(Event Player == Players In Slot(2, Team 1));
  • Teleport(Event Player, Vector(6, 20, -2));
  • Else If(Event Player == Players In Slot(3, Team 1));
  • Teleport(Event Player, Vector(-2, 20, 6));
  • Else If(Event Player == Players In Slot(4, Team 1));
  • Teleport(Event Player, Vector(-2, 20, -10));
  • Else If(Event Player == Players In Slot(5, Team 1));
  • Teleport(Event Player, Vector(6, 20, 6));
  • End;
  • Set Status(Event Player, Null, Rooted, 9999);
  • Set Gravity(Event Player, 0);
  • Set Ability 1 Enabled(Event Player, False);
  • Set Ability 2 Enabled(Event Player, False);
  • Set Ultimate Ability Enabled(Event Player, False);
  • Set Secondary Fire Enabled(Event Player, False);
  • }
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Has Spawned(Event Player) == True;
  • }
  • actions
  • {
  • If(Event Player == Players In Slot(0, Team 1));
  • Teleport(Event Player, Vector(-2, 20, -2));
  • Else If(Event Player == Players In Slot(1, Team 1));
  • Teleport(Event Player, Vector(-10, 20, -2));
  • Else If(Event Player == Players In Slot(2, Team 1));
  • Teleport(Event Player, Vector(6, 20, -2));
  • Else If(Event Player == Players In Slot(3, Team 1));
  • Teleport(Event Player, Vector(-2, 20, 6));
  • Else If(Event Player == Players In Slot(4, Team 1));
  • Teleport(Event Player, Vector(-2, 20, -10));
  • Else If(Event Player == Players In Slot(5, Team 1));
  • Teleport(Event Player, Vector(6, 20, 6));
  • End;
  • Set Status(Event Player, Null, Rooted, 9999);
  • Set Gravity(Event Player, 0);
  • Set Ability 1 Enabled(Event Player, False);
  • Set Ability 2 Enabled(Event Player, False);
  • Set Ultimate Ability Enabled(Event Player, False);
  • }
  • }
  • rule("player chooses easy")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.game_state == 0;
  • Is In View Angle(Event Player, Global.settings[0], 5) == True;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Global.game_state = 1;
  • Big Message(All Players(All Teams), Custom String("loading easy minefield"));
  • Global.grid_size = 11;
  • Global.mine_count = Workshop Setting Integer(Custom String("Minecount"), Custom String("Easy minecount"), 15, 1, 100, 0);
  • Start Rule(initialize, Do Nothing);
  • }
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.game_state == 0;
  • Is In View Angle(Event Player, Global.settings[0], 5) == True;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Global.game_state = 1;
  • Big Message(All Players(All Teams), Custom String("loading easy minefield"));
  • Global.grid_size = 11;
  • Global.mine_count = Workshop Setting Integer(Custom String("Minecount"), Custom String("Easy minecount"), 15, 1, 100, 0);
  • Start Rule(initialize, Do Nothing);
  • }
  • }
  • rule("player chooses medium")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.game_state == 0;
  • Is In View Angle(Event Player, Global.settings[1], 5) == True;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Global.game_state = 1;
  • Big Message(All Players(All Teams), Custom String("loading medium minefield"));
  • Global.grid_size = 11;
  • Global.mine_count = Workshop Setting Integer(Custom String("Minecount"), Custom String("Medium minecount"), 19, 1, 100, 1);
  • Start Rule(initialize, Do Nothing);
  • }
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.game_state == 0;
  • Is In View Angle(Event Player, Global.settings[1], 5) == True;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Global.game_state = 1;
  • Big Message(All Players(All Teams), Custom String("loading medium minefield"));
  • Global.grid_size = 11;
  • Global.mine_count = Workshop Setting Integer(Custom String("Minecount"), Custom String("Medium minecount"), 19, 1, 100, 1);
  • Start Rule(initialize, Do Nothing);
  • }
  • }
  • rule("player chooses expert")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.game_state == 0;
  • Is In View Angle(Event Player, Global.settings[2], 5) == True;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Global.game_state = 1;
  • Big Message(All Players(All Teams), Custom String("loading expert minefield"));
  • Global.grid_size = 11;
  • Global.mine_count = Workshop Setting Integer(Custom String("Minecount"), Custom String("Expert minecount"), 22, 1, 100, 2);
  • Start Rule(initialize, Do Nothing);
  • }
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.game_state == 0;
  • Is In View Angle(Event Player, Global.settings[2], 5) == True;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Global.game_state = 1;
  • Big Message(All Players(All Teams), Custom String("loading expert minefield"));
  • Global.grid_size = 11;
  • Global.mine_count = Workshop Setting Integer(Custom String("Minecount"), Custom String("Expert minecount"), 22, 1, 100, 2);
  • Start Rule(initialize, Do Nothing);
  • }
  • }
  • rule("Player clicks")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • Global.game_state == 2;
  • Global.cooldown == False;
  • }
  • actions
  • {
  • Global.cooldown = True;
  • disabled Small Message(All Players(All Teams), Custom String("click"));
  • disabled Global.player_grid[Global.I] = Color(Red);
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • If(Is In View Angle(Event Player, Global.cell_positions[Global.I], 2) == True && Global.player_grid[Global.I] != Color(White));
  • disabled If(Is In View Angle(Event Player, Global.cell_positions[Global.I], 2) == True);
  • disabled Small Message(All Players(All Teams), Custom String("You are looking at index {0}, it's {1}.", Global.I,
  • Global.player_grid[Global.I]));
  • disabled Wait(0.250, Ignore Condition);
  • If(Global.real_grid[Global.I] == Custom String("M") && Global.steps == 0);
  • Global.real_grid[Global.I] = Custom String("E");
  • End;
  • Global.steps += 1;
  • If(Global.real_grid[Global.I] == Custom String("M"));
  • Call Subroutine(game_over);
  • Else;
  • Call Subroutine(count_mines);
  • End;
  • disabled Wait(0.250, Ignore Condition);
  • If(Global.cells_left == 0 && Global.game_over == False);
  • Global.game_over = True;
  • Start Rule(victory, Restart Rule);
  • End;
  • End;
  • End;
  • Wait(0.100, Ignore Condition);
  • Global.cooldown = False;
  • }
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • Global.game_state == 2;
  • Global.cooldown == False;
  • }
  • actions
  • {
  • Global.cooldown = True;
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • If(Is In View Angle(Event Player, Global.cell_positions[Global.I], 2) == True && Global.player_grid[Global.I] != Color(White));
  • If(Global.steps == 0);
  • Chase Global Variable At Rate(timer, 999, 1, Destination and Rate);
  • Call Subroutine(dump_mines);
  • End;
  • Global.steps += 1;
  • If(Global.real_grid[Global.I] == Custom String("M"));
  • Call Subroutine(game_over);
  • Else;
  • Call Subroutine(count_mines);
  • End;
  • If(Global.cells_left == 0 && Global.game_over == False);
  • Global.game_over = True;
  • Stop Chasing Global Variable(timer);
  • Start Rule(victory, Restart Rule);
  • End;
  • End;
  • End;
  • Wait(0.100, Ignore Condition);
  • Global.cooldown = False;
  • }
  • }
  • rule("Player right clicks")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Secondary Fire)) == True;
  • Global.game_state == 2;
  • Global.cooldown == False;
  • }
  • actions
  • {
  • Global.cooldown = True;
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • If(Is In View Angle(Event Player, Global.cell_positions[Global.I], 2) == True && Global.player_grid[Global.I] != Color(White));
  • If(Global.player_grid[Global.I] == Color(Black));
  • Global.player_grid[Global.I] = Color(Red);
  • Else;
  • Global.player_grid[Global.I] = Color(Black);
  • End;
  • Play Effect(All Players(All Teams), Buff Explosion Sound, Color(White), Event Player, 50);
  • End;
  • End;
  • Wait(0.100, Ignore Condition);
  • Global.cooldown = False;
  • }
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Secondary Fire)) == True;
  • Global.game_state == 2;
  • Global.cooldown == False;
  • }
  • actions
  • {
  • Global.cooldown = True;
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • If(Is In View Angle(Event Player, Global.cell_positions[Global.I], 2) == True && Global.player_grid[Global.I] != Color(White));
  • If(Global.player_grid[Global.I] == Color(Black));
  • Global.player_grid[Global.I] = Color(Red);
  • Global.mines_left += -1;
  • Else;
  • Global.player_grid[Global.I] = Color(Black);
  • Global.mines_left += 1;
  • End;
  • Play Effect(All Players(All Teams), Buff Explosion Sound, Color(White), Event Player, 50);
  • End;
  • End;
  • Wait(0.200, Ignore Condition);
  • Global.cooldown = False;
  • }
  • }
  • rule("Player clicks on smiley")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • Global.game_state == 2;
  • Is In View Angle(Event Player, Global.settings[1], 15) == True;
  • }
  • actions
  • {
  • Start Rule(newgame, Restart Rule);
  • Play Effect(All Players(All Teams), Good Pickup Effect, Color(White), Event Player, 50);
  • }
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • Global.game_state == 2;
  • Is In View Angle(Event Player, Global.settings[1], 15) == True;
  • }
  • actions
  • {
  • Start Rule(newgame, Restart Rule);
  • Play Effect(All Players(All Teams), Good Pickup Effect, Color(White), Event Player, 50);
  • }
  • }
  • disabled rule("---------- SUBROUTINES ----------")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("SUB newgame")
  • {
  • event
  • {
  • Subroutine;
  • newgame;
  • }
  • actions
  • {
  • Destroy All In-World Text;
  • Destroy All Effects;
  • Destroy All Icons;
  • Wait(0.250, Ignore Condition);
  • Create In-World Text(All Players(All Teams), Custom String("loading"), Global.settings[1], 5, Clip Against Surfaces,
  • Visible To Position and String, Color(Red), Default Visibility);
  • Wait(0.500, Ignore Condition);
  • Destroy All In-World Text;
  • Wait(0.250, Ignore Condition);
  • Global.game_state = 0;
  • Global.cooldown = False;
  • Create In-World Text(All Players(All Teams), Custom String("{0} Easy {0}", Icon String(Happy)), Global.settings[0], 2,
  • Clip Against Surfaces, Visible To Position and String, Color(White), Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("{0} Medium {0}", Icon String(Sad)), Global.settings[1], 2,
  • Clip Against Surfaces, Visible To Position and String, Color(Gray), Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("{0} Expert {0}", Icon String(Poison)), Global.settings[2], 2,
  • Clip Against Surfaces, Visible To Position and String, Color(Black), Default Visibility);
  • Create Icon(All Players(All Teams), Global.settings[0] + Up * 3, Happy, Visible To and Position, Color(Yellow), True);
  • }
  • event
  • {
  • Subroutine;
  • newgame;
  • }
  • actions
  • {
  • Destroy All In-World Text;
  • Destroy All Effects;
  • Destroy All Icons;
  • Wait(0.250, Ignore Condition);
  • Create In-World Text(All Players(All Teams), Custom String("loading"), Global.settings[1], 5, Clip Against Surfaces,
  • Visible To Position and String, Color(Red), Default Visibility);
  • Wait(0.500, Ignore Condition);
  • Destroy All In-World Text;
  • Wait(0.250, Ignore Condition);
  • Global.game_state = 0;
  • Global.cooldown = False;
  • Create In-World Text(All Players(All Teams), Custom String("{0} Easy {0}", Icon String(Happy)), Global.settings[0], 2,
  • Clip Against Surfaces, Visible To Position and String, Color(White), Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("{0} Medium {0}", Icon String(Sad)), Global.settings[1], 2,
  • Clip Against Surfaces, Visible To Position and String, Color(Gray), Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("{0} Expert {0}", Icon String(Poison)), Global.settings[2], 2,
  • Clip Against Surfaces, Visible To Position and String, Color(Black), Default Visibility);
  • Create Icon(All Players(All Teams), Global.settings[0] + Up * 3, Happy, Visible To and Position, Color(Yellow), True);
  • }
  • }
  • rule("SUB initialize")
  • {
  • event
  • {
  • Subroutine;
  • initialize;
  • }
  • actions
  • {
  • Destroy All In-World Text;
  • Create In-World Text(All Players(All Teams), Custom String("loading"), Global.settings[1], 5, Clip Against Surfaces,
  • Visible To Position and String, Color(Red), Default Visibility);
  • Global.cells_left = Global.grid_size * Global.grid_size - Global.mine_count;
  • Global.steps = 0;
  • Global.game_over = False;
  • Global.real_grid = Array();
  • Global.player_grid = Array();
  • Global.cell_positions = Array();
  • For Global Variable(I, 0, Global.grid_size, 1);
  • For Global Variable(J, 0, Global.grid_size, 1);
  • Modify Global Variable(cell_positions, Append To Array, Vector(Global.I * 4 - 5.500 * 4, 0, Global.J * 4 - 5.500 * 4));
  • Modify Global Variable(real_grid, Append To Array, Custom String("E"));
  • Modify Global Variable(player_grid, Append To Array, Color(Black));
  • End;
  • End;
  • For Global Variable(I, 0, Global.mine_count, 1);
  • disabled Wait(0.010, Ignore Condition);
  • disabled Global.X = Random Integer(0, Global.grid_size * Global.grid_size);
  • disabled Global.Y = Random Integer(0, Global.grid_size * Global.grid_size);
  • Global.random = Random Integer(0, Global.grid_size * Global.grid_size - 1);
  • If(Global.real_grid[Global.random] == Custom String("E"));
  • Global.real_grid[Global.random] = Custom String("M");
  • Else;
  • Global.I -= 1;
  • End;
  • End;
  • Start Rule(draw_stuff, Do Nothing);
  • }
  • event
  • {
  • Subroutine;
  • initialize;
  • }
  • actions
  • {
  • Destroy All In-World Text;
  • Create In-World Text(All Players(All Teams), Custom String("loading"), Global.settings[1], 5, Clip Against Surfaces,
  • Visible To Position and String, Color(Red), Default Visibility);
  • Global.mines_left = Global.mine_count;
  • Global.timer = 0;
  • Global.cells_left = Global.grid_size * Global.grid_size - Global.mine_count;
  • Global.steps = 0;
  • Global.game_over = False;
  • Global.real_grid = Array();
  • Global.player_grid = Array();
  • Global.cell_positions = Array();
  • For Global Variable(I, 0, Global.grid_size, 1);
  • For Global Variable(J, 0, Global.grid_size, 1);
  • Modify Global Variable(cell_positions, Append To Array, Vector(Global.I * 4 - 5.500 * 4, 0, Global.J * 4 - 5.500 * 4));
  • Modify Global Variable(real_grid, Append To Array, Custom String("E"));
  • Modify Global Variable(player_grid, Append To Array, Color(Black));
  • End;
  • End;
  • For Global Variable(I, 0, Global.mine_count, 1);
  • Global.random = Random Integer(0, Global.grid_size * Global.grid_size - 1);
  • If(Global.real_grid[Global.random] == Custom String("E"));
  • Global.real_grid[Global.random] = Custom String("M");
  • Else;
  • Global.I -= 1;
  • End;
  • End;
  • Start Rule(draw_stuff, Do Nothing);
  • }
  • }
  • rule("SUB draw stuff")
  • {
  • event
  • {
  • Subroutine;
  • draw_stuff;
  • }
  • actions
  • {
  • Destroy All Effects;
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • Wait(0.010, Ignore Condition);
  • disabled If(Global.player_grid[Global.I] == Custom String("E"));
  • disabled Create Effect(All Players(All Teams), Sphere, Color(White), Global.cell_positions[Global.I], 1, Color);
  • disabled Else;
  • disabled Create Effect(All Players(All Teams), Sphere, Color(Red), Global.cell_positions[Global.I], 1, Color);
  • disabled Create Effect(All Players(All Teams), Sphere, Global.player_grid[Evaluate Once(Global.I)], Global.cell_positions[Evaluate Once(
  • Global.I)], 1.500, Position Radius and Color);
  • Create Effect(All Players(All Teams), Sphere, Global.player_grid[Evaluate Once(Global.I)], Global.cell_positions[Global.I], 1.500,
  • Color);
  • disabled Create Effect(All Players(All Teams), Sphere, Global.Z, Global.cell_positions[Global.I], 1.500, Color);
  • disabled End;
  • End;
  • Destroy All Icons;
  • Destroy All In-World Text;
  • Create Icon(All Players(All Teams), Global.settings[1], Happy, None, Color(Yellow), False);
  • Big Message(All Players(All Teams), Custom String("start!"));
  • Global.game_state = 2;
  • }
  • event
  • {
  • Subroutine;
  • draw_stuff;
  • }
  • actions
  • {
  • Destroy All Effects;
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • Wait(0.010, Ignore Condition);
  • Create Effect(All Players(All Teams), Sphere, Global.player_grid[Evaluate Once(Global.I)], Global.cell_positions[Global.I], 1.500,
  • Color);
  • End;
  • Destroy All Icons;
  • Destroy All In-World Text;
  • Create Icon(All Players(All Teams), Global.settings[1], Happy, None, Color(Yellow), False);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.timer), Global.settings[1] + Backward * 5, 2,
  • Clip Against Surfaces, Visible To Position and String, Color(Red), Default Visibility);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.mines_left), Global.settings[1] + Backward * -5, 2,
  • Clip Against Surfaces, Visible To Position and String, Color(Red), Default Visibility);
  • Big Message(All Players(All Teams), Custom String("start!"));
  • Global.game_state = 2;
  • }
  • }
  • rule("SUB count mines and reveal them")
  • {
  • event
  • {
  • Subroutine;
  • count_mines;
  • }
  • actions
  • {
  • Global.player_grid[Global.I] = Color(White);
  • Global.count = 0;
  • Global.cells_left -= 1;
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.real_grid[Global.I + 1] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.real_grid[Global.I - 1] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.real_grid[Global.I + 11] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10);
  • If(Global.real_grid[Global.I - 11] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.real_grid[Global.I - 12] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.real_grid[Global.I - 10] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.real_grid[Global.I + 10] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.real_grid[Global.I + 12] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(Global.count == 1);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Sky Blue), Default Visibility);
  • Else If(Global.count == 2);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Green), Default Visibility);
  • Else If(Global.count == 3);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Red), Default Visibility);
  • Else If(Global.count == 4);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Blue), Default Visibility);
  • Else If(Global.count == 5);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Rose), Default Visibility);
  • Else If(Global.count == 6);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Turquoise), Default Visibility);
  • Else If(Global.count == 7);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Black), Default Visibility);
  • Else If(Global.count == 8);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Gray), Default Visibility);
  • Else If(Global.count == 0);
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.player_grid[Global.I + 1] != Color(White));
  • Global.I += 1;
  • Call Subroutine(count_mines);
  • Global.I -= 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.player_grid[Global.I - 1] != Color(White));
  • Global.I -= 1;
  • Call Subroutine(count_mines);
  • Global.I += 1;
  • End;
  • End;
  • If(
  • Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.player_grid[Global.I + 11] != Color(White));
  • Global.I += 11;
  • Call Subroutine(count_mines);
  • Global.I -= 11;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10);
  • If(Global.player_grid[Global.I - 11] != Color(White));
  • Global.I -= 11;
  • Call Subroutine(count_mines);
  • Global.I += 11;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.player_grid[Global.I - 12] != Color(White));
  • Global.I -= 12;
  • Call Subroutine(count_mines);
  • Global.I += 12;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.player_grid[Global.I - 10] != Color(White));
  • Global.I -= 10;
  • Call Subroutine(count_mines);
  • Global.I += 10;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.player_grid[Global.I + 10] != Color(White));
  • Global.I += 10;
  • Call Subroutine(count_mines);
  • Global.I -= 10;
  • End;
  • End;
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.player_grid[Global.I + 12] != Color(White));
  • Global.I += 12;
  • Call Subroutine(count_mines);
  • Global.I -= 12;
  • End;
  • End;
  • End;
  • }
  • event
  • {
  • Subroutine;
  • count_mines;
  • }
  • actions
  • {
  • Global.player_grid[Global.I] = Color(White);
  • Global.count = 0;
  • Global.cells_left -= 1;
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.real_grid[Global.I + 1] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.real_grid[Global.I - 1] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.real_grid[Global.I + 11] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10);
  • If(Global.real_grid[Global.I - 11] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.real_grid[Global.I - 12] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.real_grid[Global.I - 10] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.real_grid[Global.I + 10] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.real_grid[Global.I + 12] == Custom String("M"));
  • Global.count += 1;
  • End;
  • End;
  • If(Global.count == 1);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Sky Blue), Default Visibility);
  • Else If(Global.count == 2);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Green), Default Visibility);
  • Else If(Global.count == 3);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Red), Default Visibility);
  • Else If(Global.count == 4);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Blue), Default Visibility);
  • Else If(Global.count == 5);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Rose), Default Visibility);
  • Else If(Global.count == 6);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Turquoise), Default Visibility);
  • Else If(Global.count == 7);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Black), Default Visibility);
  • Else If(Global.count == 8);
  • Create In-World Text(All Players(All Teams), Custom String("{0}", Global.count), Global.cell_positions[Global.I], 2,
  • Clip Against Surfaces, None, Color(Gray), Default Visibility);
  • Else If(Global.count == 0);
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.player_grid[Global.I + 1] != Color(White));
  • Global.I += 1;
  • Call Subroutine(count_mines);
  • Global.I -= 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.player_grid[Global.I - 1] != Color(White));
  • Global.I -= 1;
  • Call Subroutine(count_mines);
  • Global.I += 1;
  • End;
  • End;
  • If(
  • Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.player_grid[Global.I + 11] != Color(White));
  • Global.I += 11;
  • Call Subroutine(count_mines);
  • Global.I -= 11;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10);
  • If(Global.player_grid[Global.I - 11] != Color(White));
  • Global.I -= 11;
  • Call Subroutine(count_mines);
  • Global.I += 11;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.player_grid[Global.I - 12] != Color(White));
  • Global.I -= 12;
  • Call Subroutine(count_mines);
  • Global.I += 12;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.player_grid[Global.I - 10] != Color(White));
  • Global.I -= 10;
  • Call Subroutine(count_mines);
  • Global.I += 10;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.player_grid[Global.I + 10] != Color(White));
  • Global.I += 10;
  • Call Subroutine(count_mines);
  • Global.I -= 10;
  • End;
  • End;
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.player_grid[Global.I + 12] != Color(White));
  • Global.I += 12;
  • Call Subroutine(count_mines);
  • Global.I -= 12;
  • End;
  • End;
  • End;
  • }
  • }
  • rule("SUB game over")
  • {
  • event
  • {
  • Subroutine;
  • game_over;
  • }
  • actions
  • {
  • Global.game_state = 4;
  • Big Message(All Players(All Teams), Random Value In Array(Global.taunts));
  • For Global Variable(J, 0, 5, 1);
  • Global.player_grid[Global.I] = Color(Yellow);
  • Wait(0.100, Ignore Condition);
  • Global.player_grid[Global.I] = Color(Orange);
  • Wait(0.100, Ignore Condition);
  • Global.player_grid[Global.I] = Color(Red);
  • Wait(0.100, Ignore Condition);
  • End;
  • Destroy All In-World Text;
  • Destroy All Effects;
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • Wait(0.010, Ignore Condition);
  • If(Global.real_grid[Global.I] == Custom String("M"));
  • Create Effect(All Players(All Teams), Sphere, Color(Red), Global.cell_positions[Global.I], 1.500, None);
  • End;
  • End;
  • Wait(0.500, Ignore Condition);
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • Wait(0.010, Ignore Condition);
  • If(Global.real_grid[Global.I] == Custom String("M"));
  • Play Effect(All Players(All Teams), Bad Explosion, Color(Red), Global.cell_positions[Global.I], 20);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(Red), Global.cell_positions[Global.I], 20);
  • Play Effect(All Players(All Teams), Explosion Sound, Color(Red), Global.cell_positions[Global.I], 50);
  • End;
  • End;
  • Wait(1, Ignore Condition);
  • Start Rule(newgame, Restart Rule);
  • }
  • event
  • {
  • Subroutine;
  • game_over;
  • }
  • actions
  • {
  • Global.game_state = 4;
  • Big Message(All Players(All Teams), Random Value In Array(Global.taunts));
  • For Global Variable(J, 0, 5, 1);
  • Global.player_grid[Global.I] = Color(Yellow);
  • Wait(0.100, Ignore Condition);
  • Global.player_grid[Global.I] = Color(Orange);
  • Wait(0.100, Ignore Condition);
  • Global.player_grid[Global.I] = Color(Red);
  • Wait(0.100, Ignore Condition);
  • End;
  • Destroy All In-World Text;
  • Destroy All Effects;
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • Wait(0.010, Ignore Condition);
  • If(Global.real_grid[Global.I] == Custom String("M"));
  • Create Effect(All Players(All Teams), Sphere, Color(Red), Global.cell_positions[Global.I], 1.500, None);
  • End;
  • End;
  • Wait(0.500, Ignore Condition);
  • For Global Variable(I, 0, Count Of(Global.cell_positions), 1);
  • Wait(0.010, Ignore Condition);
  • If(Global.real_grid[Global.I] == Custom String("M"));
  • Play Effect(All Players(All Teams), Bad Explosion, Color(Red), Global.cell_positions[Global.I], 20);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(Red), Global.cell_positions[Global.I], 20);
  • Play Effect(All Players(All Teams), Explosion Sound, Color(Red), Global.cell_positions[Global.I], 50);
  • End;
  • End;
  • Wait(1, Ignore Condition);
  • Start Rule(newgame, Restart Rule);
  • }
  • }
  • rule("SUB victory")
  • {
  • event
  • {
  • Subroutine;
  • victory;
  • }
  • actions
  • {
  • Global.game_state = 3;
  • Big Message(All Players(All Teams), Random Value In Array(Global.compliments));
  • Play Effect(All Players(All Teams), Good Explosion, Color(Sky Blue), Vector(-2, 0, -2), 50);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(Sky Blue), Vector(-2, 0, -2), 50);
  • Play Effect(All Players(All Teams), Buff Impact Sound, Color(Sky Blue), Vector(-2, 0, -2), 50);
  • Wait(3, Ignore Condition);
  • Start Rule(newgame, Restart Rule);
  • }
  • event
  • {
  • Subroutine;
  • victory;
  • }
  • actions
  • {
  • Global.game_state = 3;
  • Big Message(All Players(All Teams), Random Value In Array(Global.compliments));
  • Play Effect(All Players(All Teams), Good Explosion, Color(Sky Blue), Vector(-2, 0, -2), 50);
  • Play Effect(All Players(All Teams), Ring Explosion, Color(Sky Blue), Vector(-2, 0, -2), 50);
  • Play Effect(All Players(All Teams), Buff Impact Sound, Color(Sky Blue), Vector(-2, 0, -2), 50);
  • Wait(3, Ignore Condition);
  • Start Rule(newgame, Restart Rule);
  • }
  • }
  • rule("SUB dump mines")
  • {
  • event
  • {
  • Subroutine;
  • dump_mines;
  • }
  • actions
  • {
  • If(Global.real_grid[Global.I] == Custom String("M"));
  • Global.real_grid[Global.I] = Custom String("E");
  • Global.cells_left += 1;
  • End;
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.real_grid[Global.I + 1] == Custom String("M"));
  • Global.cells_left += 1;
  • Global.real_grid[Global.I + 1] = Custom String("E");
  • Global.mines_left -= 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.real_grid[Global.I - 1] == Custom String("M"));
  • Global.cells_left += 1;
  • Global.real_grid[Global.I - 1] = Custom String("E");
  • Global.mines_left -= 1;
  • End;
  • End;
  • If(
  • Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.real_grid[Global.I + 11] == Custom String("M"));
  • Global.cells_left += 1;
  • Global.real_grid[Global.I + 11] = Custom String("E");
  • Global.mines_left -= 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10);
  • If(Global.real_grid[Global.I - 11] == Custom String("M"));
  • Global.cells_left += 1;
  • Global.real_grid[Global.I - 11] = Custom String("E");
  • Global.mines_left -= 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110);
  • If(Global.real_grid[Global.I - 12] == Custom String("M"));
  • Global.cells_left += 1;
  • Global.real_grid[Global.I - 12] = Custom String("E");
  • Global.mines_left -= 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 1 && Global.I != 2 && Global.I != 3 && Global.I != 4 && Global.I != 5 && Global.I != 6 && Global.I != 7 && Global.I != 8 && Global.I != 9 && Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 120);
  • If(Global.real_grid[Global.I - 10] == Custom String("M"));
  • Global.cells_left += 1;
  • Global.real_grid[Global.I - 10] = Custom String("E");
  • Global.mines_left -= 1;
  • End;
  • End;
  • If(
  • Global.I != 0 && Global.I != 11 && Global.I != 22 && Global.I != 33 && Global.I != 44 && Global.I != 55 && Global.I != 66 && Global.I != 77 && Global.I != 88 && Global.I != 99 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.real_grid[Global.I + 10] == Custom String("M"));
  • Global.cells_left += 1;
  • Global.real_grid[Global.I + 10] = Custom String("E");
  • Global.mines_left -= 1;
  • End;
  • End;
  • If(
  • Global.I != 10 && Global.I != 21 && Global.I != 32 && Global.I != 43 && Global.I != 54 && Global.I != 65 && Global.I != 76 && Global.I != 87 && Global.I != 98 && Global.I != 109 && Global.I != 110 && Global.I != 111 && Global.I != 112 && Global.I != 113 && Global.I != 114 && Global.I != 115 && Global.I != 116 && Global.I != 117 && Global.I != 118 && Global.I != 119 && Global.I != 120);
  • If(Global.real_grid[Global.I + 12] == Custom String("M"));
  • Global.cells_left += 1;
  • Global.real_grid[Global.I + 12] = Custom String("E");
  • Global.mines_left -= 1;
  • End;
  • End;
  • }
  • }
  • disabled rule("---------- DEBUG ----------")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • disabled rule("debug hud text")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • actions
  • {
  • Create HUD Text(Event Player, Null, Null, Custom String("pos: {0}", Position Of(Event Player)), Right, 0, Color(White), Color(
  • White), Color(White), Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Null, Custom String("cells left: {0}", Global.cells_left), Right, 1, Color(White), Color(
  • White), Color(White), Visible To and String, Default Visibility);
  • }
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • actions
  • {
  • Create HUD Text(Event Player, Null, Null, Custom String("pos: {0}", Position Of(Event Player)), Right, 0, Color(White), Color(
  • White), Color(White), Visible To and String, Default Visibility);
  • Create HUD Text(Event Player, Null, Null, Custom String("cells left: {0}", Global.cells_left), Right, 1, Color(White), Color(
  • White), Color(White), Visible To and String, Default Visibility);
  • }
  • }
  • disabled rule("debug bots")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Wait(5, Ignore Condition);
  • Create Dummy Bot(Hero(Ana), Team 1, 1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Ana), Team 1, 2, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Ana), Team 1, 3, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Ana), Team 1, 4, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Ana), Team 1, 5, Vector(0, 0, 0), Vector(0, 0, 0));
  • }
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Wait(5, Ignore Condition);
  • Create Dummy Bot(Hero(Ana), Team 1, 1, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Ana), Team 1, 2, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Ana), Team 1, 3, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Ana), Team 1, 4, Vector(0, 0, 0), Vector(0, 0, 0));
  • Create Dummy Bot(Hero(Ana), Team 1, 5, Vector(0, 0, 0), Vector(0, 0, 0));
  • }
  • }
  • disabled rule("debug switch hero")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Button(Interact)) == True;
  • Is Button Held(Event Player, Button(Primary Fire)) == True;
  • }
  • actions
  • {
  • Set Player Allowed Heroes(Event Player, Remove From Array(All Heroes, Hero Of(Event Player)));
  • Wait(1, Ignore Condition);
  • Reset Player Hero Availability(Event Player);
  • }
  • }
Join the Workshop.codes Discord