REM Play Level Cozyness

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

SET_GENERATE_SPEED(400)

MAX_CREATURES(PLAYER0,14)

START_MONEY(PLAYER0,10000)

ADD_CREATURE_TO_POOL(FLY,9)
ADD_CREATURE_TO_POOL(BUG,2)
ADD_CREATURE_TO_POOL(DEMONSPAWN,12)
ADD_CREATURE_TO_POOL(SORCEROR,6)
ADD_CREATURE_TO_POOL(BILE_DEMON,1)
ADD_CREATURE_TO_POOL(TROLL,4)
ADD_CREATURE_TO_POOL(HELL_HOUND,11)

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

CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
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,HELL_HOUND,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)

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)

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

IF(PLAYER0,DUNGEON_DESTROYED == 1)
    LOSE_GAME
ENDIF

SET_CREATURE_MAX_LEVEL(ALL_PLAYERS,FLY,4)
SET_CREATURE_MAX_LEVEL(ALL_PLAYERS,BUG,4)
SET_CREATURE_MAX_LEVEL(ALL_PLAYERS,DEMONSPAWN,4)
SET_CREATURE_MAX_LEVEL(ALL_PLAYERS,SORCEROR,4)
SET_CREATURE_MAX_LEVEL(ALL_PLAYERS,BILE_DEMON,4)
SET_CREATURE_MAX_LEVEL(ALL_PLAYERS,HELL_HOUND,4)
SET_CREATURE_MAX_LEVEL(ALL_PLAYERS,TROLL,4)

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

CREATE_PARTY(ONE)
    ADD_TO_PARTY(ONE,THIEF,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,THIEF,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,ARCHER,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,ARCHER,3,300,ATTACK_ENEMIES,0)

CREATE_PARTY(TWO)
    ADD_TO_PARTY(TWO,BARBARIAN,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,BARBARIAN,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,WIZARD,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,WIZARD,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,WIZARD,3,300,ATTACK_ENEMIES,0)

CREATE_PARTY(THREE)
    ADD_TO_PARTY(THREE,ARCHER,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,ARCHER,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,WIZARD,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,WIZARD,3,300,ATTACK_ENEMIES,0)

CREATE_PARTY(FOUR)
    ADD_TO_PARTY(FOUR,GIANT,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,GIANT,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,GIANT,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,THIEF,3,300,ATTACK_ENEMIES,0)

CREATE_PARTY(FIVE)
    ADD_TO_PARTY(FIVE,WIZARD,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,WIZARD,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,BARBARIAN,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,BARBARIAN,2,200,ATTACK_ENEMIES,0)

CREATE_PARTY(SIX)
    ADD_TO_PARTY(SIX,AVATAR,2,2500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SIX,WIZARD,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SIX,WIZARD,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SIX,WIZARD,4,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SIX,GIANT,2,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SIX,GIANT,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SIX,BARBARIAN,4,300,ATTACK_ENEMIES,0)

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

IF(PLAYER0,TOTAL_CREATURES >= 13)
    SET_TIMER(PLAYER_GOOD,TIMER0)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 500)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,1,DUNGEON_HEART,0,1,200)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 2000)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,2,DUNGEON_HEART,0,1,200)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 3500)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,3,DUNGEON_HEART,0,1,200)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 5000)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,6,DUNGEON_HEART,0,1,200)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 6500)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,4,DUNGEON_HEART,0,1,200)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 8000)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,5,DUNGEON_HEART,0,1,200)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 12000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,7,DUNGEON_HEART,0,1,100)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,8,DUNGEON_HEART,0,2,100)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,9,DUNGEON_HEART,0,2,100)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 17000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,10,DUNGEON_HEART,0,3,100)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,11,DUNGEON_HEART,0,3,100)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 20000)
    IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,-1,1)
        IF(PLAYER_GOOD,AVATAR == 0)
            WIN_GAME
        ENDIF
    ENDIF
ENDIF
