REM ********************************************
REM  Grinics' KReign campaign for KeeperFX
REM  Script for Level 209
REM  Version 1.00
REM ********************************************

REM Briefing

REM ********************************************
REM So, the little buggers managed something as pitifully easy as raising the
REM dead. This may cause some inconvinience to you but you should overcome it easily.
REM Proceed to Castle Hangdamien, where the first experiment to try and coax
REM our demons out of the dimensional void is taking place. Kill them all and
REM make sure they stay dead.


SET_GENERATE_SPEED(600)

MAX_CREATURES(ALL_PLAYERS,152)

START_MONEY(ALL_PLAYERS,60000)

ADD_CREATURE_TO_POOL(DRAGON,20)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
ADD_CREATURE_TO_POOL(TROLL,5)
ADD_CREATURE_TO_POOL(BUG,5)
ADD_CREATURE_TO_POOL(ORC,15)
ADD_CREATURE_TO_POOL(SPIDER,15)
ADD_CREATURE_TO_POOL(BILE_DEMON,20)
ADD_CREATURE_TO_POOL(VAMPIRE,3)
ADD_CREATURE_TO_POOL(SORCEROR,9)

CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER0,SPIDER,1,1)
CREATURE_AVAILABLE(PLAYER0,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER0,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER0,BUG,1,1)
CREATURE_AVAILABLE(PLAYER0,ORC,1,1)
CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER0,VAMPIRE,1,1)

ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
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,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)

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_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_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DESTROY_WALLS,1,0)

DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LAVA,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)

CREATE_PARTY(PORTAL1)
    ADD_TO_PARTY(PORTAL1,BILE_DEMON,5,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL1,DEMONSPAWN,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL1,BUG,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL1,SPIDER,2,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL1,FLY,5,400,ATTACK_ENEMIES,0)

CREATE_PARTY(PORTAL2)
    ADD_TO_PARTY(PORTAL2,BILE_DEMON,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL2,FLY,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL2,DRAGON,2,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL2,DRAGON,5,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL2,SORCEROR,10,400,ATTACK_ENEMIES,0)

CREATE_PARTY(PORTAL3)
    ADD_TO_PARTY(PORTAL3,ORC,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL3,TROLL,4,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL3,SKELETON,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL3,FLY,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL3,TENTACLE,3,400,ATTACK_ENEMIES,0)

CREATE_PARTY(PORTAL4)
    ADD_TO_PARTY(PORTAL4,ORC,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL4,ORC,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL4,DEMONSPAWN,5,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL4,GHOST,5,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL4,TROLL,10,400,ATTACK_ENEMIES,0)

CREATE_PARTY(PORTAL5)
    ADD_TO_PARTY(PORTAL5,DRAGON,8,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL5,DARK_MISTRESS,6,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL5,HORNY,10,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL5,FLY,1,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(PORTAL5,BUG,1,400,ATTACK_ENEMIES,0)

DISPLAY_OBJECTIVE(42,ALL_PLAYERS)

IF(PLAYER_GOOD,TOTAL_CREATURES <= 1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PORTAL1,1,2)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PORTAL2,2,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PORTAL3,3,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PORTAL4,4,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PORTAL5,5,1)
ENDIF

IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
    WIN_GAME
ENDIF

IF(PLAYER0,DUNGEON_DESTROYED == 1)
    LOSE_GAME
ENDIF
