REM Play Level Lord Vexer

REM Dedicated to good friend.
REM author: DzjeeAr
REM Map made: 16-01-2007

REM ******* Basic settings *******

SET_GENERATE_SPEED(350)

MAX_CREATURES(PLAYER0,24)

START_MONEY(PLAYER0,7500)
START_MONEY(PLAYER3,9000000)

ALLY_PLAYERS(PLAYER3,PLAYER_GOOD)
ALLY_PLAYERS(PLAYER2,PLAYER_GOOD)

ADD_CREATURE_TO_POOL(FLY,3)
ADD_CREATURE_TO_POOL(BUG,5)
ADD_CREATURE_TO_POOL(SPIDER,3)
ADD_CREATURE_TO_POOL(DEMONSPAWN,9)
ADD_CREATURE_TO_POOL(SORCEROR,8)
ADD_CREATURE_TO_POOL(BILE_DEMON,5)
ADD_CREATURE_TO_POOL(DRAGON,7)
ADD_CREATURE_TO_POOL(TROLL,12)
ADD_CREATURE_TO_POOL(ORC,6)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,12)
ADD_CREATURE_TO_POOL(SKELETON,6)
ADD_CREATURE_TO_POOL(GHOST,7)
ADD_CREATURE_TO_POOL(HELL_HOUND,12)
ADD_CREATURE_TO_POOL(HORNY,8)

REM ********** Available creatures **********

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

REM ********** Available rooms **********

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,0)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)

REM ********** Available spells **********

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)

SET_TIMER(PLAYER0,TIMER7)
IF(PLAYER0,TIMER7 >= 600)
    IF(PLAYER0,TOTAL_IMPS < 24)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER0,IMP,PLAYER0,1,1,0)
        NEXT_COMMAND_REUSABLE
        SET_TIMER(PLAYER0,TIMER7)
    ENDIF
ENDIF

REM ********** Available doors & traps **********

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

REM ********** Game settings **********

IF(PLAYER0,DUNGEON_DESTROYED == 1)
    LOSE_GAME
ENDIF

SET_CREATURE_HEALTH(VAMPIRE,1600)
SET_CREATURE_HEALTH(WITCH,1000)
SET_CREATURE_STRENGTH(VAMPIRE,60)

REM ********** Parties **********

CREATE_PARTY(ONE)
    ADD_TO_PARTY(ONE,SKELETON,1,600,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,SKELETON,1,600,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,SKELETON,1,600,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,SKELETON,1,600,ATTACK_ENEMIES,0)

REM ********** Triggers & End game **********

ADD_CREATURE_TO_LEVEL(PLAYER3,VAMPIRE,-1,1,10,3000)

IF(PLAYER_GOOD,BATTLES_LOST >= 3)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,2,1)
    SET_TIMER(PLAYER_GOOD,TIMER0)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
    SET_TIMER(PLAYER_GOOD,TIMER5)
    ADD_CREATURE_TO_LEVEL(PLAYER1,SKELETON,9,9,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER1,SKELETON,10,5,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER1,SKELETON,11,3,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER2,SKELETON,9,6,1,200)
    ADD_CREATURE_TO_LEVEL(PLAYER2,SKELETON,10,2,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER2,SKELETON,11,2,1,0)
ENDIF

IF_ACTION_POINT(14,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER1,SKELETON,12,11,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER2,SKELETON,12,7,1,0)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 3000)
    IF(PLAYER_GOOD,FLAG0 == 0)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SKELETON,2,2,3,0)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SKELETON,2,1,5,0)
        NEXT_COMMAND_REUSABLE
        SET_TIMER(PLAYER_GOOD,TIMER0)
    ENDIF
ENDIF

IF_ACTION_POINT(3,PLAYER0)
    SET_FLAG(PLAYER_GOOD,FLAG0,1)
    SET_TIMER(PLAYER_GOOD,TIMER1)
    SET_TIMER(PLAYER_GOOD,TIMER4)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SKELETON,13,7,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER1,SKELETON,13,5,1,0)
    IF(PLAYER3,VAMPIRE == 0)
        WIN_GAME
    ENDIF
ENDIF


IF(PLAYER_GOOD,TIMER1 >= 1700)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SKELETON,-1,1,10,0)
    NEXT_COMMAND_REUSABLE
    SET_TIMER(PLAYER_GOOD,TIMER1)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,5,8,9,100)
ENDIF

IF_ACTION_POINT(6,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SPIDER,7,6,8,200)
ENDIF

IF(PLAYER_GOOD,SPIDER == 0)
    SET_TIMER(PLAYER_GOOD,TIMER2)
    SET_TIMER(PLAYER_GOOD,TIMER3)
ENDIF

IF(PLAYER_GOOD,TIMER2 >= 1900)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,-1,1,5,0)
    NEXT_COMMAND_REUSABLE
    SET_TIMER(PLAYER_GOOD,TIMER2)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 3200)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SPIDER,-1,1,8,0)
    NEXT_COMMAND_REUSABLE
    SET_TIMER(PLAYER_GOOD,TIMER3)
ENDIF

IF(PLAYER_GOOD,KNIGHT == 0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,-1,1,10,4000)
ENDIF

IF(PLAYER_GOOD,TIMER4 >= 1000)
    IF_ACTION_POINT(8,PLAYER0)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SKELETON,-1,2,6,0)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SKELETON,-1,1,7,0)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SKELETON,-1,2,5,0)
        NEXT_COMMAND_REUSABLE
        RESET_ACTION_POINT(8)
        NEXT_COMMAND_REUSABLE
        SET_TIMER(PLAYER_GOOD,TIMER4)
    ENDIF
ENDIF

IF(PLAYER_GOOD,TIMER5 >= 4500)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER1,SKELETON,9,7,1,0)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER1,SKELETON,10,4,1,0)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER1,SKELETON,12,3,1,0)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER2,SKELETON,9,4,1,200)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER2,SKELETON,10,1,1,0)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER2,SKELETON,12,1,1,0)
    NEXT_COMMAND_REUSABLE
    SET_TIMER(PLAYER_GOOD,TIMER5)
ENDIF
