REM ********************************************
REM
REM  Script for Level Syndika
REM    v1.2.0 created by Stanza on 21 Jan 2008
REM    updated by Mefistotelis
REM    updated for pot file by dayokay (Dec2020) for inclusion in 'classic' KeeperFX map-pack
REM    converted to keeperfx format sep 2024
REM
REM  Author Description: The kind of map where heroes come knocking at your door. Although there's no
REM    background nor campaign, heroes are now smugglers in the 'history' of the map, eager of gold and
REM    lands, a bit like Keepers in fact. Anyway the map is rather difficult. It was made easier from
REM    original version, but still it's hard.
REM
REM ********************************************
LEVEL_VERSION(1)

SET_GENERATE_SPEED(400)
MAX_CREATURES(PLAYER0,15)
START_MONEY(PLAYER0,2500)

ADD_CREATURE_TO_POOL(TROLL,10)
ADD_CREATURE_TO_POOL(TENTACLE,10)
ADD_CREATURE_TO_POOL(SORCEROR,10)
ADD_CREATURE_TO_POOL(HELL_HOUND,10)
ADD_CREATURE_TO_POOL(BILE_DEMON,10)
ADD_CREATURE_TO_POOL(ORC,10)
ADD_CREATURE_TO_POOL(SPIDER,7)
ADD_CREATURE_TO_POOL(BUG,6)

CREATURE_AVAILABLE(PLAYER0,FLY,1,0)
CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,0)
CREATURE_AVAILABLE(PLAYER0,TROLL,1,0)
CREATURE_AVAILABLE(PLAYER0,TENTACLE,1,0)
CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,0)
CREATURE_AVAILABLE(PLAYER0,SPIDER,1,0)
CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,0)
CREATURE_AVAILABLE(PLAYER0,BUG,1,0)
CREATURE_AVAILABLE(PLAYER0,ORC,1,0)

ROOM_AVAILABLE(PLAYER0,TREASURE,1,1)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER0,LAIR,1,1)
ROOM_AVAILABLE(PLAYER0,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER0,WORKSHOP,2,0)
ROOM_AVAILABLE(PLAYER0,GUARD_POST,1,0)
ROOM_AVAILABLE(PLAYER0,BARRACKS,1,0)
ROOM_AVAILABLE(PLAYER0,TEMPLE,1,0)
ROOM_AVAILABLE(PLAYER0,BRIDGE,1,0)
ROOM_AVAILABLE(PLAYER0,RESEARCH,3,0)

DOOR_AVAILABLE(PLAYER0,WOOD,1,0)
DOOR_AVAILABLE(PLAYER0,BRACED,1,0)
DOOR_AVAILABLE(PLAYER0,STEEL,1,0)

TRAP_AVAILABLE(PLAYER0,WORD_OF_POWER,1,0)
TRAP_AVAILABLE(PLAYER0,ALARM,1,0)
TRAP_AVAILABLE(PLAYER0,POISON_GAS,1,0)
TRAP_AVAILABLE(PLAYER0,LIGHTNING,1,0)

MAGIC_AVAILABLE(PLAYER0,POWER_OBEY,1,1)
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_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_CHICKEN,1,0)

CREATE_PARTY(SYNDIK1)
    ADD_TO_PARTY(SYNDIK1,THIEF,3,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK1,SAMURAI,2,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK1,GIANT,2,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK1,GIANT,2,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK1,ARCHER,3,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK2)
    ADD_TO_PARTY(SYNDIK2,THIEF,4,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK2,THIEF,4,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK2,BARBARIAN,4,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK2,BARBARIAN,4,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK2,SAMURAI,3,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK3)
    ADD_TO_PARTY(SYNDIK3,DWARFA,5,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK3,DWARFA,5,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK3,DWARFA,5,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK3,MONK,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK3,MONK,6,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK4)
    ADD_TO_PARTY(SYNDIK4,THIEF,5,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK4,THIEF,5,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK4,BARBARIAN,4,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK4,BARBARIAN,4,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK4,SAMURAI,5,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK5)
    ADD_TO_PARTY(SYNDIK5,BARBARIAN,6,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK5,SAMURAI,6,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK5,ARCHER,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK5,WIZARD,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK5,THIEF,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK5,GIANT,6,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK6)
    ADD_TO_PARTY(SYNDIK6,MONK,7,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK6,MONK,7,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK6,MONK,7,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK6,SAMURAI,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK6,SAMURAI,6,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK7)
    ADD_TO_PARTY(SYNDIK7,GIANT,5,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK7,GIANT,5,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK7,GIANT,5,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK7,BARBARIAN,5,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK7,BARBARIAN,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK7,THIEF,7,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK8)
    ADD_TO_PARTY(SYNDIK8,SAMURAI,4,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK8,SAMURAI,4,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK8,SAMURAI,4,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK8,SAMURAI,4,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK8,SAMURAI,5,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK8,GIANT,7,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK8,GIANT,7,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK9)
    ADD_TO_PARTY(SYNDIK9,WIZARD,6,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK9,WIZARD,6,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK9,WIZARD,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK9,WITCH,7,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK9,WITCH,7,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK9,DWARFA,10,1700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK10)
    ADD_TO_PARTY(SYNDIK10,SAMURAI,6,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK10,SAMURAI,6,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK10,SAMURAI,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK10,SAMURAI,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK10,ARCHER,7,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK10,ARCHER,7,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK11)
    ADD_TO_PARTY(SYNDIK11,WIZARD,7,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK11,WIZARD,6,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK11,BARBARIAN,7,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK11,BARBARIAN,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK11,GIANT,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK11,ARCHER,7,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK12)
    ADD_TO_PARTY(SYNDIK12,ARCHER,6,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK12,ARCHER,6,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK12,DWARFA,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK12,WIZARD,7,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK12,SAMURAI,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK12,KNIGHT,5,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK13)
    ADD_TO_PARTY(SYNDIK13,WITCH,10,2800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK13,WIZARD,10,2800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK13,MONK,10,2000,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK13,SAMURAI,9,1500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK13,SAMURAI,9,1500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK13,KNIGHT,10,7000,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK14)
    ADD_TO_PARTY(SYNDIK14,GIANT,6,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK14,GIANT,6,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK14,GIANT,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK14,THIEF,8,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK14,WIZARD,6,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK14,BARBARIAN,9,700,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(SYNDIK15)
    ADD_TO_PARTY(SYNDIK15,BARBARIAN,8,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK15,BARBARIAN,8,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK15,BARBARIAN,8,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK15,BARBARIAN,8,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK15,WIZARD,7,700,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SYNDIK15,SAMURAI,7,700,ATTACK_DUNGEON_HEART,0)

REM "Here you are into enemy territory, Keeper. The smugglers are organised and have numerous defense posts at their disposal. Be quick and tactical to insure your victory."
DISPLAY_OBJECTIVE(1)

IF(PLAYER0,KNIGHT == 1)
    REM "A baron whose lands have been pillaged has joined your lines. Maybe is it here your chance to defeat the syndicate's agents."
    DISPLAY_OBJECTIVE(2)
    MAGIC_AVAILABLE(PLAYER0,POWER_PROTECT,1,0)
ENDIF

IF_ACTION_POINT(7,PLAYER0)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,7,ACTION_POINT,6,1,250)
ENDIF

REM Timer 0 triggers

IF_ACTION_POINT(6,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,7,6,1,500)
    SET_TIMER(PLAYER_GOOD,TIMER0)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 6500)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK1,-4,ACTION_POINT,6,1,250)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 9500)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK3,-1,ACTION_POINT,6,1,250)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 13500)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK2,-4,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 19000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK4,-5,ACTION_POINT,6,2,250)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 21000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK1,-1,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 23000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK5,-4,ACTION_POINT,6,4,250)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 24000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK7,-1,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 27000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK6,-5,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 30000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK8,-4,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 32000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK11,-1,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK8,-1,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 38000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK6,-5,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 40000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK10,-4,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 41000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK10,-5,ACTION_POINT,6,3,250)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 44000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK9,-5,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 48000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK15,-4,1)
ENDIF

REM Timer 1 triggers

IF_ACTION_POINT(5,PLAYER0)
    SET_TIMER(PLAYER_GOOD,TIMER1)
ENDIF

IF(PLAYER_GOOD,TIMER1 >= 9000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK2,-2,1)
ENDIF

IF(PLAYER_GOOD,TIMER1 >= 19000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK14,-6,ACTION_POINT,6,4,250)
ENDIF

IF(PLAYER_GOOD,TIMER1 >= 29000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK7,-3,ACTION_POINT,6,4,250)
ENDIF

IF(PLAYER_GOOD,TIMER1 >= 31000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK9,-3,1)
    REM Starting (or re-starting) timer 2 - continous wave of heroes
    SET_TIMER(PLAYER_GOOD,TIMER2)
ENDIF

REM Now timer 2 triggers - this one is continous

IF(PLAYER_GOOD,TIMER2 >= 4500)
    REM Set Flag 2 - so that the final party can arrive
    SET_FLAG(PLAYER_GOOD,FLAG2,1)
    NEXT_COMMAND_REUSABLE
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK1,-1,2)
    NEXT_COMMAND_REUSABLE
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK11,-1,1)
    NEXT_COMMAND_REUSABLE
    SET_TIMER(PLAYER_GOOD,TIMER2)
ENDIF

REM Action points code

IF_ACTION_POINT(3,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK8,4,2)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK5,2,2)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
    SET_TIMER(PLAYER_GOOD,TIMER3)
ENDIF

REM Now Timer 3 triggers

IF(PLAYER_GOOD,TIMER3 >= 7000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK10,-6,1)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 13000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK14,-5,1)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 19000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK11,-4,1)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK9,-3,ACTION_POINT,6,4,250)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 26000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK8,-6,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK3,-6,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK5,-6,1)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 37000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK14,-5,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK8,-5,1)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 49000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK6,-4,ACTION_POINT,6,4,250)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK6,-4,ACTION_POINT,6,4,250)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK11,-4,2)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 57000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK10,-1,ACTION_POINT,6,4,250)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK6,-1,1)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 61000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK8,-1,3)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK5,-1,3)
    REM Starting (or re-starting) timer 2 - continous wave of heroes
    SET_TIMER(PLAYER_GOOD,TIMER2)
ENDIF

REM And now the final party
REM FLAG1=1 means final party defeated
REM FLAG2=1 means final party can arrive, as all standard partys have ended

IF(PLAYER_GOOD,FLAG2 == 1)
    IF_CONTROLS(PLAYER_GOOD,TOTAL_CREATURES == 0)
    REM "Now that you have slaughtered the syndicate's troops, his director seems pretty angry. Atrociously played Keeper! Now you must decimate his army, a necessary task in order to take control over these lands."
    DISPLAY_OBJECTIVE(3,PLAYER0)
        SET_FLAG(PLAYER_GOOD,FLAG1,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK8,-7,2)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK10,-7,2)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK12,-7,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK13,-7,1)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK9,-4,2)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK7,-4,2)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SYNDIK15,-5,2)
        REM Starting (or re-starting) timer 2 - continous wave of heroes
        REM This will make sure we have enough time to deal with final party
        SET_TIMER(PLAYER_GOOD,TIMER2)
    ENDIF
ENDIF

REM Win and lose conditions

IF(PLAYER_GOOD,FLAG1 == 1)
    IF_CONTROLS(PLAYER_GOOD,TOTAL_CREATURES == 0)
        IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
            REM "The syndicate has been eradicated! Congratulations Keeper on your victory against the Director. "
            DISPLAY_OBJECTIVE(4)
            WIN_GAME
        ENDIF
    ENDIF
ENDIF

IF(PLAYER0,DUNGEON_DESTROYED == 1)
    LOSE_GAME
ENDIF
