REM ********************************************
REM  Ancient Keeper campaign for KeeperFX
REM  Script for Level 19
REM  Version 1.00
REM ********************************************

COMPUTER_PLAYER(PLAYER1,0)
COMPUTER_PLAYER(PLAYER2,0)

DISPLAY_OBJECTIVE(105,PLAYER0)
DISPLAY_INFORMATION(107,PLAYER0)

START_MONEY(ALL_PLAYERS,10000)
MAX_CREATURES(ALL_PLAYERS,35)
ADD_CREATURE_TO_POOL(ORC,35)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,35)
CREATURE_AVAILABLE(PLAYER1,ORC,1,1)
CREATURE_AVAILABLE(PLAYER1,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER2,ORC,1,1)
CREATURE_AVAILABLE(PLAYER2,DARK_MISTRESS,1,1)

ROOM_AVAILABLE(PLAYER1,TREASURE,1,1)
ROOM_AVAILABLE(PLAYER2,TREASURE,1,1)
ROOM_AVAILABLE(PLAYER1,LAIR,1,1)
ROOM_AVAILABLE(PLAYER2,LAIR,1,1)
ROOM_AVAILABLE(PLAYER1,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER2,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER1,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER2,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER1,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER2,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER1,WORKSHOP,1,1)
ROOM_AVAILABLE(PLAYER2,WORKSHOP,1,1)
ROOM_AVAILABLE(PLAYER1,BARRACKS,1,1)
ROOM_AVAILABLE(PLAYER2,BARRACKS,1,1)
ROOM_AVAILABLE(PLAYER1,TORTURE,1,1)
ROOM_AVAILABLE(PLAYER2,TORTURE,1,1)

IF(PLAYER0,BATTLES_WON==1)
  DISPLAY_INFORMATION(108,PLAYER0)
  DISPLAY_INFORMATION(109,PLAYER0)
ENDIF

IF(PLAYER0,BATTLES_WON==4)
  DISPLAY_INFORMATION(111,PLAYER0)
ENDIF

IF(PLAYER_GOOD,TOTAL_CREATURES < 1)
  IF(PLAYER0,TOTAL_CREATURES < 25)
    DISPLAY_INFORMATION(110,PLAYER0)
  ENDIF
ENDIF

IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
  DISPLAY_OBJECTIVE(112,PLAYER0)
ENDIF

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

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

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

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

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

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

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

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

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

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

DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)

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_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)

IF(PLAYER1,TOTAL_CREATURES>34)
  IF(PLAYER2,TOTAL_CREATURES>34)
    SET_FLAG(PLAYER0,FLAG1,1)
  ENDIF
ENDIF

IF(PLAYER0,FLAG1>0)
  IF(PLAYER1,TOTAL_CREATURES<25)
    DISPLAY_OBJECTIVE(113,PLAYER0)
    SET_FLAG(PLAYER0,FLAG1,0)
  ENDIF
ENDIF

IF(PLAYER0,FLAG1>0)
  IF(PLAYER2,TOTAL_CREATURES<25)
    DISPLAY_OBJECTIVE(113,PLAYER0)
    SET_FLAG(PLAYER0,FLAG1,0)
  ENDIF
ENDIF

IF(PLAYER0,TOTAL_CREATURES < 1)
  DISPLAY_OBJECTIVE(114,PLAYER0)
  LOSE_GAME
ENDIF

IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
  IF(PLAYER_GOOD,TOTAL_CREATURES < 1)
    DISPLAY_OBJECTIVE(115,PLAYER0)
    WIN_GAME
  ENDIF
ENDIF
