REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for 2-player multiplayer level 126
REM  Campaign: Multiplayer
REM  Authors:  based on Bullfrog script
REM         KeeperFX CCP Team
REM  Date:   17 Aug 1997 - 02 Nov 2013
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 ****************************************************************************

SET_GENERATE_SPEED(800)

MAX_CREATURES(PLAYER0,16)
START_MONEY(PLAYER0,1500)

MAX_CREATURES(PLAYER1,16)
START_MONEY(PLAYER1,1500)

REM QUICK_OBJECTIVE(0,"Some unaware monks built their treasure room here. Meet them quickly and explain the mistake they made​​! Then use their reserves to destroy your opponent! Good luck, instrument of evil!",ALL_PLAYERS)

ADD_CREATURE_TO_POOL(FLY,6)
ADD_CREATURE_TO_POOL(DEMONSPAWN,20)
ADD_CREATURE_TO_POOL(HELL_HOUND,8)
ADD_CREATURE_TO_POOL(SORCEROR,8)
ADD_CREATURE_TO_POOL(BILE_DEMON,18)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,8)
ADD_CREATURE_TO_POOL(ORC,16)
ADD_CREATURE_TO_POOL(TROLL,8)

CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,HELL_HOUND,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)

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,1)
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_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)

DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)

TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LAVA,1,0)

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,BRIDGE,1,0)
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,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)

REM PARTY INFO

CREATE_PARTY(ONE)
	ADD_TO_PARTY(ONE,THIEF,1,0,STEAL_GOLD,0)
	ADD_TO_PARTY(ONE,DWARFA,2,0,DEFEND_PARTY,0)
	ADD_TO_PARTY(ONE,DWARFA,3,0,DEFEND_PARTY,0)
	ADD_TO_PARTY(ONE,DWARFA,3,0,DEFEND_PARTY,0)

CREATE_PARTY(TWO)
	ADD_TO_PARTY(TWO,THIEF,1,0,STEAL_GOLD,0)
	ADD_TO_PARTY(TWO,DWARFA,2,0,DEFEND_PARTY,0)
	ADD_TO_PARTY(TWO,DWARFA,3,0,DEFEND_PARTY,0)
	ADD_TO_PARTY(TWO,DWARFA,3,0,DEFEND_PARTY,0)

CREATE_PARTY(DEFENDERS)
	ADD_TO_PARTY(DEFENDERS,FAIRY,5,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(DEFENDERS,FAIRY,5,75,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(DEFENDERS,MONK,6,150,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(DEFENDERS,MONK,6,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(DEFENDERS,WIZARD,8,500,ATTACK_ENEMIES,0)

REM ACTION POINTS

IF_ACTION_POINT(1,ALL_PLAYERS)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,1,1)
ENDIF

IF_ACTION_POINT(2,ALL_PLAYERS)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,2,1)
ENDIF

IF_ACTION_POINT(3,ALL_PLAYERS)
	SET_TIMER(PLAYER_GOOD,TIMER1)
	IF(PLAYER_GOOD,TIMER1 >= 400)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,DEFENDERS,3,1)
	ENDIF
ENDIF

IF_ACTION_POINT(4,ALL_PLAYERS)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,6,2,2,50)
ENDIF

IF_ACTION_POINT(5,ALL_PLAYERS)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,7,2,2,50)
ENDIF

REM WIN GAME CONDITIONS

IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
	WIN_GAME
ENDIF

IF(PLAYER1,ALL_DUNGEONS_DESTROYED == 1)
	WIN_GAME
ENDIF
