Every team has three islands for themselve, but the last two islands are for both of them...
voxlap .vxl | 2.18 MiB | |
pyspades .txt | 1.34 KiB |
Water damage 🌊
## GENERATED WITH BLOCKMAN2D v0.2.5.0
name = 'HousesofPush'
version = '0.75'
author = 'Lelue'
description = 'Every team has three islands for themselve, but the last two islands are for both of them... '
extensions = { 'water_damage' : 100 }
from pyspades.constants import *
from pyspades.server import ServerConnection
import random
def get_entity_location(team, entity_id):
if entity_id == BLUE_FLAG:
return (409, 201, 8)
if entity_id == GREEN_FLAG:
return (412, 299, 8)
if entity_id == BLUE_BASE:
return (419, 331, 9)
if entity_id == GREEN_BASE:
return (408, 169, 7)
SPAWN_RECTANGLES = [[(52,53,338,338)], [(50,50,148,146)]]
def get_spawn_location(connection):
if SPAWN_RECTANGLES is not None:
if connection.team is connection.protocol.green_team:
x1, x2, y1, y2 = random.choice(SPAWN_RECTANGLES[0])
elif connection.team is connection.protocol.blue_team:
x1, x2, y1, y2 = random.choice(SPAWN_RECTANGLES[1])
x, y = random.randint(x1,x2), random.randint(y1,y2)
z = connection.protocol.map.get_z(x, y)
if x is not None and y is not None and z is not None:
return ServerConnection.set_location_safe(connection, (x, y, z))
else:
return ServerConnection.get_spawn_location(connection)