REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for Level Sleepiburgh
REM  Campaign: DK Original
REM  Authors:  based on Bullfrog script
REM            KeeperFX CCP Team
REM  Date:     17 Dec 1996 - 11 Feb 2011
REM  Copying and copyrights:
REM    This program is free software; you can redistribute it and/or modify
REM    it under the terms of the GNU General Public License as published by
REM    the Free Software Foundation; either version 2 of the License, or
REM    (at your option) any later version.
REM ****************************************************************************

REM New powers for the player:
REM   POWER_DESTROY_WALLS - Researchable

SET_GENERATE_SPEED(500)

START_MONEY(PLAYER0,3000)
START_MONEY(PLAYER1,7500)
START_MONEY(PLAYER2,7500)

COMPUTER_PLAYER(PLAYER1,0)
COMPUTER_PLAYER(PLAYER2,1)
ALLY_PLAYERS(PLAYER1,PLAYER2)

SET_COMPUTER_GLOBALS(PLAYER1,60,1,1,1,1900,1)
SET_COMPUTER_GLOBALS(PLAYER2,70,1,2,1,1700,1)

SET_COMPUTER_CHECKS(PLAYER1,"CHECK FOR NEUTRAL PLACES",1000,0,0,0,30000)
REM SET_COMPUTER_CHECKS(PLAYER2,"CHECK FOR NEUTRAL PLACES",1000,0,0,0,30000)

MAX_CREATURES(PLAYER0,20)
MAX_CREATURES(PLAYER1,22)
MAX_CREATURES(PLAYER2,22)

ADD_CREATURE_TO_POOL(HELL_HOUND,50)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,40)
ADD_CREATURE_TO_POOL(SORCEROR,40)
ADD_CREATURE_TO_POOL(TROLL,40)
ADD_CREATURE_TO_POOL(BILE_DEMON,40)
ADD_CREATURE_TO_POOL(DRAGON,40)

REM	Creature availability
CREATURE_AVAILABLE(PLAYER1,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER1,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER1,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER1,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER1,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER1,DRAGON,1,1)

CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER0,TROLL,1,1)

CREATURE_AVAILABLE(PLAYER2,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER2,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER2,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER2,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER2,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER2,DRAGON,1,1)
	
REM	Room availability
ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,SCAVENGER,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)

REM	Spells availability
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DESTROY_WALLS,1,0)

REM	Doors and traps availability
DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LAVA,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)

REM ****************************************************************************

IF(PLAYER0,TOTAL_CREATURES == 20)
    PRINT("I KNOW THY NAME, I WILL DESTROY THY EVIL PRESENCE. The Avatar")
ENDIF

DISPLAY_OBJECTIVE(108,PLAYER0)

IF_AVAILABLE(PLAYER0,POWER_DESTROY_WALLS == 1)
REM	"You now have the power to destroy enemy walls. Cast it sparingly and wisely however, as it will cost you much in gold. Beware, your enemies might possess it also."
	DISPLAY_INFORMATION(110)
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 1)
	IF(PLAYER2,DUNGEON_DESTROYED == 1)
REM		"You are almost victorious. Only the lord of the land stands in your way, find him and show him some power...."
		DISPLAY_OBJECTIVE(111,PLAYER0)
	ENDIF
ENDIF


IF(PLAYER_GOOD,WIZARD == 0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,-1,1,10,1000000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,-1,4,7,1000)
	IF(PLAYER_GOOD,KNIGHT == 0)
		WIN_GAME
REM		"Well done that was flippin great"
		DISPLAY_OBJECTIVE(112,PLAYER0)
	ENDIF
ENDIF

IF(PLAYER0,WORKSHOP > 0)
	ROOM_AVAILABLE(PLAYER0,WORKSHOP,1,1)
ENDIF
