REM KDK Level 14

SET_GENERATE_SPEED(500)


MAX_CREATURES(PLAYER0,17)
MAX_CREATURES(PLAYER1,21)
MAX_CREATURES(PLAYER2,26)

START_MONEY(PLAYER0,24000)
START_MONEY(PLAYER1,5450)
START_MONEY(PLAYER2,13900)

COMPUTER_PLAYER(PLAYER1,0)
COMPUTER_PLAYER(PLAYER2,1)
ALLY_PLAYERS(PLAYER1,PLAYER2)
SET_COMPUTER_GLOBALS(PLAYER1,60,1,1,1,1900,1)
SET_COMPUTER_GLOBALS(PLAYER2,70,1,2,1,1700,1)
SET_COMPUTER_CHECKS(PLAYER1,"CHECK FOR NEUTRAL PLACES",1000,0,0,0,30000)
REM SET_COMPUTER_CHECKS(PLAYER2,"CHECK FOR NEUTRAL PLACES",1000,0,0,0,30000)

ADD_CREATURE_TO_POOL(HELL_HOUND,50)
ADD_CREATURE_TO_POOL(ORC,9)
ADD_CREATURE_TO_POOL(TENTACLE,26)
ADD_CREATURE_TO_POOL(HELL_HOUND,8)
ADD_CREATURE_TO_POOL(SPIDER,11)
ADD_CREATURE_TO_POOL(BUG,9)
ADD_CREATURE_TO_POOL(FLY,2)
ADD_CREATURE_TO_POOL(DEMONSPAWN,2)
ADD_CREATURE_TO_POOL(SKELETON,9)
ADD_CREATURE_TO_POOL(HORNY,3)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,13)
ADD_CREATURE_TO_POOL(SORCEROR,28)
ADD_CREATURE_TO_POOL(TROLL,16)
ADD_CREATURE_TO_POOL(BILE_DEMON,6)
ADD_CREATURE_TO_POOL(DRAGON,23)

REM Creature_Availability

CREATURE_AVAILABLE(PLAYER2,HORNY,1,1)
CREATURE_AVAILABLE(PLAYER2,TENTACLE,1,1)
CREATURE_AVAILABLE(PLAYER2,SPIDER,1,1)
CREATURE_AVAILABLE(PLAYER2,BUG,1,1)
CREATURE_AVAILABLE(PLAYER2,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER2,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER2,FLY,1,1)
CREATURE_AVAILABLE(PLAYER2,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER2,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER2,SKELETON,1,1)
CREATURE_AVAILABLE(PLAYER0,SKELETON,1,1)
CREATURE_AVAILABLE(PLAYER0,ORC,1,1)
CREATURE_AVAILABLE(PLAYER0,TENTACLE,1,1)
CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER0,SPIDER,1,1)
CREATURE_AVAILABLE(PLAYER0,BUG,1,1)
CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER0,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER1,SKELETON,1,1)
CREATURE_AVAILABLE(PLAYER1,TENTACLE,1,1)
CREATURE_AVAILABLE(PLAYER1,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER1,BUG,1,1)
CREATURE_AVAILABLE(PLAYER1,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER1,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER1,DEMONSPAWN,1,1)
CREATURE_AVAILABLE(PLAYER1,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER1,TROLL,1,1)

MAGIC_AVAILABLE(PLAYER1,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_HAND,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER2,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(PLAYER2,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(PLAYER2,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(PLAYER2,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DESTROY_WALLS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_POSSESS,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_HAND,1,1)

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

TRAP_AVAILABLE(PLAYER1,ALARM,1,0)
TRAP_AVAILABLE(PLAYER1,POISON_GAS,1,0)
TRAP_AVAILABLE(PLAYER1,LIGHTNING,1,0)
TRAP_AVAILABLE(PLAYER1,BOULDER,1,0)
TRAP_AVAILABLE(PLAYER1,WORD_OF_POWER,1,0)
TRAP_AVAILABLE(PLAYER2,ALARM,1,0)
TRAP_AVAILABLE(PLAYER2,POISON_GAS,1,0)
TRAP_AVAILABLE(PLAYER2,LIGHTNING,1,0)
TRAP_AVAILABLE(PLAYER2,BOULDER,1,0)
DOOR_AVAILABLE(PLAYER1,BRACED,1,0)
DOOR_AVAILABLE(PLAYER1,WOOD,1,0)
DOOR_AVAILABLE(PLAYER2,BRACED,1,0)
DOOR_AVAILABLE(PLAYER2,WOOD,1,0)

DISPLAY_OBJECTIVE(111,PLAYER0)

IF(PLAYER1,DUNGEON_DESTROYED == 1)
    IF(PLAYER2,DUNGEON_DESTROYED == 1)
        REM CREATE_TEXT(4,111"YOU ARE ALMOST VICTORIOUS. ONLY THE LORD OF THE LAND STANDS IN YOUR WAY, FIND HIM AND SHOW HIM SOME POWER.... ")
        DISPLAY_OBJECTIVE(111,PLAYER0)
    ENDIF
ENDIF

IF(PLAYER_GOOD,WIZARD == 0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,-1,1,10,1000000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,-1,4,7,1000)
    IF(PLAYER_GOOD,KNIGHT == 0)
        IF(PLAYER1,DUNGEON_DESTROYED == 1)
            IF(PLAYER2,DUNGEON_DESTROYED == 1)
                WIN_GAME
                REM CREATE_TEXT(5,112"WELL DONE THAT WAS FLIPPIN GREAT")
                DISPLAY_OBJECTIVE(112,PLAYER0)
            ENDIF
        ENDIF
    ENDIF
ENDIF
