Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // walls
- function vloc(game, tile) {
- return overlays.buildOverlay[tile[0]][tile[1]]
- }
- if(game.state.p.f[0].cd <= game.state.t){
- /*for(var x = 6; x > -1; x--){
- if (x == 2){ continue; }
- for(var y = 0; y < 15; y++){
- if(y == 0 && x > 1){ continue; }
- game.input.action = 'build';
- game.input.id = 0;
- overlays.updateBuildOverlay(game);
- var t = [x,y];
- if(vloc(game, t)){
- socket.emit('input', {'tile':t,'action':'build','fid':0});
- game.resetInput();
- break;
- }else{
- game.resetInput();
- continue;
- }
- }
- }*/
- var tres = game.state.t % 50;
- if(game.state.s == 'g' && tres == 0){
- var mace = [
- [[6,1],[5,1],[4,1],[3,1],[1,0],[1,1],
- [1,2],[3,2],[5,2],[4,2],[6,2],[3,3],
- [4,3],[5,3],[6,3],[3,4],[4,4],[5,4],
- [6,4],[3,5],[3,6],[0,0],[0,1],[0,2],
- [1,3],[1,4],[0,3],[0,4],[0,5],[1,5],
- [0,6],[1,6],[4,5],[4,6],[5,5],[5,6],
- [6,5],[6,6],[0,7],[1,7],[3,7],[4,7],
- [5,7],[6,7],[0,8],[1,8],[3,8],[4,8],
- [5,8],[6,8],[0,9],[1,9],[3,9],[4,9],
- [5,9],[6,9],[0,10],[1,10],[3,10],
- [4,10],[5,10],[6,10],[0,11],[1,11],
- [3,11],[4,11],[5,11],[6,11],[0,12],
- [1,12],[3,12],[4,12],[5,12],[6,12],
- [0,13],[1,13],[3,13],[4,13],[5,13],
- [6,13],[3,14],[4,14],[5,14],[6,14]],
- [[0,13],[1,13],[2,13],[3,13],[5,14],
- [5,13],[3,12],[5,12],[0,12],[1,12],
- [2,12],[6,14],[6,13],[6,12],[0,11],
- [1,11],[2,11],[3,11],[5,11],[6,11],
- [0,10],[1,10],[2,10],[3,10],[5,10],
- [6,10],[0,9],[1,9],[2,9],[3,9],[5,9],
- [6,9],[0,8],[1,8],[2,8],[3,8],[5,8],
- [6,8],[0,7],[1,7],[2,7],[3,7],[5,7],
- [6,7],[0,6],[1,6],[2,6],[3,6],[5,6],
- [6,6],[0,5],[1,5],[2,5],[3,5],[5,5],
- [6,5],[0,3],[1,3],[2,3],[3,3],[5,3],
- [6,3],[0,2],[1,2],[3,2],[5,2],[6,2],
- [0,1],[1,1],[2,1],[3,1],[5,1],[6,1],
- [0,0],[1,0],[2,0],[3,0]]
- ];
- for (var i = 0; i <= mace[game.state.p.pid].length; i++){
- if(mace[game.state.p.pid][i] == undefined){break;}
- game.input.action = 'build';
- game.input.id = 0;
- overlays.updateBuildOverlay(game);
- if(vloc(game, mace[game.state.p.pid][i])){
- socket.emit('input', {'tile':mace[game.state.p.pid][i],'action':'build','fid':0});
- game.resetInput();
- break;
- }else{
- game.resetInput();
- continue;
- }
- }
- }
- }
- // eof walls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement