Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 65

let futsalx3 = `{

"name": "OLYMPUSHX X2",


"width": 620,
"height": 270,
"spawnDistance": 350,
"bg": {
"type": "hockey",
"width": 550,
"height": 240,
"kickOffRadius": 80,
"cornerRadius": 0
},
"vertexes": [
{
"x": 550,
"y": 240,
"trait": "ballArea",
"_data": {
"mirror": {}
}
},
{
"x": 550,
"y": -240,
"trait": "ballArea"
},
{
"x": 0,
"y": 270,
"trait": "kickOffBarrier"
},
{
"x": 0,
"y": 80,
"bCoef": 0.15,
"trait": "kickOffBarrier",
"color": "F8F8F8",
"vis": true,
"curve": 180
},
{
"x": 0,
"y": -80,
"bCoef": 0.15,
"trait": "kickOffBarrier",
"color": "F8F8F8",
"vis": true,
"curve": 180
},
{
"x": 0,
"y": -270,
"trait": "kickOffBarrier"
},
{
"x": -550,
"y": -80,
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"curve": 0,
"color": "F8F8F8",
"pos": [
-700,
-80
]
},
{
"x": -590,
"y": -80,
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"curve": 0,
"color": "F8F8F8",
"pos": [
-700,
-80
]
},
{
"x": -590,
"y": 80,
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"curve": 0,
"color": "F8F8F8",
"pos": [
-700,
80
]
},
{
"x": -550,
"y": 80,
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"curve": 0,
"color": "F8F8F8",
"pos": [
-700,
80
]
},
{
"x": 550,
"y": -80,
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"curve": 0,
"color": "F8F8F8",
"pos": [
700,
-80
]
},
{
"x": 590,
"y": -80,
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"curve": 0,
"color": "F8F8F8",
"pos": [
700,
-80
]
},
{
"x": 590,
"y": 80,
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"curve": 0,
"color": "F8F8F8",
"pos": [
700,
80
]
},
{
"x": 550,
"y": 80,
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"curve": 0,
"color": "F8F8F8",
"pos": [
700,
80
]
},
{
"x": -550,
"y": 80,
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"color": "F8F8F8",
"pos": [
-700,
80
]
},
{
"x": -550,
"y": 240,
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"color": "F8F8F8",
"_data": {
"mirror": {}
}
},
{
"x": -550,
"y": -80,
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"color": "F8F8F8",
"pos": [
-700,
-80
]
},
{
"x": -550,
"y": -240,
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"color": "F8F8F8"
},
{
"x": -550,
"y": 240,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"_data": {
"mirror": {}
}
},
{
"x": 550,
"y": 240,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"_data": {
"mirror": {}
}
},
{
"x": 550,
"y": 80,
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"pos": [
700,
80
]
},
{
"x": 550,
"y": 240,
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"_data": {
"mirror": {}
}
},
{
"x": 550,
"y": -240,
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"color": "F8F8F8"
},
{
"x": 550,
"y": -80,
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"color": "F8F8F8",
"pos": [
700,
-80
]
},
{
"x": 550,
"y": -240,
"bCoef": 0,
"cMask": [
"ball"
],
"trait": "ballArea"
},
{
"x": 550,
"y": -240,
"bCoef": 0,
"cMask": [
"ball"
],
"trait": "ballArea"
},
{
"x": -550,
"y": -240,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"curve": 0
},
{
"x": 550,
"y": -240,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"curve": 0
},
{
"x": 0,
"y": -240,
"bCoef": 0.1,
"cMask": [
"red",
"blue"
],
"cGroup": [
"redKO",
"blueKO"
],
"trait": "kickOffBarrier"
},
{
"x": 0,
"y": -80,
"bCoef": 0.1,
"cMask": [
"red",
"blue"
],
"cGroup": [
"redKO",
"blueKO"
],
"trait": "kickOffBarrier"
},
{
"x": 0,
"y": 80,
"bCoef": 0.1,
"cMask": [
"red",
"blue"
],
"cGroup": [
"redKO",
"blueKO"
],
"trait": "kickOffBarrier"
},
{
"x": 0,
"y": 240,
"bCoef": 0.1,
"cMask": [
"red",
"blue"
],
"cGroup": [
"redKO",
"blueKO"
],
"trait": "kickOffBarrier"
},
{
"x": 0,
"y": -80,
"bCoef": 0.1,
"cMask": [
"red",
"blue"
],
"trait": "kickOffBarrier",
"vis": true,
"color": "F8F8F8"
},
{
"x": 0,
"y": 80,
"bCoef": 0.1,
"cMask": [
"red",
"blue"
],
"trait": "kickOffBarrier",
"vis": true,
"color": "F8F8F8"
},
{
"x": 0,
"y": 80,
"trait": "kickOffBarrier",
"color": "F8F8F8",
"vis": true,
"curve": -180
},
{
"x": 0,
"y": -80,
"trait": "kickOffBarrier",
"color": "F8F8F8",
"vis": true,
"curve": -180
},
{
"x": 0,
"y": 80,
"trait": "kickOffBarrier",
"color": "F8F8F8",
"vis": true,
"curve": 0
},
{
"x": 0,
"y": -80,
"trait": "kickOffBarrier",
"color": "F8F8F8",
"vis": true,
"curve": 0
},
{
"x": -557.5,
"y": 80,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"curve": 0,
"vis": false,
"pos": [
-700,
80
],
"_data": {
"mirror": {}
}
},
{
"x": -557.5,
"y": 240,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"curve": 0,
"vis": false,
"_data": {
"mirror": {}
}
},
{
"x": -557.5,
"y": -240,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"vis": false,
"curve": 0
},
{
"x": -557.5,
"y": -80,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"vis": false,
"curve": 0,
"pos": [
-700,
-80
]
},
{
"x": 557.5,
"y": -240,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"vis": false,
"curve": 0
},
{
"x": 557.5,
"y": -80,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"vis": false,
"curve": 0,
"pos": [
700,
-80
]
},
{
"x": 557.5,
"y": 80,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"curve": 0,
"vis": false,
"pos": [
700,
80
]
},
{
"x": 557.5,
"y": 240,
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"curve": 0,
"vis": false,
"_data": {
"mirror": {}
}
},
{
"x": 0,
"y": -80,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 0,
"y": 80,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -550,
"y": -80,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -550,
"y": 80,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 550,
"y": -80,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 550,
"y": 80,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -240,
"y": 256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -120,
"y": 256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -240,
"y": -256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -120,
"y": -256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 240,
"y": 256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 120,
"y": 256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 240,
"y": -256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 120,
"y": -256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -381,
"y": 240,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -381,
"y": 256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -550,
"y": 200,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": -90,
"_data": {
"mirror": {}
}
},
{
"x": -390,
"y": 70,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": 0
},
{
"x": -550,
"y": 226,
"bCoef": 0.1,
"trait": "line",
"curve": -90,
"_data": {
"mirror": {}
}
},
{
"x": -536,
"y": 240,
"bCoef": 0.1,
"trait": "line",
"curve": -90,
"_data": {
"mirror": {}
}
},
{
"x": -550,
"y": -200,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": 90
},
{
"x": -390,
"y": -70,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": 0
},
{
"x": -550,
"y": -226,
"bCoef": 0.1,
"trait": "line",
"curve": 90
},
{
"x": -536,
"y": -240,
"bCoef": 0.1,
"trait": "line",
"curve": 90
},
{
"x": -556,
"y": 123,
"bCoef": 0.1,
"trait": "line",
"_data": {
"mirror": {}
}
},
{
"x": -575,
"y": 123,
"bCoef": 0.1,
"trait": "line",
"_data": {
"mirror": {}
}
},
{
"x": 556,
"y": 123,
"bCoef": 0.1,
"trait": "line",
"_data": {
"mirror": {}
}
},
{
"x": 575,
"y": 123,
"bCoef": 0.1,
"trait": "line",
"_data": {
"mirror": {}
}
},
{
"x": -556,
"y": -123,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -575,
"y": -123,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 556,
"y": -123,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 575,
"y": -123,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -381,
"y": -240,
"bCoef": 0.1,
"trait": "line"
},
{
"x": -381,
"y": -256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 381,
"y": 240,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 381,
"y": 256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 381,
"y": -240,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 381,
"y": -256,
"bCoef": 0.1,
"trait": "line"
},
{
"x": 550,
"y": -226,
"bCoef": 0.1,
"trait": "line",
"curve": -90
},
{
"x": 536,
"y": -240,
"bCoef": 0.1,
"trait": "line",
"curve": -90
},
{
"x": 550,
"y": 226,
"bCoef": 0.1,
"trait": "line",
"curve": 90,
"_data": {
"mirror": {}
}
},
{
"x": 536,
"y": 240,
"bCoef": 0.1,
"trait": "line",
"curve": 90,
"_data": {
"mirror": {}
}
},
{
"x": 550,
"y": 200,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": 90,
"_data": {
"mirror": {}
}
},
{
"x": 390,
"y": 70,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": 90
},
{
"x": 550,
"y": -200,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": -90
},
{
"x": 390,
"y": -70,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": -90
},
{
"x": 390,
"y": 70,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": 0
},
{
"x": 390,
"y": -70,
"bCoef": 0.1,
"trait": "line",
"color": "F8F8F8",
"curve": 0
},
{
"x": -375,
"y": 1,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -375,
"y": -1,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -375,
"y": 3,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -375,
"y": -3,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -375,
"y": -2,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -375,
"y": 2,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -375,
"y": -3.5,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -375,
"y": 3.5,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 375,
"y": 1,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 375,
"y": -1,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 375,
"y": 3,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 375,
"y": -3,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 375,
"y": -2,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 375,
"y": 2,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 375,
"y": -3.5,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 375,
"y": 3.5,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -277.5,
"y": 1,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -277.5,
"y": -1,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -277.5,
"y": 3,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -277.5,
"y": -3,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -277.5,
"y": -2,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -277.5,
"y": 2,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -277.5,
"y": -3.5,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": -277.5,
"y": 3.5,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 277.5,
"y": 1,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 277.5,
"y": -1,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 277.5,
"y": 3,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 277.5,
"y": -3,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 277.5,
"y": -2,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 277.5,
"y": 2,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 277.5,
"y": -3.5,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 277.5,
"y": 3.5,
"bCoef": 0.1,
"trait": "line",
"curve": 180
},
{
"x": 553.6666679382324,
"y": -234.33334350585938
},
{
"x": 553.6666679382324,
"y": -89.33334350585938
},
{
"x": -553.6666679382324,
"y": 234.33334350585938,
"_data": {
"mirror": {}
}
},
{
"x": -553.6666679382324,
"y": 89.33334350585938
},
{
"x": 553.6666679382324,
"y": 234.33334350585938,
"_data": {
"mirror": {}
}
},
{
"x": 553.6666679382324,
"y": 89.33334350585938
},
{
"x": -553.6666679382324,
"y": -259.3333435058594,
"radius": 2
},
{
"x": -554.6666679382324,
"y": -84.33334350585938,
"radius": 2
},
{
"x": 553.6666679382324,
"y": -259.3333435058594
},
{
"x": 554.6666679382324,
"y": -84.33334350585938
},
{
"x": -553.6666679382324,
"y": 259.3333435058594,
"_data": {
"mirror": {}
}
},
{
"x": -554.6666679382324,
"y": 84.33334350585938,
"_data": {
"mirror": {}
}
},
{
"x": 553.6666679382324,
"y": 259.3333435058594,
"_data": {
"mirror": {}
}
},
{
"x": 554.6666679382324,
"y": 84.33334350585938,
"_data": {
"mirror": {}
}
}
],
"segments": [
{
"v0": 6,
"v1": 7,
"curve": 0,
"color": "F8F8F8",
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"pos": [
-700,
-80
],
"y": -80
},
{
"v0": 7,
"v1": 8,
"color": "F8F8F8",
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"x": -590
},
{
"v0": 8,
"v1": 9,
"curve": 0,
"color": "F8F8F8",
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"pos": [
-700,
80
],
"y": 80
},
{
"v0": 10,
"v1": 11,
"curve": 0,
"color": "F8F8F8",
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"pos": [
700,
-80
],
"y": -80
},
{
"v0": 11,
"v1": 12,
"color": "F8F8F8",
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"x": 590
},
{
"v0": 12,
"v1": 13,
"curve": 0,
"color": "F8F8F8",
"cMask": [
"red",
"blue",
"ball"
],
"trait": "goalNet",
"pos": [
700,
80
],
"y": 80
},
{
"v0": 2,
"v1": 3,
"trait": "kickOffBarrier"
},
{
"v0": 3,
"v1": 4,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.15,
"cGroup": [
"blueKO"
],
"trait": "kickOffBarrier"
},
{
"v0": 3,
"v1": 4,
"curve": -180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.15,
"cGroup": [
"redKO"
],
"trait": "kickOffBarrier"
},
{
"v0": 4,
"v1": 5,
"trait": "kickOffBarrier"
},
{
"v0": 14,
"v1": 15,
"vis": true,
"color": "F8F8F8",
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"x": -550
},
{
"v0": 16,
"v1": 17,
"vis": true,
"color": "F8F8F8",
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"x": -550
},
{
"v0": 18,
"v1": 19,
"vis": true,
"color": "F8F8F8",
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"y": 240
},
{
"v0": 20,
"v1": 21,
"vis": true,
"color": "F8F8F8",
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"x": 550
},
{
"v0": 22,
"v1": 23,
"vis": true,
"color": "F8F8F8",
"bCoef": 1.15,
"cMask": [
"ball"
],
"trait": "ballArea",
"x": 550
},
{
"v0": 24,
"v1": 25,
"vis": true,
"color": "F8F8F8",
"bCoef": 0,
"cMask": [
"ball"
],
"trait": "ballArea",
"x": 550,
"y": -240
},
{
"v0": 26,
"v1": 27,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"y": -240
},
{
"v0": 28,
"v1": 29,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"cMask": [
"red",
"blue"
],
"cGroup": [
"redKO",
"blueKO"
],
"trait": "kickOffBarrier"
},
{
"v0": 30,
"v1": 31,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"cMask": [
"red",
"blue"
],
"cGroup": [
"redKO",
"blueKO"
],
"trait": "kickOffBarrier"
},
{
"v0": 38,
"v1": 39,
"curve": 0,
"vis": false,
"color": "F8F8F8",
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"x": -557.5,
"_data": {
"mirror": {},
"arc": {
"a": [
-557.5,
80
],
"b": [
-557.5,
240
],
"curve": 0
}
}
},
{
"v0": 40,
"v1": 41,
"curve": 0,
"vis": false,
"color": "F8F8F8",
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"x": -557.5
},
{
"v0": 42,
"v1": 43,
"curve": 0,
"vis": false,
"color": "F8F8F8",
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"x": 557.5
},
{
"v0": 44,
"v1": 45,
"curve": 0,
"vis": false,
"color": "F8F8F8",
"bCoef": 1,
"cMask": [
"ball"
],
"trait": "ballArea",
"x": 557.5
},
{
"v0": 46,
"v1": 47,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 0
},
{
"v0": 48,
"v1": 49,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -550
},
{
"v0": 50,
"v1": 51,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 550
},
{
"v0": 60,
"v1": 61,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -381
},
{
"v0": 62,
"v1": 63,
"curve": -90,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line"
},
{
"v0": 65,
"v1": 64,
"curve": -90,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"_data": {
"mirror": {},
"arc": {
"a": [
-536,
240
],
"b": [
-550,
226
],
"curve": -90,
"radius": 13.999999999999998,
"center": [
-550,
240
],
"from": -1.5707963267948966,
"to": 0
}
}
},
{
"v0": 66,
"v1": 67,
"curve": 90,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line"
},
{
"v0": 63,
"v1": 67,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line"
},
{
"v0": 69,
"v1": 68,
"curve": 90,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line"
},
{
"v0": 70,
"v1": 71,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -240,
"y": 123,
"_data": {
"mirror": {},
"arc": {
"a": [
-556,
123
],
"b": [
-575,
123
],
"curve": 0
}
}
},
{
"v0": 72,
"v1": 73,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -240,
"y": 123,
"_data": {
"mirror": {},
"arc": {
"a": [
556,
123
],
"b": [
575,
123
],
"curve": 0
}
}
},
{
"v0": 74,
"v1": 75,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -240,
"y": -123
},
{
"v0": 76,
"v1": 77,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -240,
"y": -123
},
{
"v0": 78,
"v1": 79,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -381
},
{
"v0": 80,
"v1": 81,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 381
},
{
"v0": 82,
"v1": 83,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 381
},
{
"v0": 85,
"v1": 84,
"curve": -90,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line"
},
{
"v0": 87,
"v1": 86,
"curve": 90,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"_data": {
"mirror": {},
"arc": {
"a": [
536,
240
],
"b": [
550,
226
],
"curve": 90,
"radius": 13.999999999999998,
"center": [
550,
240
],
"from": 3.141592653589793,
"to": -1.5707963267948966
}
}
},
{
"v0": 88,
"v1": 89,
"curve": 90,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line"
},
{
"v0": 90,
"v1": 91,
"curve": -90,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line"
},
{
"v0": 92,
"v1": 93,
"curve": 0,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 390
},
{
"v0": 95,
"v1": 94,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -375
},
{
"v0": 94,
"v1": 95,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -375
},
{
"v0": 97,
"v1": 96,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -375
},
{
"v0": 96,
"v1": 97,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -375
},
{
"v0": 99,
"v1": 98,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -375
},
{
"v0": 98,
"v1": 99,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -375
},
{
"v0": 101,
"v1": 100,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -375
},
{
"v0": 100,
"v1": 101,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -375
},
{
"v0": 103,
"v1": 102,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 375
},
{
"v0": 102,
"v1": 103,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 375
},
{
"v0": 105,
"v1": 104,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 375
},
{
"v0": 104,
"v1": 105,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 375
},
{
"v0": 107,
"v1": 106,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 375
},
{
"v0": 106,
"v1": 107,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 375
},
{
"v0": 109,
"v1": 108,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 375
},
{
"v0": 108,
"v1": 109,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 375
},
{
"v0": 111,
"v1": 110,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -277.5
},
{
"v0": 110,
"v1": 111,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -277.5
},
{
"v0": 113,
"v1": 112,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -277.5
},
{
"v0": 112,
"v1": 113,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -277.5
},
{
"v0": 115,
"v1": 114,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -277.5
},
{
"v0": 114,
"v1": 115,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -277.5
},
{
"v0": 117,
"v1": 116,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -277.5
},
{
"v0": 116,
"v1": 117,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": -277.5
},
{
"v0": 119,
"v1": 118,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 277.5
},
{
"v0": 118,
"v1": 119,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 277.5
},
{
"v0": 121,
"v1": 120,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 277.5
},
{
"v0": 120,
"v1": 121,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 277.5
},
{
"v0": 123,
"v1": 122,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 277.5
},
{
"v0": 122,
"v1": 123,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 277.5
},
{
"v0": 125,
"v1": 124,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 277.5
},
{
"v0": 124,
"v1": 125,
"curve": 180,
"vis": true,
"color": "F8F8F8",
"bCoef": 0.1,
"trait": "line",
"x": 277.5
},
{
"v0": 132,
"v1": 133,
"cMask": [
"ball"
]
},
{
"v0": 134,
"v1": 135,
"cMask": [
"ball"
]
},
{
"v0": 136,
"v1": 137,
"cMask": [
"ball"
],
"_data": {
"mirror": {},
"arc": {
"a": [
-553.6666679382324,
259.3333435058594
],
"b": [
-554.6666679382324,
84.33334350585938
],
"radius": null,
"center": [
null,
null
],
"from": null,
"to": null
}
}
},
{
"v0": 138,
"v1": 139,
"cMask": [
"ball"
],
"_data": {
"mirror": {},
"arc": {
"a": [
553.6666679382324,
259.3333435058594
],
"b": [
554.6666679382324,
84.33334350585938
],
"radius": null,
"center": [
null,
null
],
"from": null,
"to": null
}
}
}
],
"goals": [
{
"p0": [
-557.5,
-80
],
"p1": [
-557.5,
80
],
"team": "red"
},
{
"p0": [
557.5,
80
],
"p1": [
557.5,
-80
],
"team": "blue"
}
],
"discs": [
{
"radius": 5,
"pos": [
-550,
80
],
"color": "FF6666",
"trait": "goalPost",
"y": 80
},
{
"radius": 5,
"pos": [
-550,
-80
],
"color": "FF6666",
"trait": "goalPost",
"y": -80,
"x": -560
},
{
"radius": 5,
"pos": [
550,
80
],
"color": "6666FF",
"trait": "goalPost",
"y": 80
},
{
"radius": 5,
"pos": [
550,
-80
],
"color": "6666FF",
"trait": "goalPost",
"y": -80
},
{
"radius": 3,
"invMass": 0,
"pos": [
-550,
240
],
"color": "FFCC00",
"bCoef": 0.1,
"trait": "line",
"_data": {
"mirror": {}
}
},
{
"radius": 3,
"invMass": 0,
"pos": [
-550,
-240
],
"color": "FFCC00",
"bCoef": 0.1,
"trait": "line"
},
{
"radius": 3,
"invMass": 0,
"pos": [
550,
-240
],
"color": "FFCC00",
"bCoef": 0.1,
"trait": "line"
},
{
"radius": 3,
"invMass": 0,
"pos": [
550,
240
],
"color": "FFCC00",
"bCoef": 0.1,
"trait": "line",
"_data": {
"mirror": {}
}
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 0,
"pos": [
-608.1390248748562,
-150.35838255833698
],
"color": "FF0000",
"cGroup": []
},
{
"radius": 3,
"invMass": 0,
"pos": [
-604.9628418077804,
-214.25767314025555
],
"_data": {
"mirror": {}
}, "cGroup": []
},
{
"radius": 3,
"invMass": 0,
"pos": [
-606.2231810615466,
-190.9413969455807
],
"_data": {
"mirror": {}
}, "cGroup": []
},
{
"radius": 3,
"invMass": 0,
"pos": [
-587.3180922550534,
-216.14818202090487
],
"_data": {
"mirror": {}
}, "cGroup": []
},
{
"radius": 3,
"invMass": 0,
"pos": [
-588.5784315088197,
-190.9413969455807
],
"_data": {
"mirror": {}
}, "cGroup": []
},
{
"radius": 3,
"invMass": 0,
"pos": [
-576.6052085980407,
-214.88784276713866
],
"_data": {
"mirror": {}
}, "cGroup": []
},
{
"radius": 3,
"invMass": 0,
"pos": [
-577.8655478518069,
-185.26987030363273
],
"_data": {
"mirror": {}
}, "cGroup": []
},
{
"radius": 3,
"invMass": 0,
"pos": [
-608.7438595690791,
-177.70783478103547
],
"_data": {
"mirror": {}
}, "cGroup": []
},
{
"radius": 3,
"invMass": 0,
"pos": [
-609.3740291959621,
-152.5010497057113
],
"_data": {
"mirror": {}
}, "cGroup": []
}
],
"planes": [
{
"normal": [
0,
1
],
"dist": -240,
"bCoef": 1,
"trait": "ballArea",
"vis": false,
"curve": 0,
"_data": {
"extremes": {
"normal": [
0,
1
],
"dist": -240,
"canvas_rect": [
-1874.0985753968646,
-807.7190303784963,
1875.6854497198087,
807.7190303784963
],
"a": [
-1874.0985753968646,
-240
],
"b": [
1875.6854497198087,
-240
]
}
}
},
{
"normal": [
0,
-1
],
"dist": -240,
"bCoef": 1,
"trait": "ballArea",
"_data": {
"extremes": {
"normal": [
0,
-1
],
"dist": -240,
"canvas_rect": [
-1874.0985753968646,
-807.7190303784963,
1875.6854497198087,
807.7190303784963
],
"a": [
-1874.0985753968646,
240
],
"b": [
1875.6854497198087,
240
]
}
}
},
{
"normal": [
0,
1
],
"dist": -270,
"bCoef": 0.1,
"_data": {
"extremes": {
"normal": [
0,
1
],
"dist": -270,
"canvas_rect": [
-1874.0985753968646,
-807.7190303784963,
1875.6854497198087,
807.7190303784963
],
"a": [
-1874.0985753968646,
-270
],
"b": [
1875.6854497198087,
-270
]
}
}
},
{
"normal": [
0,
-1
],
"dist": -271.6208066535059,
"bCoef": 0.1,
"_data": {
"extremes": {
"normal": [
0,
-1
],
"dist": -271.6208066535059,
"canvas_rect": [
-1874.0985753968646,
-807.7190303784963,
1875.6854497198087,
807.7190303784963
],
"a": [
-1874.0985753968646,
271.6208066535059
],
"b": [
1875.6854497198087,
271.6208066535059
]
},
"mirror": {}
}
},
{
"normal": [
1,
0
],
"dist": -620,
"bCoef": 0.1,
"_data": {
"extremes": {
"normal": [
1,
0
],
"dist": -620,
"canvas_rect": [
-1874.0985753968646,
-807.7190303784963,
1875.6854497198087,
807.7190303784963
],
"a": [
-620,
-807.7190303784963
],
"b": [
-620,
807.7190303784963
]
}
}
},
{
"normal": [
-1,
0
],
"dist": -620,
"bCoef": 0.1,
"_data": {
"extremes": {
"normal": [
-1,
0
],
"dist": -620,
"canvas_rect": [
-1874.0985753968646,
-807.7190303784963,
1875.6854497198087,
807.7190303784963
],
"a": [
620,
-807.7190303784963
],
"b": [
620,
807.7190303784963
]
}
}
},
{
"normal": [
1,
0
],
"dist": -620,
"bCoef": 0.1,
"trait": "ballArea",
"vis": false,
"curve": 0,
"_data": {
"extremes": {
"normal": [
1,
0
],
"dist": -620,
"canvas_rect": [
-1874.0985753968646,
-807.7190303784963,
1875.6854497198087,
807.7190303784963
],
"a": [
-620,
-807.7190303784963
],
"b": [
-620,
807.7190303784963
]
}
}
},
{
"normal": [
-1,
0
],
"dist": -620,
"bCoef": 0.1,
"trait": "ballArea",
"vis": false,
"curve": 0,
"_data": {
"extremes": {
"normal": [
-1,
0
],
"dist": -620,
"canvas_rect": [
-1874.0985753968646,
-807.7190303784963,
1875.6854497198087,
807.7190303784963
],
"a": [
620,
-807.7190303784963
],
"b": [
620,
807.7190303784963
]
},
"mirror": {}
}
}
],
"traits": {
"ballArea": {
"vis": false,
"bCoef": 1,
"cMask": [
"ball"
]
},
"goalPost": {
"radius": 8,
"invMass": 0,
"bCoef": 0.5
},
"goalNet": {
"vis": true,
"bCoef": 0.1,
"cMask": [
"ball"
]
},
"line": {
"vis": true,
"bCoef": 0.1,
"cMask": [
""
]
},
"kickOffBarrier": {
"vis": false,
"bCoef": 0.1,
"cGroup": [
"redKO",
"blueKO"
],
"cMask": [
"red",
"blue"
]
}
},
"playerPhysics": {
"bCoef": 0,
"acceleration": 0.11,
"kickingAcceleration": 0.083,
"kickStrength": 5
},
"ballPhysics": {
"radius": 6.25,
"bCoef": 0.4,
"invMass": 1.5,
"damping": 0.99,
"color": "FFCC00"
},

"redSpawnPoints": [],
"blueSpawnPoints": [],
"canBeStored": false
}
`

let maxPlayers = 10;


let password = "fuckoff";
let public = true;
let room;
if (!room) {
room = HBInit({ roomName: "⚡️ FUTSAL X2 CON PODERES ⚡️ !ₛₖᵢₗₗₛ ", noPlayer: true,
public: public, maxPlayers: maxPlayers, password: null,
token: 'thr1.AAAAAGQOSYo4fambWJNryQ.IBa0ZC_rMdU'});
}

let JMap = JSON.parse(futsalx3)


room.setCustomStadium(futsalx3)
room.setTeamColors(2, 60, '0xFFFFFF', [0x0080FF, 0x004077, 0x002033])
room.setTeamColors(1, 60, '0xFFFFFF', [0xFF0000, 0x770202, 0x331001])
room.setTeamsLock(true)
let gameRunning = false;
let debugMode = false;

let administrators = [
/*tomo*/ { Auth: "s5_6hQ7l6hut8DF_TaGBRlroFZiuEbYrmo-hXD-iQ5M", Conn:
"3138312E32332E3233322E3635" },
/*tomo*/ { Auth: "HykesTSRmRFxrvk4AfD6dqvNFqRAjqeyAKHFFSgQ08U", Conn:
"3138312E32332E3233322E3635" },
/*bene*/ { Auth: "YVg4REEXFhmLh3tkHMbo2YWHoBYwewFlPlYIRm3g-YE", Conn:
"3138312E34362E36382E323036" },
/*s*/ { Auth: "5Xr4pjaGo5czHnyoXO48jqVqLslkf3JJp3XjkEWTiO4", Conn:
"3136372E35382E38362E323035" },
/*bebe*/ { Auth: "aSMVRMTdiK5erhjAf-gKXW4xqhjr3lUu9KS78qAUHfE", Conn:
"3138362E31392E3136382E323531" },
/*asu*/ { Auth: "rLagTdTIuUhbV1JCLo1vicS3ZmTXo8gLQuJ2xFwBqRA", Conn:
"3138362E3132382E3135362E313136" },
/*sx*/ { Auth: "8CXm-Lw3aMyQxARoxGup0qRG_Yr6hkFafAO8U3mckZI", Conn:
"3138312E34362E35372E3536" },
];

//aumentar tiempo del warper


//

var intervalID = window.setInterval(discordPromote, 60000 * 4);


let speedster = false;
let strong = false;
let playerPowerups = [];
let activePowerups = [];
const powers = ['Velocista', 'Tanque', 'Preciso', 'Rebote', 'Fantasmal', 'Hada',
'Pufferfish', 'Rubberboy', 'Motivado', 'Profético', 'Titiritero', 'Warper'];
const avatar = ['⚡', '🐢', '🎯', '🏀', '👻', '🧚', '🐡🎈 ', '🔥', '🎭', '🪬', '🎭 ',
'🌀'];

/* CONFIGURATIONS */
let timeLimit = 180;
let slowPlayerSpeed = 0.975
let speedsterSpeed = 1.04
let smallRadius = 11;
let bigRadius = 26;
let fastPlayerSpeed = 1.014
let invMassWeak = 0.8
let standardInvMass = 1.5
let invMassStrong = 2.5;
let invMassStrongFairy = 2.2;
let bouncerTime = 1000;
let precisionTime = 1000;
let speedTime = 450;
let pufferRadio = 40;
let constant = 8;
let rubberAmount = 7;
let bounceCoeff = 0.85
let topSpeed = 3;
let lastPlayerTouched = [null, null];
let fairyBuffRadius = 190
let freezeBuffRadius = 40
let disabledList = [811];
let freezedPlayerSpeed = 0.975
let fullMotivatedSpeed = 1.01
let fairySize = 17;
let invisibleRadius = 150;
let fairySizeIncrease = 2;
let freezeSizeDecrease = 6;
let statusEffects = ['fairyBuff']

let banned = [];


let authban = []

let warpTime = 1000;


let warpBall = false;

let profecyfulfilled = false;


let motivationLevelsPower = {
0: 1.5,
1: 1.8,
2: 2.3,
3: 2.3
}
let isTelekinetic = false;

/* ROOM CALLBACKS COPY PASTE*/

function discordPromote() {
room.sendAnnouncement('Te está gustando el host? 🤔 Unite a nuestro discord -
> https://discord.gg/H74GvqtEq6', null, '0xFFC0CB', "bold", 2)
}

room.onGameStart = function (byPlayer) {

resetMotivation();
resetTouchers();
setPlayerSizes();

let playerList = room.getPlayerList();


playerList.forEach(player => {
if (!playerPowerups.find(ply => ply.id == player.id)) {
room.sendAnnouncement('Es momento. Selecciona una habilidad 😈.
(Si necesitás ayuda usá el comando !help)', player.id, '0x00FF00', "normal", 2)
}
})

gameRunning = true;
}

room.onPositionsReset = function () {
playerIsDumb();
}

function errorPrevention() {
playerPowerups = playerPowerups.filter(powerup =>
room.getPlayerList().find(player => player.id === powerup.id)
);
}

function resetMotivation() {
let motivationPower = playerPowerups.find(plyp => plyp.power == 9);
if (motivationPower) {
motivationPower.motivationLevel = 0;
}
}

room.onGameStop = function (byPlayer) {


resetTouchers();
gameRunning = false;
}

function resetTouchers() {
lastPlayerTouched = [null, null]
}

room.setTimeLimit((timeLimit / 60));

room.onTeamGoal = function (team) {


setMotivationLevel(team);
resetTouchers();
}

room.onPlayerLeave = function (player) {


console.log('[' + new Date().getHours() + ':' + new Date().getMinutes() + ']
' + (player.admin ? '[Admin] ' : '') + player.name + ' has left')
updateAdmins();
}

room.onStadiumChange = function (newStadiumName, byPlayer) {


room.sendAnnouncement('No está permitido cambiar de cancha 🙅', null,
'0x00FF00', "normal", 2)
if (byPlayer && byPlayer.id != 0) {
room.setCustomStadium(futsalx3)
}
}

function getLink() {
return
document.querySelector('iframe').contentWindow.document.getElementById('roomlink').
innerText.split('Room Link:')[1]
}

room.onPlayerChat = function (player, message) {


console.log('[' + new Date().getHours() + ':' + new Date().getMinutes() + ']
' + (player.admin ? '[Admin] ' : '') + player.name + ' said: ' + message)

let command = message.split(" ")[0];


let selection = message.split(" ")[1];

if (command == '!discord') {
room.sendAnnouncement('https://discord.gg/H74GvqtEq6', null,
'0x00FF00', "normal", 1)
}

if (command == '!test') {
discordMessage();
}

if (command == '!dc') {
room.sendAnnouncement('https://discord.gg/H74GvqtEq6', null,
'0x00FF00', "normal", 1)
}

if (command == "!help") {
room.sendAnnouncement('!skills para ver las habilidades, !select
[numero] para seleccionar.', null, '0x00FF00', "normal", 1)
room.sendAnnouncement('Hecho con amor por tomo -> discord:
https://discord.gg/H74GvqtEq6', null, '0x00FF00', "normal", 1)
return
}

if (command == "!skills") {
room.sendAnnouncement('[1] Velocista ⚡️ - El jugador se mueve mas rapido
después de patear la pelota por unos segundos', player.id, '0x00FF00', "normal", 2)
room.sendAnnouncement('[2] Tanque 🐢 - El jugador le pega mas fuerte a
la pelota, pero es mas lento', player.id, '0x00FF00', "normal", 0)
room.sendAnnouncement('[3] Preciso 🎯 - La pelota se hace mas pequeña
por un segundo después de ser pateada', player.id, '0x00FF00', "normal", 0)
room.sendAnnouncement('[4] Rebote 🏀 - La pelota rebota mas por un
segundo después de ser pateada', player.id, '0x00FF00', "normal", 0)
room.sendAnnouncement('[5] Fantasmal 👻 - El jugador pierde las
colisiones', player.id, '0x00FF00', "normal", 2)
room.sendAnnouncement('[6] Hada 🧚 - Otorga una bonificación de fuerza y
potencia de tiro a los jugadores cercanos', player.id, '0x00FF00', "normal", 0)
room.sendAnnouncement('[7] Pufferfish 🐡 - El jugador se vuelve mucho
mas grande por un breve momento después de patear', player.id, '0x00FF00',
"normal", 0)
room.sendAnnouncement('[8] Rubberboy 🎈 - La pelota rebota en vos a
grandes velocidades', player.id, '0x00FF00', "normal", 0)
room.sendAnnouncement('[9] Motivado 🔥 - La potencia de tiro aumenta en
función de la cantidad de goles que hayas hecho', player.id, '0x00FF00', "normal",
0)
room.sendAnnouncement('[10] Profético 🪬 - Si en 3 minutos de partida no
hay goles, gana la partida automaticamente. El jugador va aumentando de tamaño
progresivamente', player.id, '0x00FF00', "normal", 0)
room.sendAnnouncement('[11] Titiritero 🎭 - Crea una sombra en la
posición opuesta de la cancha que intercambia posiciones con vos al tocar el
balón', player.id, '0x00FF00', "normal", 0)
room.sendAnnouncement('[12] Warper 🌀 - La pelota puede
teletransportarse por el mapa luego de ser pateada', player.id, '0x00FF00',
"normal", 0)
room.sendAnnouncement('PARA SELECCIONAR ESCRIBE !select [numero de la
skill] ', player.id, '0x00FF00', "normal", 2)
return
}

if (command == '!removepower') {
removePower(selection)
}

if (command == '!resetball') {
resetBall(player);
}

if (command == "!select") {

if (!selection) {
room.sendAnnouncement('@' + player.name + ', lo estás escribiendo
mal -> !select [numero] (Ejemplo: !select 3)', player.id, '0x00FF00', "normal", 2)
return
}

if (parseInt(selection) > powers.length) {


room.sendAnnouncement('No encontramos ese poder 🤔', player.id,
'0x00FF00', "normal", 2)
return
}

if (disabledList.includes(parseInt(selection))) {
room.sendAnnouncement('Esta habilidad está deshabilitada
temporalmente 😔', player.id, '0x00FF00', "normal", 2)
return;
}

if (!player.team || !gameRunning) {
room.sendAnnouncement('Solo puedes seleccionar mientras estés en
la cancha', player.id, '0x00FF00', "normal", 2)
return
}

if (selection == 10 && Math.trunc(room.getScores().time) > 10) {


room.sendAnnouncement('Solo puedes seleccionar esta habilidad
durante los primeros 10 segundos de partida', player.id, '0x00FF00', "normal", 2)
return;
}

if (selection == 10 && anyPlayerWithProfecy()) {


room.sendAnnouncement('Solo una persona puede acceder a esta
habilidad en una partida.', player.id, '0x00FF00', "normal", 2)
return;
}

if (selection == 8 && anyPlayerWithProfecy()) {


room.sendAnnouncement('Solo una persona puede acceder a esta
habilidad en una partida.', player.id, '0x00FF00', "normal", 2)
return;
}
for (let i = 11; i <= 21; i++) {
room.setDiscProperties(i, { radius: 0 })
}

room.setPlayerAvatar(player.id, avatar[selection - 1])


room.setPlayerDiscProperties(player.id, { cGroup: 2 })
room.setPlayerDiscProperties(player.id, { radius: 15 })
room.setPlayerDiscProperties(player.id, { bCoeff: 0 })

if (selection == 2) {
room.setPlayerDiscProperties(player.id, { radius: bigRadius })
}

if (selection == 6) {
room.setPlayerDiscProperties(player.id, { radius: smallRadius })
}

if (selection == 8) {
setRubber(player)
}

statusEffects.forEach(status => {
playerPowerups = playerPowerups.filter(powerups => powerups.power
!= status)
})

playerPowerups = playerPowerups.filter(powerups => powerups.id !=


player.id)

let powerupObject = { id: player.id, power: selection, name:


player.name };

if (selection == 9) {
powerupObject.motivationLevel = 0;
}

playerPowerups.push(powerupObject)
log(player.name + ' with id ' + player.id + ' has selected ' +
selection)
room.sendAnnouncement(player.name + ' seleccionó la habilidad ' +
powers[parseInt(selection) - 1], null, '0x00FF00', "normal", 2)
return
}

function say(message) {
return room.sendAnnouncement('Admin: ' + message, null, '0x00FF00', "bold",
2)
}

function log(e) {
if (debugMode) {
log('[DEBUG]' + e)
}
}

function list() {
console.log(room.getPlayerList())
}

function removePower(player) {
log(player)
let id = room.getPlayerList().find(p => (p.name).trim() == player).id
if (id) {
playerPowerups.splice(playerPowerups.findIndex(pp => pp.id == id), 1)
room.setPlayerAvatar(id, '❌')
room.sendAnnouncement('Un administrador te ha quitado la habilidad, por
favor selecciona de nuevo', id, '0x00FF00', "normal", 2)
}
}

room.onPlayerBallKick = function (player) {


setLastPlayerTouched(player)
setBallPowerup(player);
}

room.onPlayerJoin = function (player) {


console.log('[' + new Date().getHours() + ':' + new Date().getMinutes() + ']
' + (player.admin ? '[Admin] ' : '') + player.name + ' has logged in')
console.log(player)

if (banned.includes(player.name.toLowerCase()) ||
authban.includes(player.auth)) {
room.kickPlayer(player.id, ' :) ', true);
log(player.name + ' was banned ')
return
}

room.setPlayerAvatar(player.id, "❌")
greetPlayer(player)
updateAdmins(); // Gives admin to the first player who join the room if
there's no one
checkAdminRights(player)
}

room.onGameTick = function () {

handlePuppets();
errorPrevention();
getCurrentPosession();
profecyLogic();
setPlayerSizes();
manageGhosts();
handleFairyAura();
handleBallColor();
handleWarp();

let speedsterBallKick = activePowerups.find(player => player.power == 1 &&


isPlayerActive(player))
let slowPlayers = playerPowerups.filter(player => player.power == 2 &&
isPlayerActive(player))
let rubberPlayers = playerPowerups.filter(player => player.power == 8 &&
isPlayerActive(player))
let freezedPlayers = playerPowerups.filter(player => player.power ==
'freezed' && isPlayerActive(player))

/* logic for velocista */


if (speedsterBallKick) {
let playerProps = getPlayerProps(speedsterBallKick.id);
room.setPlayerDiscProperties(speedsterBallKick.id, {
xspeed: playerProps.xspeed * speedsterSpeed,
yspeed: playerProps.yspeed * speedsterSpeed
});
}

/* logic for tank */


slowPlayers.forEach(sp => {
let playerProps = getPlayerProps(sp.id);
room.setPlayerDiscProperties(sp.id, {
xspeed: playerProps.xspeed * slowPlayerSpeed,
yspeed: playerProps.yspeed * slowPlayerSpeed,
})
})

/* logic for freezed players */


freezedPlayers.forEach(sp => {
let playerProps = getPlayerProps(sp.id)
room.setPlayerDiscProperties(sp.id, {
xspeed: playerProps?.xspeed * freezedPlayerSpeed,
yspeed: playerProps?.yspeed * freezedPlayerSpeed,
})
})

rubberPlayers.forEach(player => {
setRubber(player);
})

/* FUNCTIONS */

function setWarp() {
if (warpBall) {
return
}
warpBall = true;
setTimeout(() => {
warpBall = false;
}, warpTime)
}

function handleWarp() {

if (!warpBall) {
return
}

let ballPosition = room.getBallPosition()


let shouldWarpY = ballPosition.y >= 200 || ballPosition.y <= -200;
let shouldWarpX = ballPosition.x >= 520 || ballPosition.x <= -520

if (shouldWarpY || shouldWarpX) {
warpBall = false;
clearInterval(interval);
room.setDiscProperties(0, { x: room.getDiscProperties(0).x, y: -
room.getDiscProperties(0).y })
}

function handleDribble() {

let dribblerPlayers = playerPowerups.filter(player => player.power == 12 &&


isPlayerActive(player))

dribblerPlayers.forEach(dribblerPlayer => {

let dribblerProps = room.getPlayer(dribblerPlayer.id);

let ballProps = room.getDiscProperties(0)


let ballPosition = { x: ballProps.x, y: ballProps.y }
let ballDistance = pointDistance(dribblerProps.position, ballPosition);

if (ballDistance <= (6.25 + getPlayerRadius(dribblerPlayer.id) +


constant)) {
room.setDiscProperties(0, { x: dribblerProps.position.x + 10, y:
dribblerProps.position.y + 10 })
}

})

function handleInvisible() {

let invisiblePlayers = playerPowerups.filter(player => player.power == 12 &&


isPlayerActive(player))

invisiblePlayers.forEach(invisiblePlayer => {

let invProperties = room.getPlayer(invisiblePlayer.id);

let ballProps = room.getDiscProperties(0)


let ballPosition = { x: ballProps.x, y: ballProps.y }
let ballDistance = pointDistance(invProperties.position, ballPosition);

if (ballDistance >= invisibleRadius) {


room.setPlayerDiscProperties(invisiblePlayer.id, { radius: 0 })
} else {
room.setPlayerDiscProperties(invisiblePlayer.id, { radius: 15 })
}

})

function handleBallColor() {
let ballProps = room.getDiscProperties(0)
let ballPosition = { x: ballProps.x, y: ballProps.y }

let fairyPlayers = playerPowerups.filter(player => player.power == 6 &&


isPlayerActive(player))
let anyFairyInRange = fairyPlayers.find(player =>
pointDistance(room.getPlayer(player.id).position, ballPosition) < fairyBuffRadius)

if (isTelekinetic) {
room.setDiscProperties(0, { color: '0x808080' })
return
}

if (anyFairyInRange) {
room.setDiscProperties(0, { color: '0xff0080' })
return
}

else {
room.setDiscProperties(0, { color: '0xFFCC00' })
}
}

function handleFairyAura() {
let fairyPlayers = playerPowerups.filter(player => player.power == 6 &&
isPlayerActive(player))

fairyPlayers.forEach(fairyPlayer => {

let fairyProperties = room.getPlayer(fairyPlayer.id);

playersOfTeam(fairyProperties.team).filter(ply => ply.id !=


fairyPlayer.id).forEach(player => {
let distance = pointDistance(player.position,
fairyProperties.position);
const existingIndex = playerPowerups.findIndex(p => p.power ===
'fairyBuff' && p.giver === fairyPlayer.id);
if ((distance <= fairyBuffRadius && existingIndex < 0)) {
playerPowerups.push({ power: 'fairyBuff', id: player.id,
giver: fairyPlayer.id }); // Add a new powerup object to the list
room.setPlayerDiscProperties(player.id, { invMass: 0.1,
radius: getPlayerRadius(player) + fairySizeIncrease })
} else if (distance > fairyBuffRadius && existingIndex >= 0) {
playerPowerups.splice(existingIndex, 1); // Remove the
powerup object from the list
room.setPlayerDiscProperties(player.id, { invMass: 0.5,
radius: getPlayerRadius(player) })
}
})

})
}

function playerIsDumb() {
let playerList = room.getPlayerList();
playerList.forEach(player => {
if (!playerPowerups.find(ply => ply.id == player.id)) {
room.sendAnnouncement('Parece que todavía no seleccionaste
ninguna habilidad 🤔. (Si necesitás ayuda usá el comando !help)', player.id,
'0x00FF00', "normal", 2)
}
})
}
function updateAdmins() {
// Get all players except the host (id = 0 is always the host)
var players = room.getPlayerList().filter((player) => player.id != 0);
if (players.length == 0) return; // No players left, do nothing.
if (players.find((player) => player.admin) != null) return; // There's an
admin left so do nothing.
room.setPlayerAdmin(players[0].id, true); // Give admin to the first non
admin player in the list
}

function givePlayerPower(playerName, power) {


let playerId = room.getPlayerList().find(elem => elem.name == playerName).id;
let powerupObject = { id: playerId, power: power, name: playerName, }
playerPowerups.push(powerupObject)
room.sendAnnouncement('El admin seleccionó la habilidad ' +
powers[parseInt(power) - 1] + ' para ' + playerName, null, '0x00FF00', "normal", 2)
room.setPlayerAvatar(playerId, avatar[power - 1])
log("" + playerName + ' with id ' + playerId + ' has selected ' + selection)
}

function setMotivationLevel(team) {
lastPlayerTouched.forEach(ply => {
if (ply?.team == team) {
let motivationPower = playerPowerups.find(plyp => plyp.id ==
ply.id && plyp.power == 9);
if (motivationPower) {
motivationPower.motivationLevel = +
+motivationPower.motivationLevel;
log("- Motivation up " + ply.id)
if (motivationPower.motivationLevel == 1) {
room.sendAnnouncement(ply.name + ' solo está
comenzando. Su potencia de tiro ha aumentado. 🔥');
}
if (motivationPower.motivationLevel == 2) {
room.sendAnnouncement(ply.name + ' ha alcanzado su
máximo poder. Suerte al otro equipo. 🔥');
}
}
}
})
}

function anyPlayerWithBounce() {
return room.getPlayerList().find(player => playerHasPower(player, 8) &&
player.team != 0);
}

function anyPlayerWithProfecy() {
return room.getPlayerList().find(player => playerHasPower(player, 10) &&
player.team != 0);
}

function isPlayerActive(player) {
return room.getPlayerList().find(ply => ply.team != 0 && player.id ==
ply.id);
}

function handlePuppets() {
let puppeteerPlayers = playerPowerups.filter(player => player.power == 11 &&
isPlayerActive(player));

puppeteerPlayers.forEach((pp, index) => {

let playerTeam = room.getPlayerList().find(player => player.id ==


pp.id).team;
let color = playerTeam == 1 ? '0x470606' : '0x00008B'
room.setDiscProperties(11 + index, { x: -
room.getPlayerDiscProperties(pp.id).x, y: room.getPlayerDiscProperties(pp.id).y,
color: color, radius: 15 })

let shadowPos = { x: room.getDiscProperties(11 + index).x, y:


room.getDiscProperties(11 + index).y }
let playerPos = { x: room.getPlayerDiscProperties(pp.id).x, y:
room.getPlayerDiscProperties(pp.id).y }

let distanceToBall = pointDistance(shadowPos, room.getBallPosition());


if (distanceToBall <= (6.25 + 15 + constant) && (Math.abs(playerPos.x)
+ Math.abs(shadowPos.x)) > 60) {
room.setDiscProperties(11 + index, { x: -playerPos.x, y:
playerPos.y })
room.setPlayerDiscProperties(pp.id, { x: shadowPos.x, y:
shadowPos.y })
}
else {
room.setDiscProperties(11 + index, { x: -playerPos.x, y:
playerPos.y })
}
})

function playersOfTeam(team) {
return room.getPlayerList().filter(player => player.team == team)
}

function manageGhosts() {
let ghostPlayers = playerPowerups.filter(player => player.power == 5 &&
isPlayerActive(player))

/* logic for ghost */


for (let gp of ghostPlayers) {

let ballProps = room.getDiscProperties(0)


if (ballProps.x == 0 && ballProps.y == 0) {
room.setPlayerDiscProperties(gp.id, { cGroup: 2 })
} else {
room.setPlayerDiscProperties(gp.id, { cGroup: 0 })
}
}
}

function profecyLogic() {
let scores = room.getScores();

if (Math.trunc(scores.time) >= timeLimit - 1 && !profecyfulfilled &&


scores.blue == 0 && scores.red == 0 && anyPlayerWithProfecy()) {
let playerWithProfecy = anyPlayerWithProfecy();

room.sendAnnouncement('🪬 La profecía de ' + playerWithProfecy.name + '


se ha cumplido...', null, '0xEE4B2B', "normal", 2)
log("profecy fulfilled for team " + playerWithProfecy.team == 2)

if (playerWithProfecy.team == 2) {
//blue goal
room.setDiscProperties(0, { x: -550, y: 0, xspeed: -20 })
room.setDiscProperties(0, { x: -550, y: 0, xspeed: -20 })
}

if (playerWithProfecy.team == 1) {
//red goal
room.setDiscProperties(0, { x: 550, y: 0, xspeed: 20 })
room.setDiscProperties(0, { x: 550, y: 0, xspeed: 20 })
}

profecyfulfilled = true;
}
}

function setBallPowerup(player) {
if (playerHasPower(player, 1)) {
log("speedster triggered ", player)
setSpeedster(player)
}

else if (playerHasPower(player, 3)) {


log("precision triggered ", player)
setPrecision()
}

else if (playerHasPower(player, 4)) {


log("bouncer triggered ", player)
setBouncer()
return;
}

else if (playerHasPower(player, 7)) {


log("puffer triggered ", player)
setPuffer(player)
}

else if (playerHasPower(player, 12)) {


log("warp triggered ", player)
setWarp(player)
}

let bendTime = 600


function setBending(player){

let gravity = 0;
if(player.position.y > 0){
gravity = 0.1;
}
if(player.position.y < 0){
gravity = -0.1;
}

room.setDiscProperties(0, { ygravity: gravity })


let timeout = setTimeout(() => {
room.setDiscProperties(0, { ygravity: 0 })
}, bendTime)

let ballPos = room.getBallPosition();


if(Math.abs(ballPos.x) >= 540 || Math.abs(ballPos.y) >= 220){
clearInterval(timeout);
room.setDiscProperties(0, { ygravity: 0 })
}

function setTelekinesis(player) {
isTelekinetic = true;
setTimeout(() => {
let pl = room.getPlayerDiscProperties(player.id)
if (Math.abs(pl.xspeed) > 0.1 || Math.abs(pl.yspeed) > 0.1) {
room.setDiscProperties(0, { xspeed: pl.xspeed * 3, yspeed:
pl.yspeed * 3 })
}
isTelekinetic = false;
}, 650)
}

function playerHasPower(player, power) {


return playerPowerups.find(ply => ply.id == player.id && power == ply.power);
}

function setRubber(player) {
room.setPlayerDiscProperties(player.id, { bCoeff: rubberAmount })
}

function getPlayerProps(playerId) {
return room.getPlayerDiscProperties(playerId)
}

function setBouncer() {
room.setDiscProperties(0, { bCoeff: 0.7 })
setTimeout(() => {
room.setDiscProperties(0, { bCoeff: 0.4 })
}, bouncerTime)
}

function setPrecision() {
room.setDiscProperties(0, { radius: 4 })
setTimeout(() => {
room.setDiscProperties(0, { radius: 6.25 })
}, precisionTime)
}

function setSpeedster(player) {
let pushed = { id: player.id, power: 1 };
activePowerups.push(pushed);
setTimeout(() => {
activePowerups.splice(activePowerups.indexOf(pushed), 1)
}, speedTime)
}

function resetBall(byPlayer) {
if (byPlayer.admin) {
room.setDiscProperties(0, { x: 0, y: 0 })
}
}

function setPuffer(player) {
room.setPlayerDiscProperties(player.id, { radius: pufferRadio })
setTimeout(() => {
room.setPlayerDiscProperties(player.id, { radius: 15 })
}, bouncerTime)
}

function setPlayerSizes() {

room.getPlayerList().filter(player => !playerHasPower(player,


7)).forEach(player => {
room.setPlayerDiscProperties(player.id, { radius:
getPlayerRadius(player) })
})
}

function greetPlayer(player) {
room.sendAnnouncement("(っ ◔◡◔)っ 𝘉𝘪𝘦𝘯𝘷𝘦𝘯𝘪𝘥𝘰 ", player.id, '0x00FF00',
"normal", 1)
room.sendAnnouncement('!skills para ver las habilidades, !select [numero]
para seleccionar.', player.id, '0x00FF00', "normal", 1)
room.sendAnnouncement('Hecho por tomo -> tomo#0870', player.id, '0x00FF00',
"normal", 1)
}

function checkAdminRights(player) {
if (isAuthorized(player)) {
room.setPlayerAdmin(player.id, true)
}
}

function isAuthorized(player) {
return administrators.findIndex(a => a.Auth == player.auth || a.Conn ==
player.Conn) !== -1;
}

function getPlayerRadius(player) {

let radius = 15;

if (playerHasPower(player, 6)) {
radius = smallRadius;
}

if (playerHasPower(player, 10)) {
let scores = room.getScores()
let maxSize = 28;
let currentSize = Math.trunc(scores.time) / 14 + 15
radius = currentSize > maxSize ? maxSize : currentSize ;
}

if (playerHasPower(player, 2)) {
radius = bigRadius;
}

if (playerHasPower(player, 'fairyBuff')) {
radius = radius + fairySizeIncrease;
}

if (playerHasPower(player, 'freezed')) {
radius = radius - freezeSizeDecrease;
}

return radius;
}

function calculateSniperPotency(player) {
// Determine the maximum value based on the `isPositiveMax` parameter
const maxNum = player.team == 2 ? 500 : -500;
const num = player.position.x
// Adjust the input to get a value between 0 and 1
const adjustedNum = num / maxNum;

// Calculate the sine of the adjusted input


const sinValue = Math.sin(adjustedNum * Math.PI / 2);

// Adjust the sine value to be between 0 and 1


const adjustedSinValue = (sinValue + 1) / 2;

return adjustedSinValue;
}

function getCurrentPosession() {
let ballPosition = room.getBallPosition();
let players = room.getPlayerList();
room.setDiscProperties(0, { invMass: standardInvMass })
for (let i = 0; i < players.length; i++) {
if (players[i].position != null) {
let distanceToBall = pointDistance(players[i].position,
ballPosition);
if (distanceToBall <= (6.25 + getPlayerRadius(players[i]) +
constant)) {
setLastPlayerTouched(players[i])

if (playerHasPower(players[i], 2) &&
playerHasPower(players[i], 'fairyBuff')) {
room.setDiscProperties(0, { invMass: 3 })
return
}
else if (playerHasPower(players[i], 2)) {
room.setDiscProperties(0, { invMass: invMassStrong })
}
else if (playerHasPower(players[i], 12)) {
room.setDiscProperties(0, { invMass: invMassWeak })
}

else if (playerHasPower(players[i], 'fairyBuff')) {


room.setDiscProperties(0, { invMass:
invMassStrongFairy })
}
else if (playerHasPower(players[i], 9)) {
room.setDiscProperties(0, { invMass:
motivationLevelsPower[playerHasPower(players[i], 9).motivationLevel] })
}
}

}
}
}

function pointDistance(p1, p2) {


return Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y -
p2.y));
}

function setLastPlayerTouched(player) {

if (lastPlayerTouched[0]?.id != player.id) {
lastPlayerTouched = [player, lastPlayerTouched[0]]
}

You might also like