
extensions = { 'water_damage' : 100}

from pyspades.constants import *
import random

def get_entity_location(team, entity_id):
    if entity_id == BLUE_FLAG:
        return (0, 0, 0)
    if entity_id == GREEN_FLAG:
        return (0, 0, 0)
    if entity_id == BLUE_BASE:
        return (0, 0, 0)
    if entity_id == GREEN_BASE:
        return (0, 0, 0)

def get_spawn_location(connection):
    if connection.team is connection.protocol.blue_team:
        x1 = random.randrange(199,202)
        y1 = random.randrange(268,273)
        z1 = 47
        x2 = random.randrange(199,202)
        y2 = random.randrange(239,244)
        z2 = 47
        x, y, z = random.choice([(x1,y1,z1),(x2,y2,z2)])
        return (x, y, z - 1)
    if connection.team is connection.protocol.green_team:
        x1 = random.randrange(309,312)
        y1 = random.randrange(239,244)
        z1 = 47
        x2 = random.randrange(309,312)
        y2 = random.randrange(268,273)
        z2 = 47
        x, y, z = random.choice([(x1,y1,z1),(x2,y2,z2)])
        return (x, y, z - 1)