# Copyright (C) 2008-2009 Charlie Dog Games

# This file is part of Atomic Worm.

# Atomic Worm is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# Atomic Worm is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with Atomic Worm.  If not, see <http://www.gnu.org/licenses/>.

#level data
import messages
import game



levelMusic1 = ["Level1","level1Win","level1Lose"]
levelMusic2 = ["Level2","level2Win","level2Lose"]
levelMusic3 = ["Level3","level3Win","level3Lose"]
levelMusic4 = ["Level4.ogg","level4Win.ogg","level4Lose.ogg"]
menuSong = "Level4.ogg"
storyScreenSong = "cutScene"
pallet1IDX,pallet2IDX,pallet3IDX,pallet4IDX,pallet5IDX,pallet6IDX = range(6)

square,triangle,diamond,hexagon,octagon,star,wheel,spiral,simpleWheel,castle,Ring,FiveWheel,brickWall,bullsEye,threeStar = range(15)

class levelClass:
    def __init__(self,gridType,width,height,elementSpawnRate,numberTokens,pallet,rotationSpeed,bombCount,targetCount,waveSpeed,dynamicScale,requiredNumberEnemies,levelName,waveMagnitude,oscilate):
        self.gridType = gridType
        self.width = width
        self.height = height
        self.elementSpawnRate = elementSpawnRate
        self.numberTokens = numberTokens
        self.pallet = pallet
        self.rotationSpeed = rotationSpeed
        self.bombCount = bombCount
        self.targetCount = targetCount
        self.waveSpeed = waveSpeed
        self.dynamicScale = dynamicScale
        self.requiredNumberEnemies = requiredNumberEnemies
        self.levelName = levelName
        self.waveMagnitude = waveMagnitude
        self.oscilate = oscilate

slowSpawn = 550
medSpawn = 450
fastSpawn = 350
vFastSpawn = 300
manicSpawn = 240

level0 = levelClass(square,6,6,medSpawn,2,pallet1IDX,0,0,20,0,0,0,"Quad",0,.00)
level1 = levelClass(star,9,9,fastSpawn,3,pallet2IDX,0.0004,0,25,0,0,0,"Star Quality",0,0)#was 5
level2 = levelClass(hexagon,9,9,fastSpawn,4,pallet4IDX,0,8,35,0,0,0,"Hive",0,0)
level3 = levelClass(triangle,6,8,fastSpawn,5,pallet3IDX,0,7,35,0,0,0,"Pyramid",0,0)
level4 = levelClass(wheel,13,13,fastSpawn,4,pallet1IDX,-0.0008,0,40,0,0,0,"Spin Doctor",0,0)
level5 = levelClass(brickWall,7,5,manicSpawn,3,pallet5IDX,0,0,40,0,0,1,"The Wall",0,0)
level6 = levelClass(castle,13,13,medSpawn,3,pallet3IDX,0,10,50,0,0,0,"Castle",0,0)
level7 = levelClass(simpleWheel,150,10,medSpawn-40,2,pallet4IDX,0.002,0,30,0,400,0,"Minimalist",0,0)
level8 = levelClass(octagon,7,7,slowSpawn,2,pallet2IDX,0,0,30,0,400,0,"Tiny Tim",0,0)
level9 = levelClass(square,8,8,medSpawn,5,pallet3IDX,0,10,60,100,0,2,"Wave",20,0)
level10 = levelClass(diamond,5,9,fastSpawn,4,pallet6IDX,0.00,10,50,0,0,2,"Lattice",0,0)
level11 = levelClass(brickWall,11,5,slowSpawn,4,pallet5IDX,0.0005,0,40,0,400,2,"Another Brick...",0,0)
level12 = levelClass(triangle,9,9,medSpawn,5,pallet6IDX,0,10,40,100,0,0,"Mind Bender",20,0)
level13 = levelClass(Ring,8,8,medSpawn,5,pallet3IDX,.4,0,50,0,400,2,"Halo",0,0.004)
level14 = levelClass(diamond,4,7,manicSpawn,2,pallet5IDX,0,4,40,0,0,0,"Explosive",0,0)
level15 = levelClass(FiveWheel,16,16,medSpawn,4,pallet3IDX,0,0,60,0,300,3,"Interlock",0,0)
level16 = levelClass(bullsEye,7,8,slowSpawn,4,pallet3IDX,0.5,40,60,200,00,4,"Bulls Eye",5,.003)
level17 = levelClass(threeStar,16,16,slowSpawn,4,pallet3IDX,0.0005,0,50,200,200,3,"Stars",0,0)
level18 = levelClass(spiral,55,50,manicSpawn,5,pallet5IDX,.0015,0,50,0,0,2,"Shell",0,0)
level19 = levelClass(octagon,16,16,medSpawn,7,pallet5IDX,0,3,50,0,400,3,"Complex",0,0)

levels = [level0,level1,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15,level16,level17,level18,level19]
