extensions = { 'water_damage' : 100}

from pyspades.constants import *
import random

def get_entity_location(team, entity_id):

    if entity_id == BLUE_FLAG:
        x = random.randrange(70,85)
        y = random.randrange(235, 275)
        z = 56
        return (x,y,z)

    if entity_id == BLUE_BASE:
        x = random.randrange(70,85)
        y = random.randrange(235, 275)
        z = 56
        return (x, y, z)

    if entity_id == GREEN_FLAG:
        x = random.randrange(425,440)
        y = random.randrange(235, 275)
        z = 56
        return (x, y, z)

    if entity_id == GREEN_BASE:
        x = random.randrange(425,440)
        y = random.randrange(235, 275)
        z = 56
        return (x, y, z)

def get_spawn_location(connection):

    if connection.team is connection.protocol.blue_team:
        x = random.randrange(70,120)
        y = random.randrange(230,280)
        z = 57
        return (x, y, z)

    if connection.team is connection.protocol.green_team:
        x = random.randrange(390,430)
        y = random.randrange(230,280)
        z = 57
        return (x, y, z)