-- Menu diorama battle: two lua-driven sides skirmish forever behind the UI. -- No Bot: players (bot clients stall shellmap order managers — see MEGAPLAN). Ticks = 0 WaveA = { "djgrunt", "djgrunt", "spinner" } WaveB = { "bufferbot", "bufferbot", "bufferbot", "drmwalker" } CountUnits = function(p) return #Utils.Where(Map.ActorsInWorld, function(a) return a.Owner == p and a.HasProperty("Move") end) end Spawn = function(owner, types, cx, cy) Utils.Do(types, function(t) local a = Actor.Create(t, true, { Owner = owner, Location = CPos.New(cx + Utils.RandomInteger(-1, 2), cy + Utils.RandomInteger(-1, 2)), }) if a.HasProperty("Hunt") then a.Hunt() end end) end WorldLoaded = function() print("SHELLMAP live") A = Player.GetPlayer("ShowA") B = Player.GetPlayer("ShowB") end Tick = function() Ticks = Ticks + 1 -- a fresh clash roughly every 30 seconds, kept small if Ticks % 750 == 250 and A ~= nil then if CountUnits(A) < 8 then Spawn(A, WaveA, 14, 15) end if CountUnits(B) < 8 then Spawn(B, WaveB, 23, 23) end end end