from __future__ import generators
import plus
import Arenas
import random
import Hazards
import math

class ClawTop(Arenas.SuperArena):
    "Battle it out with your modern marvels on this ancient one!"
    name = "The Pyramid"
    preview = "pyramid/dslpyramid_preview.bmp"
    game_types = ['DEATHMATCH', 'BATTLE ROYAL', 'TEAM MATCH']
    extent = (-13, 13, 14, -14)

    def __init__(self):
        Arenas.SuperArena.__init__(self, "Arenas/Pyramid/pyramid.gmf")
        #plus.Arena.__init__(self, "")
        plus.setBackColor(0,0,0)
        
        fov = 0.015
        self.AddStaticCamera("Static Cam Overhead", (0, 50, -63), (1.5708,0), 72*fov)
	self.AddStaticCamera("Static Cam Angled Mega Zoom", (0, 80, -20), (2.17, 0), 25*fov)
	self.AddStaticCamera("Static Cam Angled Zoom", (0, 80, -20), (2.17, 0), 35*fov)
	self.AddStaticCamera("Static Cam Angled Zoom Out", (0, 80, -20), (2.17, 0), 45*fov)
	self.AddStaticCamera("Low Static Cam Angled Zoom", (0, 45, -20), (2.47, 0), 35*fov)
	self.AddStaticCamera("Low Static Cam Angled Zoom Out", (0, 45, -20), (2.47, 0), 45*fov)
	self.AddWatchCamera("Watch Cam Ultra Mega Zoom", (0, 50, -30), (6, 12, 30*fov, 10*fov))
	self.AddWatchCamera("Watch Cam Mega Zoom", (0, 50, -30), (6, 12, 30*fov, 20*fov))
	self.AddWatchCamera("Watch Cam Zoom", (0, 50, -30), (6, 12, 30*fov, 30*fov))
	self.AddWatchCamera("Watch Cam Zoom Out", (0, 50, -30), (6, 12, 30*fov, 40*fov))
	self.AddWatchCamera("Watch Cam Mega Zoom Out", (0, 50, -30), (6, 12, 30*fov, 50*fov))
	self.AddWatchCamera("Low Watch Cam Ultra Mega Zoom", (0, 30, -30), (6, 12, 30*fov, 10*fov))
	self.AddWatchCamera("Low Watch Cam Mega Zoom", (0, 30, -30), (6, 12, 30*fov, 20*fov))
	self.AddWatchCamera("Low Watch Cam Zoom", (0, 30, -30), (6, 12, 30*fov, 30*fov))
	self.AddWatchCamera("Low Watch Cam Zoom Out", (0, 30, -30), (6, 12, 30*fov, 40*fov))
	self.AddWatchCamera("Low Watch Cam Mega Zoom Out", (0, 30, -30), (6, 12, 30*fov, 50*fov))
        self.players = ()
        
        
    def Activate(self, on):
        if on: self.players = plus.getPlayers()
        
        Arenas.SuperArena.Activate(self, on)


    def Tick(self):
        # check to see if anyone has been "eliminated" by falling off the tabletop
        for each in self.players:
            if plus.getLocation(each)[1] < 2.5:
                plus.eliminatePlayer(each)

        return Arenas.SuperArena.Tick(self)
        
Arenas.register(ClawTop)
