REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for Level Mirthshire
REM  Campaign: New game plus
REM  Authors:  based on Bullfrog script
REM            KeeperFX CCP Team
REM            Loobinex
REM  Date:     17 Dec 1996 - 14 Mar 2015
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)

REM Nothing new for the player

REM Flags used:
REM   None
REM Timers used:
REM   PLAYER_GOOD,TIMER0 - Starts when Lord of the Land arrives

SET_GENERATE_SPEED(500)

START_MONEY(PLAYER0,7500)

MAX_CREATURES(PLAYER0,12)

ADD_CREATURE_TO_POOL(HELL_HOUND,11)
ADD_CREATURE_TO_POOL(TENTACLE,15)
ADD_CREATURE_TO_POOL(SORCEROR,7)
ADD_CREATURE_TO_POOL(BILE_DEMON,9)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,15)
ADD_CREATURE_TO_POOL(DRAGON,5)
ADD_CREATURE_TO_POOL(VAMPIRE,3)
ADD_CREATURE_TO_POOL(ORC,30)

REM Creature availability
CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,0)
CREATURE_AVAILABLE(PLAYER0,TENTACLE,1,0)
CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,0)
CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,0)
CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,0)
CREATURE_AVAILABLE(PLAYER0,DRAGON,1,0)
CREATURE_AVAILABLE(PLAYER0,VAMPIRE,1,0)
CREATURE_AVAILABLE(PLAYER0,ORC,1,0)

REM Room availability
ROOM_AVAILABLE(PLAYER0,TREASURE,1,1)
ROOM_AVAILABLE(PLAYER0,LAIR,1,1)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER0,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER0,WORKSHOP,1,0)
ROOM_AVAILABLE(PLAYER0,BARRACKS,1,0)
ROOM_AVAILABLE(PLAYER0,GUARD_POST,1,0)
REM No PRISON unless found on level.
ROOM_AVAILABLE(PLAYER0,TORTURE,1,0)
ROOM_AVAILABLE(PLAYER0,SCAVENGER,1,0)
ROOM_AVAILABLE(PLAYER0,TEMPLE,1,0)
ROOM_AVAILABLE(PLAYER0,GRAVEYARD,1,0)

REM Spells availability
MAGIC_AVAILABLE(PLAYER0,POWER_HAND,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_SLAP,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(pLAYER0,POWER_DESTROY_WALLS,1,0)

REM Doors and traps availability
TRAP_AVAILABLE(ALL_PLAYERS,ALARM,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)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)

CREATE_PARTY(ARCHGUARD)
	ADD_TO_PARTY(ARCHGUARD,THIEF,3,400,DEFEND_PARTY,0)
	ADD_TO_PARTY(ARCHGUARD,THIEF,3,400,DEFEND_PARTY,0)
	ADD_TO_PARTY(ARCHGUARD,THIEF,3,400,DEFEND_PARTY,0)
	ADD_TO_PARTY(ARCHGUARD,ARCHER,4,500,ATTACK_ENEMIES,0)

CREATE_PARTY(ARROWERS)
	ADD_TO_PARTY(ARROWERS,ARCHER,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ARROWERS,ARCHER,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ARROWERS,ARCHER,3,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ARROWERS,ARCHER,3,400,ATTACK_ENEMIES,0)

CREATE_PARTY(DWARWITCH)
	ADD_TO_PARTY(DWARWITCH,DWARFA,4,300,DEFEND_PARTY,0)
	ADD_TO_PARTY(DWARWITCH,DWARFA,4,300,STEAL_GOLD,0)
	ADD_TO_PARTY(DWARWITCH,WITCH,5,600,ATTACK_ENEMIES,0)

CREATE_PARTY(TOUGHMELEE)
	ADD_TO_PARTY(TOUGHMELEE,BARBARIAN,5,600,DEFEND_PARTY,0)
	ADD_TO_PARTY(TOUGHMELEE,BARBARIAN,5,600,DEFEND_PARTY,0)
	ADD_TO_PARTY(TOUGHMELEE,GIANT,5,600,ATTACK_ROOMS,0)
	ADD_TO_PARTY(TOUGHMELEE,GIANT,5,600,ATTACK_ROOMS,0)

CREATE_PARTY(WITCHERS)
	ADD_TO_PARTY(WITCHERS,WITCH,6,1000,STEAL_SPELLS,0)
	ADD_TO_PARTY(WITCHERS,WITCH,6,1000,STEAL_SPELLS,0)

CREATE_PARTY(MONKIES)
	ADD_TO_PARTY(MONKIES,MONK,3,1200,STEAL_GOLD,0)
	ADD_TO_PARTY(MONKIES,MONK,3,1200,STEAL_GOLD,0)
	ADD_TO_PARTY(MONKIES,MONK,3,1200,STEAL_GOLD,0)

CREATE_PARTY(BARBIES)
	ADD_TO_PARTY(BARBIES,BARBARIAN,5,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,5,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,5,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,5,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,5,1000,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(BARBIES,BARBARIAN,5,1000,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(ELITWITCH)
	ADD_TO_PARTY(ELITWITCH,WITCH,9,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ELITWITCH,WITCH,9,1000,ATTACK_ENEMIES,0)

CREATE_PARTY(LANDLORD)
	ADD_TO_PARTY(LANDLORD,KNIGHT,8,2500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(LANDLORD,ARCHER,7,800,DEFEND_PARTY,0)
	ADD_TO_PARTY(LANDLORD,ARCHER,7,800,DEFEND_PARTY,0)
	ADD_TO_PARTY(LANDLORD,ARCHER,7,800,DEFEND_PARTY,0)
	ADD_TO_PARTY(LANDLORD,ARCHER,7,800,DEFEND_PARTY,0)

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

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

IF(PLAYER0,ENTRANCE >= 18)
	MAX_CREATURES(PLAYER0,18)
ENDIF

IF(PLAYER0,LAVA .>= 1)
	ROOM_AVAILABLE(PLAYER0,BRIDGE,1,0)
ENDIF


REM "Your location is already known to the heroes of this land. They have moved quickly to mobilise their forces against you."
DISPLAY_OBJECTIVE(122,ALL_PLAYERS)

IF(PLAYER0,GAME_TURN >= 8500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-4,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 9000)
	REM "The heroes of this realm possess treasures of great power. Obviously, these should belong to you..."
	DISPLAY_INFORMATION(124,ALL_PLAYERS)
ENDIF

IF(PLAYER0,GAME_TURN >= 10050)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARWITCH,-2,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 11500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-3,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 13250)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARROWERS,-6,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 15500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-5,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 17050)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,DWARWITCH,-5,DUNGEON,0,1,250)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,WITCHERS,-4,DUNGEON,0,1,250)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,MONKIES,-3,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 18500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-1,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 20000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TOUGHMELEE,-1,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 22500)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ARCHGUARD,-6,DUNGEON,0,1,250)
ENDIF

IF(PLAYER0,GAME_TURN >= 32000)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TOUGHMELEE,-7,DUNGEON,0,6,250)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,BARBIES,-7,DUNGEON,0,6,250)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ELITWITCH,-7,DUNGEON,0,6,250)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,LANDLORD,-7,DUNGEON,0,6,250)
	REM "You've upset the local Lord. He's on his way right now. Shall I alert the media?"
	DISPLAY_OBJECTIVE(123,ALL_PLAYERS)
	SET_TIMER(PLAYER_GOOD,TIMER0)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 200)
	IF_CONTROLS(PLAYER_GOOD,KNIGHT <= 0)
		REM "Success is thine. Truly, you have earned your title, Dungeon Keeper."
		DISPLAY_OBJECTIVE(170,ALL_PLAYERS)
		WIN_GAME
	ENDIF
ENDIF

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