REM ********************************************
REM
REM             Script for Level 191
REM
REM ********************************************

COMPUTER_PLAYER(PLAYER1,1)
SET_COMPUTER_EVENT(PLAYER1,"EVENT ENEMY DOOR",144000,41,2500,2,0)

START_MONEY(PLAYER1,10000)
MAX_CREATURES(PLAYER1,40)
ADD_CREATURE_TO_POOL(ORC,9)
ADD_CREATURE_TO_POOL(DRAGON,9)
ADD_CREATURE_TO_POOL(BILE_DEMON,9)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,9)
CREATURE_AVAILABLE(PLAYER1,ORC,1,1)
CREATURE_AVAILABLE(PLAYER1,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER1,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER1,DARK_MISTRESS,1,1)

ROOM_AVAILABLE(PLAYER1,TREASURE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER1,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER1,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER1,GUARD_POST,1,0)
ROOM_AVAILABLE(PLAYER1,WORKSHOP,1,0)
ROOM_AVAILABLE(PLAYER1,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,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,0)
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(PLAYER1,POWER_CHICKEN,1,0)

DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)

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

IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
  SET_FLAG(PLAYER0,FLAG0,1)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,AVATAR,1,4,10,0)
ENDIF

IF(PLAYER0,FLAG0 == 1)
  IF(PLAYER_GOOD,TOTAL_CREATURES < 1)
    WIN_GAME
  ENDIF
ENDIF
