REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for Level Tickle
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 rooms for the player:
REM   TEMPLE - researchable from start
REM New creatures for the player:
REM   HORNY - possible to summon with sacrifices
REM New powers for the player:
REM   POWER_PROTECT - researchable from start
REM   POWER_CONCEAL - researchable from start
REM New manufacture for the player:
REM   STEEL - able to manufacture as soon as have WORKSHOP

SET_GENERATE_SPEED(550)

REM Computer Player stuff
COMPUTER_PLAYER(PLAYER1,2)

START_MONEY(PLAYER0,9000)
START_MONEY(PLAYER1,9000)

MAX_CREATURES(PLAYER0,30)
MAX_CREATURES(PLAYER1,27)

ADD_CREATURE_TO_POOL(FLY,10)
ADD_CREATURE_TO_POOL(DEMONSPAWN,20)
ADD_CREATURE_TO_POOL(TROLL,20)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
ADD_CREATURE_TO_POOL(SORCEROR,30)
ADD_CREATURE_TO_POOL(BILE_DEMON,10)
ADD_CREATURE_TO_POOL(ORC,10)

REM	Creature availability
CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)

SET_CREATURE_MAX_LEVEL(PLAYER0,DEMONSPAWN,10)

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,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,TEMPLE,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)

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

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

REM "Seek out the one who would be your rival in this region of the underworld. Explain the concept of early retirement to him. On the other hand, string him up. It's in the only language he understands."
DISPLAY_OBJECTIVE(76,PLAYER0)

IF_AVAILABLE(PLAYER0,POWER_CONCEAL >= 1)
	REM "You have researched the power of Invisibility. Cast it on a creature to hide it from enemy eyes."
	DISPLAY_INFORMATION(77)
ENDIF

IF_AVAILABLE(PLAYER0,POWER_PROTECT >= 1)
	REM "The Protect Creature spell has been researched at last. Cast it on a creature to increase its toughness."
	DISPLAY_INFORMATION(78)
ENDIF

IF_AVAILABLE(PLAYER0,TEMPLE >= 1)
	REM "Researchers have found instructions for building a Temple to the dark gods. Sacrifice creatures in the Temple's pool to receive gifts from these gods."
	DISPLAY_INFORMATION(80)
ENDIF

IF_AVAILABLE(PLAYER0,STEEL >= 1)
	REM "You have manufactured an Iron Door. It's a formidable barrier. Use it well."
	DISPLAY_INFORMATION(87)
ENDIF

IF(PLAYER0,HORNY >= 1)
	REM "Behold, you have summoned a Horned Reaper. Try not make it angry. You'll fail, because everything makes a Horned Reaper angry."
	DISPLAY_INFORMATION(83)
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED >= 1)
	IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
		SET_TIMER(PLAYER0,TIMER0)
	ENDIF
ENDIF

IF(PLAYER0,TIMER0 >= 600)
	REM "The Lord of the Land has arrived. I can smell his fear. Defeat him and the realm is yours."
	DISPLAY_OBJECTIVE(19,PLAYER0)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,-1,1,5,3000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,-1,2,3,3000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-1,2,3,3000)
ENDIF

IF(PLAYER0,TIMER0 >= 800)
	IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
		REM "That's another enemy successfully written off. The defenceless inhabitants of the land above bow down before your depraved presence."
		DISPLAY_OBJECTIVE(79,PLAYER0)
		WIN_GAME
	ENDIF
ENDIF
