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

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

START_MONEY(PLAYER0,300)
SET_FLAG(PLAYER0,FLAG0,0)

DISPLAY_OBJECTIVE(47,PLAYER0)

TRAP_AVAILABLE(PLAYER3,WORD_OF_POWER,1,1)

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

IF(PLAYER0,BATTLES_WON>0)
  DISPLAY_OBJECTIVE(48,PLAYER0)
ENDIF

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

IF(PLAYER1,DUNGEON_DESTROYED == 1)
  DISPLAY_OBJECTIVE(49,PLAYER0)
ENDIF

IF(PLAYER2,DUNGEON_DESTROYED == 1)
  ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)
ENDIF

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

IF_ACTION_POINT(14,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER3,DRAGON,14,1,10,3000)
ENDIF

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

IF(PLAYER0,GHOST>0)
  DISPLAY_OBJECTIVE(52,PLAYER0)
ENDIF

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

IF(PLAYER0,KNIGHT > 0)
  SET_CREATURE_HEALTH(KNIGHT,6120)
  SET_CREATURE_STRENGTH(KNIGHT,255)
  SET_CREATURE_ARMOUR(KNIGHT,255)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-1,1,1,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,1,1,10,3000)
ENDIF

IF_ACTION_POINT(2,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-1,1,1,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,2,1,10,3000)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-1,1,1,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,3,1,10,3000)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-1,1,1,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,4,1,10,3000)
ENDIF

IF_ACTION_POINT(5,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SPIDER,5,4,10,3000)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,5,4,10,3000)
ENDIF

IF_ACTION_POINT(6,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,TENTACLE,6,4,10,3000)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,6,4,10,3000)
ENDIF

IF_ACTION_POINT(7,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,7,4,10,3000)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BILE_DEMON,7,4,10,3000)
ENDIF

IF_ACTION_POINT(8,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,8,4,10,3000)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DARK_MISTRESS,8,4,10,3000)
ENDIF

IF_ACTION_POINT(9,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,9,4,10,3000)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DRAGON,9,4,10,3000)
ENDIF

IF_ACTION_POINT(10,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HORNY,10,4,10,3000)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SKELETON,10,4,10,3000)
ENDIF

IF_ACTION_POINT(11,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,VAMPIRE,11,4,10,3000)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,11,4,10,3000)
ENDIF

IF_ACTION_POINT(12,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,AVATAR,12,1,10,3000)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,12,4,10,3000)
  DISPLAY_OBJECTIVE(51,PLAYER0)
ENDIF

IF_ACTION_POINT(13,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,IMP,13,8,1,3000)
ENDIF

IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
  SET_FLAG(PLAYER0,FLAG0,1)
  ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,15,2,10,3000)
ENDIF

IF(PLAYER0,FLAG0 == 1)
  IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
    DISPLAY_OBJECTIVE(50,PLAYER0)
    WIN_GAME
  ENDIF
ENDIF
