name = 'Yoba'
version = '1.0'
author = 'Index'

# script
from pyspades.constants import *
import random


def get_spawn_location(connection):
    if connection.team is connection.protocol.blue_team:
        x = random.randrange(78, 127)
        y = random.randrange(246, 265)
        return (x, y, connection.protocol.map.get_z(x, y))
    if connection.team is connection.protocol.green_team:
        x = random.randrange(384, 433)
        y = random.randrange(246, 265)
        return (x, y, connection.protocol.map.get_z(x, y))

'''def is_indestructable(self, x, y, z):
    if 249<=x<=261 and 230<=y<=280:
        if 1<=z<=56:
            if self.user_blocks is not None:
                if (x, y, z) not in self.user_blocks:
                    return True
    return protocol.is_indestructable(self, x, y, z)'''
