REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for DD Level Svatona
REM  Campaign: Deeper Dungeons
REM  Authors:  based on Bullfrog script
REM            KeeperFX CCP Team
REM  Date:     17 Dec 1996 - 9 Sep 2014
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 ****************************************************************************
LEVEL_VERSION(1)

SET_GENERATE_SPEED(500)

REM Computer Player stuff
COMPUTER_PLAYER(PLAYER1,4)

START_MONEY(PLAYER0,15000)
START_MONEY(PLAYER1,40000)

MAX_CREATURES(PLAYER0,15)
MAX_CREATURES(PLAYER1,25)

REM Creature pool
ADD_CREATURE_TO_POOL(SORCEROR,20)
ADD_CREATURE_TO_POOL(BILE_DEMON,20)
ADD_CREATURE_TO_POOL(DRAGON,20)
ADD_CREATURE_TO_POOL(DEMONSPAWN,20)
ADD_CREATURE_TO_POOL(BUG,20)
ADD_CREATURE_TO_POOL(SPIDER,20)
ADD_CREATURE_TO_POOL(TROLL,20)
ADD_CREATURE_TO_POOL(ORC,20)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)

REM Creature availability
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,0)

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,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)

REM Spells availability
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,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)
DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)

CREATE_PARTY(PARTY1)
	ADD_TO_PARTY(PARTY1,WITCH,9,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY1,WITCH,9,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY1,GIANT,10,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY1,GIANT,10,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY1,SAMURAI,10,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY1,SAMURAI,9,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY1,KNIGHT,10,100,ATTACK_ENEMIES,0)

CREATE_PARTY(PARTY2)
	ADD_TO_PARTY(PARTY2,WITCH,7,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY2,WITCH,7,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY2,GIANT,7,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY2,GIANT,7,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY2,SAMURAI,8,250,ATTACK_ENEMIES,0)

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

REM "Only one Dungeon Keeper can reign victorious over this land. Do not suffer a humiliating defeat Keeper, the penalty for such failure is torture and death."
DISPLAY_OBJECTIVE(912,PLAYER0)

REM Room availability - when claimed

IF(PLAYER0,GUARD_POST >= 1)
	ROOM_AVAILABLE(PLAYER0,GUARD_POST,1,1)
ENDIF

IF(PLAYER0,GRAVEYARD >= 1)
	ROOM_AVAILABLE(PLAYER0,GRAVEYARD,1,1)
ENDIF

REM Action Points triggers - each AP on this level has a corresponding PARTY which is triggered
REM if PLAYER0 reaches that AP. For example, AP1 is associated to PARTY1, and so on.

IF_ACTION_POINT(1,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY1,1,1)
	SET_FLAG(PLAYER0,FLAG0,1)
ENDIF

IF_ACTION_POINT(2,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY2,2,1)
ENDIF

REM	Win conditions
IF(PLAYER0,FLAG0 == 1)
	IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
		WIN_GAME
	ENDIF
ENDIF

REM ***  End of File  **********************************************************
