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

REM Briefing

REM ********************************************
REM We have found the source of these rouge Keepers. Castle
REM Sadlack. Sadlack is quite an architechteral masterpiece, and its dungeons
REM are..... occupied.  The heroes within have an immense generator, powered
REM by three dungeon hearts which they have connected directly to
REM four Portals, and are luring innocent demons in and bewitching them.
REM This would explain the hero activity in the previous areas.
REM The fortress is nearly impregnable and a stategy will be required if success is
REM to be achieved. Because bringing in legions of troops from your previous
REM dungeons will take far to long and be highly expensive, and that all nearby
REM Portals are taken by the heroes, you shall have to get your soldiers from
REM other sources. Luckily, there is another Keeper in the area, one that is
REM patheticly terrible at dungeon managment and all his creatures are his
REM trusting friends and they all live quietly to the west of your fortified camp as it will.
REM Teach him a lesson in dungeon life and persuade his former 'buddies' to join you.
REM I'm sure you'll work something out. These creatures will need experience, and a Training Room
REM is not available to you right now, so pick up any spells you find and head south.
REM There should be an old, abandoned Library there with many powerful spells to educate your minions.
REM There is also a hero gold storage cellar about somewhere, but I doubt they'll give it up quietly.
REM When all is ready, enter the catacombs and destroy these rouge Keepers once and for all, make sure that none survive.

SET_GENERATE_SPEED(250)
MAX_CREATURES(PLAYER1,200)

START_MONEY(PLAYER1,100000)
START_MONEY(PLAYER0,955555)

COMPUTER_PLAYER(PLAYER1,10)
COMPUTER_PLAYER(PLAYER2,10)
COMPUTER_PLAYER(PLAYER3,10)

ALLY_PLAYERS(PLAYER1,PLAYER2)
ALLY_PLAYERS(PLAYER3,PLAYER2)
ALLY_PLAYERS(PLAYER1,PLAYER3)

ADD_CREATURE_TO_POOL(BILE_DEMON,50)
ADD_CREATURE_TO_POOL(KNIGHT,20)
ADD_CREATURE_TO_POOL(GIANT,20)
ADD_CREATURE_TO_POOL(BUG,10)
ADD_CREATURE_TO_POOL(DEMONSPAWN,15)
ADD_CREATURE_TO_POOL(BARBARIAN,15)
ADD_CREATURE_TO_POOL(DRAGON,10)

CREATURE_AVAILABLE(PLAYER1,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER1,KNIGHT,1,1)
CREATURE_AVAILABLE(PLAYER1,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER1,GIANT,1,1)
CREATURE_AVAILABLE(PLAYER1,BUG,1,1)
CREATURE_AVAILABLE(PLAYER1,DEMONSPAWN,1,1)
CREATURE_AVAILABLE(PLAYER1,BARBARIAN,1,1)

ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_SIGHT,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,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)

SET_CREATURE_HEALTH(HORNY,1024)
SET_CREATURE_ARMOUR(HORNY,255)
SET_CREATURE_FEAR(HORNY,0)

CREATE_PARTY(GROUPY)
    ADD_TO_PARTY(GROUPY,VAMPIRE,10,1000,DEFEND_PARTY,0)
    ADD_TO_PARTY(GROUPY,BILE_DEMON,10,1000,ATTACK_ENEMIES,0)

CREATE_PARTY(GUARD)
    ADD_TO_PARTY(GUARD,DWARFA,10,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GUARD,WITCH,10,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GUARD,GIANT,10,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GUARD,GIANT,8,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GUARD,DWARFA,2,1000,ATTACK_ENEMIES,0)

CREATE_PARTY(GATE)
    ADD_TO_PARTY(GUARD,ARCHER,10,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GUARD,WIZARD,2,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GUARD,THIEF,10,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GUARD,THIEF,2,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GUARD,THIEF,2,1000,ATTACK_ENEMIES,0)

DISPLAY_OBJECTIVE(29,ALL_PLAYERS)

IF(PLAYER0,GAME_TURN > 400)
    DISPLAY_INFORMATION(30)
ENDIF

IF(PLAYER0,GAME_TURN > 1200)
    DISPLAY_INFORMATION(31)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER1,GUARD,-1,2)

    IF_ACTION_POINT(2,PLAYER0)
        ADD_PARTY_TO_LEVEL(PLAYER1,GROUPY,-2,1)

        IF_ACTION_POINT(3,PLAYER0)
            ADD_PARTY_TO_LEVEL(PLAYER1,GATE,-3,1)

            IF_ACTION_POINT(4,PLAYER0)
                ADD_PARTY_TO_LEVEL(PLAYER0,GROUPY,-4,1)

                IF_ACTION_POINT(5,PLAYER0)
                    ADD_PARTY_TO_LEVEL(PLAYER1,GUARD,-5,2)

                    IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
                        WIN_GAME
                    ENDIF
                ENDIF
            ENDIF

            IF(PLAYER0,TOTAL_CREATURES == 0)
                LOSE_GAME
            ENDIF
        ENDIF
    ENDIF
ENDIF
