REM ********************************************
REM
REM Script for Level 208
REM
REM ********************************************

SET_GENERATE_SPEED(400)
COMPUTER_PLAYER(PLAYER1,1)
MAX_CREATURES(ALL_PLAYERS,17)

START_MONEY(ALL_PLAYERS,10000)

ADD_CREATURE_TO_POOL(BILE_DEMON,20)
ADD_CREATURE_TO_POOL(DRAGON,20)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
ADD_CREATURE_TO_POOL(TROLL,20)
ADD_CREATURE_TO_POOL(SPIDER,20)
ADD_CREATURE_TO_POOL(ORC,20)

CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)

ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)

DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)

IF(PLAYER0,PRISON > 3)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,2,5,3,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,2,5,3,0)
    ROOM_AVAILABLE(PLAYER0,BRIDGE,0,0)
    SET_FLAG(PLAYER0,FLAG0,1)
ENDIF

IF_AVAILABLE(PLAYER0,POWER_DESTROY_WALLS == 1)
    ROOM_AVAILABLE(PLAYER0,BRIDGE,1,0)
ENDIF

IF(PLAYER0,TOTAL_CREATURES > 10)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DRAGON,2,3,3,0)
ENDIF


IF(PLAYER1,TOTAL_CREATURES == 0)
    IF(PLAYER0,FLAG0 == 2)
        ADD_CREATURE_TO_LEVEL(PLAYER1,AVATAR,1,10,10,10000)
        SET_FLAG(PLAYER0,FLAG0,2)
    ENDIF
    
    IF(PLAYER0,FLAG0 == 1)
        ADD_CREATURE_TO_LEVEL(PLAYER1,DRAGON,1,8,8,0)
        SET_FLAG(PLAYER0,FLAG0,2)
    ENDIF
    
ENDIF

IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
    WIN_GAME
ENDIF
