REM ********************************************
REM  Nikolai's Castles campaign for KeeperFX
REM  Script for Level 2, Castle Kandro
REM  Version 1.10
REM  Map altered by dayokay
REM  due to pathfinding issues
REM  map has been reduced in complexity
REM  by converting corridors to rock
REM  this allowed most of the intricate
REM  design to be maintained
REM ********************************************

LEVEL_VERSION(1)

SET_GENERATE_SPEED(250)

MAX_CREATURES(PLAYER0,16)

START_MONEY(PLAYER0,17235)

ADD_CREATURE_TO_POOL(BILE_DEMON,4)
ADD_CREATURE_TO_POOL(DRAGON,4)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,4)
ADD_CREATURE_TO_POOL(SORCEROR,4)

CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,0)
CREATURE_AVAILABLE(PLAYER0,DRAGON,1,0)
CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,0)
CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,0)

ROOM_AVAILABLE(PLAYER0,TREASURE,1,1)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER0,LAIR,1,1)
ROOM_AVAILABLE(PLAYER0,TORTURE,1,0)
ROOM_AVAILABLE(PLAYER0,TRAINING,1,0)
ROOM_AVAILABLE(PLAYER0,TEMPLE,1,0)
ROOM_AVAILABLE(PLAYER0,GRAVEYARD,0,0)

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

SET_TIMER(PLAYER0,TIMER0)
SET_TIMER(PLAYER0,TIMER1)
SET_TIMER(PLAYER0,TIMER2)
SET_TIMER(PLAYER0,TIMER3)

CREATE_PARTY(ALPHA)
    ADD_TO_PARTY(ALPHA,KNIGHT,6,3500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ALPHA,IMP,1,500,ATTACK_ENEMIES,0)

REM QUICK_OBJECTIVE(1,"Legends tell, O Keeper, of a castle full of deranged Knights wearing funny hats. This must be the place. Perhaps you should have a word with them about their fashion sense. It would probably be a good idea to raise a small army, first.",PLAYER0)
DISPLAY_OBJECTIVE(3,ALL_PLAYERS)

IF(PLAYER0,TIMER0 >= 400)
    REM QUICK_INFORMATION(10,"Incidentally, that legend also said something about watching out for the fairies...")
    DISPLAY_INFORMATION(4,ALL_PLAYERS)
ENDIF

IF(PLAYER0,TIMER1 >= 800)
    REM QUICK_INFORMATION(2,"Oh, and the legend mentioned Nine Fanatical Samurai, as I recall.")
    DISPLAY_INFORMATION(5,ALL_PLAYERS)
ENDIF

IF(PLAYER0,TIMER2 >= 1200)
    REM QUICK_INFORMATION(3,"I suppose you'd rather not hear the bit in the legend about the hungry Ghosts, then.")
    DISPLAY_INFORMATION(6,ALL_PLAYERS)
ENDIF

IF(PLAYER0,TIMER3 >= 12000)
    REM QUICK_INFORMATION(4,"Having fun?")
    DISPLAY_INFORMATION(7,ALL_PLAYERS)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
    REM QUICK_INFORMATION(5,"Do you hear something stirring, Keeper? Tin cans?")
    DISPLAY_INFORMATION(8,-1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ALPHA,-1,1)
ENDIF

IF_ACTION_POINT(2,PLAYER0)
    REM QUICK_INFORMATION(6,"I detect the stench of heroes, Keeper. Beware.")
    DISPLAY_INFORMATION(9,-2)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ALPHA,-2,1)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
    REM QUICK_INFORMATION(7,"Keeper! Your Imps are too loud. They've been heard!")
    DISPLAY_INFORMATION(10,-3)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ALPHA,-3,1)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
    REM QUICK_INFORMATION(8,"Oh, Keeper. They're on to us.")
    DISPLAY_INFORMATION(11,-4)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ALPHA,-4,1)
ENDIF

IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
    REM QUICK_INFORMATION(9,"You certainly taught those jumped-up parish priests in tin cans a lesson, Keeper. Feel justly proud and smug.")
    DISPLAY_INFORMATION(12,ALL_PLAYERS)
    WIN_GAME
ENDIF
