REM Play Level Forlon

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

SET_GENERATE_SPEED(400)

MAX_CREATURES(PLAYER0,16)

START_MONEY(PLAYER0,24000)

ADD_CREATURE_TO_POOL(BUG,6)
ADD_CREATURE_TO_POOL(DEMONSPAWN,7)
ADD_CREATURE_TO_POOL(SORCEROR,5)
ADD_CREATURE_TO_POOL(BILE_DEMON,6)
ADD_CREATURE_TO_POOL(TROLL,9)
ADD_CREATURE_TO_POOL(ORC,8)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,11)
ADD_CREATURE_TO_POOL(HELL_HOUND,2)
ADD_CREATURE_TO_POOL(HORNY,7)
ADD_CREATURE_TO_POOL(TENTACLE,6)

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

CREATURE_AVAILABLE(ALL_PLAYERS,BUG,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,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,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,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,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_IMP,1,0)
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_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)

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)

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

IF(PLAYER0,DUNGEON_DESTROYED == 1)
    LOSE_GAME
ENDIF

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

CREATE_PARTY(ONE)
    ADD_TO_PARTY(ONE,DWARFA,6,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,ARCHER,6,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,BARBARIAN,7,400,ATTACK_ENEMIES,0)

CREATE_PARTY(TWO)
    ADD_TO_PARTY(TWO,WIZARD,7,600,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,WIZARD,7,600,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,WITCH,8,700,ATTACK_ENEMIES,0)

CREATE_PARTY(A)
    ADD_TO_PARTY(A,AVATAR,10,6000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(A,KNIGHT,8,500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(A,KNIGHT,8,500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(A,SAMURAI,10,500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(A,SAMURAI,10,500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(A,GIANT,10,500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(A,GIANT,10,500,ATTACK_ENEMIES,0)

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

SET_TIMER(PLAYER0,TIMER0)

ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,5,ACTION_POINT,7,7,400)

IF(PLAYER0,TIMER0 >= 8000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,6,DUNGEON_HEART,0,7,400)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,13,DUNGEON_HEART,0,7,400)
ENDIF

IF(PLAYER0,TIMER0 >= 23000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,7,DUNGEON_HEART,0,7,400)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,14,ACTION_POINT,13,7,400)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,2,4,8,400)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,-1,2,9,0)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,-1,2,9,0)
ENDIF

IF_ACTION_POINT(9,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,9,2,3,0)
ENDIF

IF_ACTION_POINT(10,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,10,2,4,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,9,1,2,0)
ENDIF

IF_ACTION_POINT(8,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,TENTACLE,8,1,2,0)
ENDIF

IF_ACTION_POINT(11,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,TENTACLE,11,1,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SPIDER,11,1,4,0)
ENDIF

IF_ACTION_POINT(12,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,TENTACLE,12,1,2,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,12,2,5,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SPIDER,12,1,3,0)
    SET_TIMER(PLAYER_GOOD,TIMER0)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 18000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,TENTACLE,12,3,6,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,12,6,5,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SPIDER,12,3,8,0)
ENDIF

IF(PLAYER_GOOD,ARCHER == 0)
    IF(PLAYER_GOOD,MONK == 0)
        IF(PLAYER_GOOD,BARBARIAN == 0)
            IF(PLAYER_GOOD,SAMURAI == 0)
                ADD_PARTY_TO_LEVEL(PLAYER_GOOD,A,-1,1)
                ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-1,12,2,0)
                IF(PLAYER_GOOD,AVATAR == 0)
                    WIN_GAME
                ENDIF
            ENDIF
        ENDIF
    ENDIF
ENDIF
