REM ********************************************
REM
REM             Script for Level 193
REM
REM ********************************************

SET_FLAG(PLAYER0,FLAG0,0)

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

DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)

ROOM_AVAILABLE(PLAYER0,TREASURE,1,0)
ROOM_AVAILABLE(PLAYER0,LAIR,1,0)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,0)
ROOM_AVAILABLE(PLAYER0,TRAINING,1,0)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,0)
IF(PLAYER1,GUARD_POST < 8)
  ROOM_AVAILABLE(PLAYER0,GUARD_POST,1,0)
ENDIF
IF(PLAYER0,WORKSHOP > 0)
  ROOM_AVAILABLE(PLAYER0,WORKSHOP,1,0)
ENDIF

MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_OBEY,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_CONCEAL,1,0)

IF(PLAYER0,FLAG0 == 0)
  IF_ACTION_POINT(1,PLAYER0)
    SET_FLAG(PLAYER0,FLAG0,1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,2,10,9,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,3,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,8,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,4,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,7,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,5,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,6,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,9,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,14,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,10,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,13,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,11,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,12,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,AVATAR,PLAYER_GOOD,2,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HORNY,PLAYER_GOOD,20,10,0)
  ENDIF
ENDIF

IF(PLAYER0,FLAG0 == 0)
  IF_ACTION_POINT(2,PLAYER0)
    SET_FLAG(PLAYER0,FLAG0,1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,2,10,9,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,3,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,8,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,4,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,7,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,5,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,6,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,9,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,14,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,10,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,13,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,11,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,12,5,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,AVATAR,PLAYER_GOOD,2,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HORNY,PLAYER_GOOD,20,10,0)
  ENDIF
ENDIF

IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
  WIN_GAME
ENDIF
