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 - OK
REM New creatures for the player:
REM     HORNED_REAPER - Next level, but can be possible to summon here if the player is testing the sacrifices
REM New powers for the player:
REM     POWER_PROTECT - OK
REM     POWER_CONCEAL - OK
REM New manufacture for the player:
REM     STEEL - OK

SET_GENERATE_SPEED(550)

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

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

COMPUTER_PLAYER(PLAYER1,2)

SET_CREATURE_MAX_LEVEL(PLAYER0,DEMONSPAWN,10)

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)

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 "Tread carefully dungeon keeper. Rivers of fire snake through this realm. Find the enemy keeper and despatch him to hell."
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 them from enemy eyes."
	DISPLAY_INFORMATION(77)
ENDIF

IF_AVAILABLE(PLAYER0,POWER_PROTECT == 1)
REM	"The power to protect your creatures has been researched. Cast it on a creature to strengthen their resilience."
	DISPLAY_INFORMATION(78)
ENDIF

IF_AVAILABLE(PLAYER0,TEMPLE == 1)
REM	"A temple has been researched. Sacrifice creatures into the pool for gifts from the gods."
	DISPLAY_INFORMATION(80)
ENDIF

IF_AVAILABLE(PLAYER0,STEEL == 1)
REM	"You have manufactured a steel door. This is the most powerful physical door."
	DISPLAY_INFORMATION(87)
ENDIF

IF(PLAYER0,HORNY >= 1)
	DISPLAY_INFORMATION(83)
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 1)
    IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
        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)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
ENDIF
            
IF(PLAYER0,FLAG0 == 1)
    IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
REM     "The enemy is no more. The inhabitants of this region will bow down before your evil."
        DISPLAY_OBJECTIVE(79,PLAYER0)
        WIN_GAME
    ENDIF
ENDIF
