REM ********************************************
REM
REM             Script for Level 192
REM
REM ********************************************

ROOM_AVAILABLE(PLAYER0,TREASURE,1,0)
RESEARCH(PLAYER0,ROOM,TREASURE,1000000)
ROOM_AVAILABLE(PLAYER0,LAIR,1,0)
RESEARCH(PLAYER0,ROOM,LAIR,1000000)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,0)
RESEARCH(PLAYER0,ROOM,GARDEN,1000000)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,0)
RESEARCH(PLAYER0,ROOM,RESEARCH,1000000)
ROOM_AVAILABLE(PLAYER0,BRIDGE,1,0)
RESEARCH(PLAYER0,ROOM,BRIDGE,1000000)
ROOM_AVAILABLE(PLAYER0,WORKSHOP,1,0)
RESEARCH(PLAYER0,ROOM,WORKSHOP,1000000)
ROOM_AVAILABLE(PLAYER0,PRISON,1,0)
RESEARCH(PLAYER0,ROOM,PRISON,1000000)
ROOM_AVAILABLE(PLAYER0,TEMPLE,1,0)
RESEARCH(PLAYER0,ROOM,TEMPLE,1000000)
IF(PLAYER0,GUARD_POST > 0)
  ROOM_AVAILABLE(PLAYER0,GUARD_POST,1,1)
ENDIF
IF(PLAYER0,BARRACKS > 0)
  ROOM_AVAILABLE(PLAYER0,BARRACKS,1,1)
ENDIF
IF(PLAYER0,TRAINING > 0)
  ROOM_AVAILABLE(PLAYER0,TRAINING,1,1)
ENDIF

MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,0)
RESEARCH(PLAYER0,MAGIC,POWER_IMP,1000000)
MAGIC_AVAILABLE(PLAYER0,POWER_SPEED,1,0)
RESEARCH(PLAYER0,MAGIC,POWER_SPEED,1000000)
MAGIC_AVAILABLE(PLAYER0,POWER_OBEY,1,0)
RESEARCH(PLAYER0,MAGIC,POWER_OBEY,1000000)
MAGIC_AVAILABLE(PLAYER0,POWER_CALL_TO_ARMS,1,0)
RESEARCH(PLAYER0,MAGIC,POWER_CALL_TO_ARMS,1000000)
MAGIC_AVAILABLE(PLAYER0,POWER_HEAL_CREATURE,1,0)
RESEARCH(PLAYER0,MAGIC,POWER_HEAL_CREATURE,1000000)

DOOR_AVAILABLE(PLAYER0,MAGIC,1,0)

IF(PLAYER0,TOTAL_CREATURES < 15)
  IF(PLAYER_GOOD, SPIDER < 1)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SPIDER,-1,1,1,0)
  ENDIF
  IF(PLAYER_GOOD, BUG < 1)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,-2,1,1,0)
  ENDIF
ENDIF

IF_ACTION_POINT(1,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,TROLL,1,3,10,0)
ENDIF

IF_ACTION_POINT(2,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,3,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,4,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,5,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,7,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,8,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,9,2,10,0)
ENDIF

IF_ACTION_POINT(10,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,11,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,12,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,13,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,15,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,16,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,17,2,10,0)
ENDIF

IF_ACTION_POINT(18,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,19,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,20,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,21,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,23,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,24,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,25,2,10,0)
ENDIF

IF_ACTION_POINT(26,PLAYER0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,27,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,28,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,29,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,31,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,6,2,10,0)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,14,2,10,0)
  SET_FLAG(PLAYER0,FLAG0,1)
  ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,AVATAR,PLAYER_GOOD,2,10,0)
ENDIF

IF(PLAYER0,FLAG0 > 0)
  IF(PLAYER_GOOD,AVATAR < 1)
    SET_FLAG(PLAYER0,FLAG0,2)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HORNY,PLAYER0,24,10,0)
  ENDIF
ENDIF

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