REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for Level Mistle
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 Nothing new for the player

COMPUTER_PLAYER(PLAYER1,2)

START_MONEY(PLAYER0,3000)
START_MONEY(PLAYER1,800000)

SET_GENERATE_SPEED(500)

MAX_CREATURES(PLAYER0,30)
MAX_CREATURES(PLAYER1,32)

ADD_CREATURE_TO_POOL(TROLL,5)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,2)
ADD_CREATURE_TO_POOL(SKELETON,20)
ADD_CREATURE_TO_POOL(SPIDER,10)

REM Creature availability
CREATURE_AVAILABLE(PLAYER0,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER0,DEMONSPAWN,1,1)
CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER1,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER1,SPIDER,1,1)
CREATURE_AVAILABLE(PLAYER1,SKELETON,1,1)

REM Room availability
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,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,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)

ROOM_AVAILABLE(PLAYER1,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER1,TREASURE,1,1)

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_SIGHT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)

MAGIC_AVAILABLE(PLAYER1,POWER_SIGHT,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_CALL_TO_ARMS,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_SPEED,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_PROTECT,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_HEAL_CREATURE,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_LIGHTNING,1,1)

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,LIGHTNING,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)

CREATE_PARTY(LANDLORD)
    ADD_TO_PARTY(LANDLORD,KNIGHT,9,1500,ATTACK_ENEMIES,0)

CREATE_PARTY(WIZZIES)
    ADD_TO_PARTY(WIZZIES,WIZARD,2,500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(WIZZIES,WIZARD,2,500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(WIZZIES,WIZARD,2,500,ATTACK_ENEMIES,0)

CREATE_PARTY(THIEVES)
    ADD_TO_PARTY(THIEVES,THIEF,4,500,STEAL_GOLD,0)
    ADD_TO_PARTY(THIEVES,THIEF,4,500,STEAL_GOLD,0)
    ADD_TO_PARTY(THIEVES,THIEF,4,500,STEAL_GOLD,0)
    ADD_TO_PARTY(THIEVES,THIEF,4,500,STEAL_GOLD,0)

CREATE_PARTY(SAMMIES)
    ADD_TO_PARTY(SAMMIES,SAMURAI,6,1500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SAMMIES,SAMURAI,6,1500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SAMMIES,SAMURAI,6,1500,ATTACK_ENEMIES,0)

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

REM "Legend says this land is still run by the evil keeper lewis and that the heros guard him. All magic has been scattered, and our forces are weak - with haste we must use the remains of lewis' last victory"
DISPLAY_OBJECTIVE(154,PLAYER0)

IF(PLAYER1,DUNGEON_DESTROYED == 1)
REM    "The evil keeper lewis has been destroyed and the land has been marked as yours for eternity"
    DISPLAY_OBJECTIVE(155,PLAYER0)
    WIN_GAME
ENDIF

IF(PLAYER0,PRISON > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,1)
ENDIF

IF(PLAYER0,TORTURE > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,1)
ENDIF

IF(PLAYER0,LAIR > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ENDIF

IF(PLAYER0,GARDEN > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
    ADD_CREATURE_TO_POOL(BILE_DEMON,1)
ENDIF

IF(PLAYER0,TRAINING > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
    ADD_CREATURE_TO_POOL(DEMONSPAWN,10)
ENDIF

IF(PLAYER0,GRAVEYARD > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,1)
ENDIF

IF(PLAYER0,RESEARCH > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
    ADD_CREATURE_TO_POOL(SORCEROR,1)
ENDIF

IF(PLAYER0,TREASURE > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
ENDIF

IF(PLAYER0,WORKSHOP > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,1)
    ADD_CREATURE_TO_POOL(TROLL,1)
ENDIF

IF(PLAYER0,TEMPLE > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,1)
ENDIF

IF(PLAYER0,SAMURAI > 0)
REM    "You have converted a samurai to your way, he has promised that if your forces should decrease, his collegues will join you through your entrance"
    DISPLAY_INFORMATION(156)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
REM    "Reports say the heros talk of you, and seek victory to please evil keeper lewis. Tread carefully - it is said this land is full of their tunnels, with trained heros waiting for you"
    DISPLAY_INFORMATION(157)
ENDIF

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

IF_ACTION_POINT(3,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SAMMIES,8,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SAMMIES,9,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,LANDLORD,3,1)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
REM    "Word has it, that two dragons are held captive to the east, surely these creatures could be the answer you look for sire"
    DISPLAY_INFORMATION(158)
ENDIF

IF_ACTION_POINT(5,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THIEVES,5,1)
ENDIF

IF_ACTION_POINT(6,PLAYER0)
REM    "Through our battles, we have learnt the path to the north leads to the lord of this land. He is known to be well guarded - but with cunning we could turn him against the keeper lewis!"
    DISPLAY_INFORMATION(159)
ENDIF
    
IF_ACTION_POINT(10,PLAYER0)
REM    "You have found some boulder traps, these will aid us defeat the enemy, but there are only three of them available in this land, so care is neeeded"
    DISPLAY_INFORMATION(160)
    TRAP_AVAILABLE(PLAYER0,BOULDER,0,3)
    TUTORIAL_FLASH_BUTTON(53,-1)
ENDIF
