REM KDK Level 13

SET_GENERATE_SPEED(400)

MAX_CREATURES(PLAYER0,27)
MAX_CREATURES(PLAYER1,38)
MAX_CREATURES(PLAYER2,19)

START_MONEY(PLAYER0,8500)
START_MONEY(PLAYER1,14450)
START_MONEY(PLAYER2,38115)

COMPUTER_PLAYER(PLAYER1,10)
COMPUTER_PLAYER(PLAYER2,10)
SET_COMPUTER_PROCESS(PLAYER1,"DIG TO CLOSE GOLD",0,25000,500,3,47)
SET_COMPUTER_PROCESS(PLAYER2,"DIG TO CLOSE GOLD",0,25000,500,3,47)
ALLY_PLAYERS(PLAYER1,PLAYER2)

REM Creature_Availability

CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,HELL_HOUND,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,TENTACLE,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,GHOST,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,VAMPIRE,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,1)

ADD_CREATURE_TO_POOL(FLY,51)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,24)
ADD_CREATURE_TO_POOL(SORCEROR,39)
ADD_CREATURE_TO_POOL(TROLL,9)
ADD_CREATURE_TO_POOL(BILE_DEMON,3)
ADD_CREATURE_TO_POOL(HELL_HOUND,21)
ADD_CREATURE_TO_POOL(DRAGON,18)
ADD_CREATURE_TO_POOL(ORC,33)
ADD_CREATURE_TO_POOL(TENTACLE,18)
ADD_CREATURE_TO_POOL(GHOST,12)
ADD_CREATURE_TO_POOL(SPIDER,18)
ADD_CREATURE_TO_POOL(VAMPIRE,6)
ADD_CREATURE_TO_POOL(BUG,48)

REM Room_Availability

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

REM Spells

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
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_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)


REM doors & traps

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


REM ---------------------------------------------------------

REM CREATE_TEXT(1,95"YOU HAVE TAKEN OVER AN EXISTING DUNGEON.  USE IT TO YOUR BEST ADVANTAGE AS TWO RIVAL DUNGEON KEEPERS HAVE ALLIED IN AN EFFORT TO DESTROY YOU.  DEFEND YOUR DUNGEON WELL, THEN REMOVE ALL TRACES OF THE ENEMY FROM THIS LAND.")
DISPLAY_OBJECTIVE(95,PLAYER0)

IF(PLAYER1,DUNGEON_DESTROYED == 1)
    IF(PLAYER2,DUNGEON_DESTROYED == 1)
        REM CREATE_TEXT(4,96"MAGNIFICENT.  YOU HAVE DEFEATED TWICE YOUR NUMBER AND NOW THIS LAND IS A SLAVE TO YOUR WILL.")
        DISPLAY_OBJECTIVE(96,PLAYER0)
        WIN_GAME
    ENDIF
ENDIF


IF_AVAILABLE(PLAYER0,WORD_OF_POWER == 1)
    REM CREATE_TEXT(5,106"YOU HAVE THE WORD OF POWER TRAP AVAILABLE TO YOU.  THIS WILL DECIMATE ANY ATTACKERS WHO ARE UNFORTUNATE ENOUGH TO TRIGGER IT.")
    DISPLAY_INFORMATION(106,PLAYER0)
ENDIF

IF_AVAILABLE(PLAYER0,POWER_HOLD_AUDIENCE == 1)
REM CREATE_TEXT(6,107"THE POWER OF HOLD AUDIENCE HAS BEEN RESEARCHED.  THIS SPELL SHOULD BE USED AS A LAST DITCH DEFENSIVE SPELL AS IT WILL IMMEDIATELY TELEPORT ALL OF YOUR CREATURES BACK TO YOUR DUNGEON HEART.")
    DISPLAY_INFORMATION(107,PLAYER0)
ENDIF
