REM Play Level Molten dream Cold

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

SET_GENERATE_SPEED(400)

MAX_CREATURES(PLAYER0,18)

START_MONEY(PLAYER0,10000)

ADD_CREATURE_TO_POOL(FLY,6)
ADD_CREATURE_TO_POOL(BUG,2)
ADD_CREATURE_TO_POOL(DEMONSPAWN,12)
ADD_CREATURE_TO_POOL(SORCEROR,6)
ADD_CREATURE_TO_POOL(BILE_DEMON,2)
ADD_CREATURE_TO_POOL(TROLL,5)
ADD_CREATURE_TO_POOL(ORC,3)
ADD_CREATURE_TO_POOL(HELL_HOUND,8)

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,ORC,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)
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,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)

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

IF(PLAYER0,DUNGEON_DESTROYED == 1)
    LOSE_GAME
ENDIF

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

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

CREATE_PARTY(ONE)
    ADD_TO_PARTY(ONE,DWARFA,2,100,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,DWARFA,3,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,DWARFA,4,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,DWARFA,5,400,ATTACK_ENEMIES,0)

CREATE_PARTY(TWO)
    ADD_TO_PARTY(TWO,ARCHER,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,ARCHER,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,ARCHER,4,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,ARCHER,4,400,ATTACK_ENEMIES,0)

CREATE_PARTY(THREE)
    ADD_TO_PARTY(THREE,DWARFA,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,DWARFA,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,BARBARIAN,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,BARBARIAN,3,300,ATTACK_ENEMIES,0)

CREATE_PARTY(FOUR)
    ADD_TO_PARTY(FOUR,WIZARD,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,WIZARD,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,GIANT,3,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,GIANT,3,300,ATTACK_ENEMIES,0)

CREATE_PARTY(FIVE)
    ADD_TO_PARTY(FIVE,DWARFA,4,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,ARCHER,4,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,ARCHER,4,400,ATTACK_ENEMIES,0)

CREATE_PARTY(SIX)
    ADD_TO_PARTY(SIX,BARBARIAN,3,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SIX,BARBARIAN,3,200,ATTACK_ENEMIES,0)

REM ********** Triggers & End game **********
SET_FLAG(PLAYER_GOOD,FLAG0,0)
SET_TIMER(PLAYER0,TIMER2)
ADD_CREATURE_TO_LEVEL(PLAYER0,GHOST,1,1,1,0)
ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,AVATAR,2,1,3,5000)

IF(PLAYER0,TIMER2 >= 1)
    ADD_CREATURE_TO_LEVEL(PLAYER0,GHOST,1,1,1,0)
ENDIF

IF(PLAYER0,TOTAL_CREATURES >= 12)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,3,DUNGEON_HEART,0,2,100)
    SET_TIMER(PLAYER0,TIMER0)
    SET_TIMER(PLAYER0,TIMER1)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,4,ACTION_POINT,3,3,200)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,5,ACTION_POINT,4,4,300)
ENDIF

IF_ACTION_POINT(5,PLAYER0)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,6,ACTION_POINT,5,4,400)
ENDIF

IF_ACTION_POINT(6,PLAYER0)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,7,ACTION_POINT,6,4,500)
    SET_FLAG(PLAYER_GOOD,FLAG0,1)
ENDIF

IF_ACTION_POINT(8,PLAYER0)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,9,DUNGEON_HEART,0,4,400)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,9,DUNGEON_HEART,0,4,400)
    IF(PLAYER_GOOD,AVATAR == 0)
        WIN_GAME
    ENDIF
ENDIF

IF(PLAYER0,TIMER0 >= 3000)
    IF(PLAYER_GOOD,FLAG0 == 0)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,6,1,3,0)
        NEXT_COMMAND_REUSABLE
        SET_TIMER(PLAYER0,TIMER0)
    ENDIF
ENDIF

IF(PLAYER0,TIMER1 >= 12000)
    IF(PLAYER_GOOD,FLAG0 == 0)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,6,1,4,0)
        NEXT_COMMAND_REUSABLE
        SET_TIMER(PLAYER0,TIMER1)
    ENDIF
ENDIF
