REM KDK Level 8 Action

SET_GENERATE_SPEED(550)

MAX_CREATURES(PLAYER0,46)
MAX_CREATURES(PLAYER1,78)

START_MONEY(PLAYER0,35000)
START_MONEY(PLAYER1,55000)

COMPUTER_PLAYER(PLAYER1,2)

SET_CREATURE_MAX_LEVEL(PLAYER0,DEMONSPAWN,10)

ADD_CREATURE_TO_POOL(FLY,33)
ADD_CREATURE_TO_POOL(TENTACLE,11)
ADD_CREATURE_TO_POOL(SPIDER,13)
ADD_CREATURE_TO_POOL(BUG,19)
ADD_CREATURE_TO_POOL(HORNY,1)
ADD_CREATURE_TO_POOL(DEMONSPAWN,7)
ADD_CREATURE_TO_POOL(TROLL,26)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,4)
ADD_CREATURE_TO_POOL(SORCEROR,16)
ADD_CREATURE_TO_POOL(BILE_DEMON,9)
ADD_CREATURE_TO_POOL(ORC,27)

REM Creature_Availability

CREATURE_AVAILABLE(PLAYER0,HORNY,1,1)
CREATURE_AVAILABLE(PLAYER0,ORC,1,1)
CREATURE_AVAILABLE(PLAYER0,TENTACLE,1,1)
CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,1)
CREATURE_AVAILABLE(PLAYER1,SPIDER,1,1)

MAGIC_AVAILABLE(PLAYER0,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_OBEY,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_HAND,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_SLAP,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_POSSESS,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_SLAP,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_IMP,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_HEAL_CREATURE,1,0)

ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)
ROOM_AVAILABLE(PLAYER0,TEMPLE,1,0)
ROOM_AVAILABLE(PLAYER0,BARRACKS,1,0)

TRAP_AVAILABLE(PLAYER0,BOULDER,1,0)
TRAP_AVAILABLE(PLAYER1,LIGHTNING,1,0)
TRAP_AVAILABLE(PLAYER1,POISON_GAS,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
DOOR_AVAILABLE(PLAYER0,MAGIC,1,0)

REM CREATE_TEXT(2,76"TREAD CAREFULLY DUNGEON KEEPER.  RIVERS OF FIRE SNAKE THROUGH THIS REALM.  FIND THE ENEMY KEEPER AND DESPATCH HIM TO HELL.")
DISPLAY_OBJECTIVE(76,PLAYER0)

IF(PLAYER1,DUNGEON_DESTROYED == 1)
    IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
        DISPLAY_OBJECTIVE(19,PLAYER0)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,-1,1,5,3000)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,-1,2,3,3000)
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-1,2,3,3000)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
ENDIF

IF(PLAYER0,FLAG0 == 1)
    IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
        REM CREATE_TEXT(5,79"THE ENEMY IS NO MORE.  THE INHABITANTS OF THIS REGION WILL BOW DOWN BEFORE YOUR EVIL.")
        DISPLAY_OBJECTIVE(79,PLAYER0)
        WIN_GAME
    ENDIF
ENDIF
