REM Play Level Hivespawn

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

SET_GENERATE_SPEED(300)

MAX_CREATURES(PLAYER0,32)

START_MONEY(PLAYER0,25000)

ADD_CREATURE_TO_POOL(FLY,15)
ADD_CREATURE_TO_POOL(BUG,20)
ADD_CREATURE_TO_POOL(SPIDER,15)
ADD_CREATURE_TO_POOL(DEMONSPAWN,8)
ADD_CREATURE_TO_POOL(SORCEROR,15)
ADD_CREATURE_TO_POOL(BILE_DEMON,8)
ADD_CREATURE_TO_POOL(DRAGON,20)
ADD_CREATURE_TO_POOL(HELL_HOUND,20)

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,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,TRAINING,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,SCAVENGER,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,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)

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

REM This is default lose condition - we don't need to add it.
REM IF loops are limited and shouldn't be wasted.
REM IF(PLAYER0,DUNGEON_DESTROYED == 1)
REM     LOSE_GAME
REM ENDIF

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

CREATE_PARTY(ONE)
    ADD_TO_PARTY(ONE,BUG,5,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,BUG,5,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,BUG,5,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,BUG,5,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,SPIDER,6,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,SPIDER,6,0,ATTACK_ENEMIES,0)

CREATE_PARTY(TWO)
    ADD_TO_PARTY(TWO,DRAGON,3,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,DRAGON,3,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,DRAGON,3,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,HELL_HOUND,4,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,HELL_HOUND,4,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,HELL_HOUND,4,0,ATTACK_ENEMIES,0)

CREATE_PARTY(THREE)
    ADD_TO_PARTY(THREE,FLY,10,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,FLY,10,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,FLY,10,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,FLY,10,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,FLY,10,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,BUG,10,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,BUG,10,0,ATTACK_ENEMIES,0)

CREATE_PARTY(FOUR)
    ADD_TO_PARTY(FOUR,DEMONSPAWN,6,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,DEMONSPAWN,6,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,DEMONSPAWN,6,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,DRAGON,7,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,DRAGON,6,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,SPIDER,5,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,HELL_HOUND,6,0,ATTACK_ENEMIES,0)

CREATE_PARTY(FIVE)
    ADD_TO_PARTY(FIVE,BUG,9,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,BUG,9,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,DRAGON,3,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,DRAGON,3,0,ATTACK_ENEMIES,0)

CREATE_PARTY(SIX)
    ADD_TO_PARTY(SIX,SPIDER,9,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SIX,DRAGON,3,0,ATTACK_ENEMIES,0)

CREATE_PARTY(SEVEN)
    ADD_TO_PARTY(SEVEN,DEMONSPAWN,9,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SEVEN,DEMONSPAWN,9,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SEVEN,SPIDER,10,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SEVEN,SPIDER,10,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SEVEN,BILE_DEMON,7,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SEVEN,BILE_DEMON,7,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SEVEN,BILE_DEMON,8,0,ATTACK_ENEMIES,0)

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

DISPLAY_OBJECTIVE(10,PLAYER0)

IF_ACTION_POINT(4,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER1,DRAGON,5,4,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER2,DRAGON,5,4,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER1,BUG,5,2,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER2,BUG,5,1,1,0)
    ADD_CREATURE_TO_LEVEL(PLAYER1,FLY,3,3,3,0)
    SET_TIMER(PLAYER0,TIMER0)
ENDIF

IF(PLAYER0,TIMER0>=5000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,1,5,5,0)
ENDIF

IF(PLAYER0,TIMER0>=7500)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,3,1)
ENDIF

IF(PLAYER0,TIMER0>=10000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,2,6,5,0)
ENDIF

IF(PLAYER0,TIMER0>=12500)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DRAGON,3,3,3,0)
ENDIF

IF(PLAYER0,TIMER0>=15000)
	ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HELL_HOUND,1,2,7,0)
ENDIF

IF(PLAYER0,TIMER0 >= 17500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DEMONSPAWN,2,5,3,0)
ENDIF

IF(PLAYER0,TIMER0 >= 20000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,1,5,7,0)
ENDIF

IF(PLAYER0,TIMER0 >= 22500)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,3,1)
ENDIF

IF(PLAYER0,TIMER0 >= 25000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,2,6,10,0)
ENDIF

IF(PLAYER0,TIMER0 >= 27500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DRAGON,1,4,6,0)
ENDIF

IF(PLAYER0,TIMER0 >= 30000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HELL_HOUND,3,3,8,0)
ENDIF

IF(PLAYER0,TIMER0 >= 32500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,2,4,10,0)
ENDIF

IF(PLAYER0,TIMER0 >= 35000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,3,4,10,0)
ENDIF

IF(PLAYER0,TIMER0 >= 37500)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,1,2)
ENDIF

IF(PLAYER0,TOTAL_CREATURES >= 26)
    SET_TIMER(PLAYER0,TIMER1)
ENDIF

IF(PLAYER0,TIMER1 >= 2000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,3,1)
ENDIF

IF(PLAYER0,TIMER1 >= 4000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,2,1)
ENDIF

IF(PLAYER0,TIMER1 >= 6000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,1,3)
ENDIF

IF(PLAYER0,TIMER1 >= 8000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,3,1)
ENDIF

IF(PLAYER0,TIMER1 >= 10000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,2,1)
ENDIF

IF(PLAYER0,TIMER1 >= 12000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,1,1)
ENDIF

IF(PLAYER0,TIMER1 >= 14000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,3,3)
ENDIF

IF(PLAYER0,TIMER1 >= 16000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,2,2)
ENDIF

IF(PLAYER0,TIMER1 >= 18000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,1,1)
ENDIF

IF(PLAYER0,TIMER1 >= 20000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,3,4)
ENDIF

IF(PLAYER_GOOD,BATTLES_LOST >= 50)
    SET_TIMER(PLAYER0,TIMER2)
ENDIF

IF(PLAYER0,TIMER2 >= 1750)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,3,3,10,0)
ENDIF

IF(PLAYER0,TIMER2 >= 3500)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,2,1)
ENDIF

IF(PLAYER0,TIMER2 >= 4250)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,1,1)
ENDIF

IF(PLAYER0,TIMER2 >= 7000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,1,4)
ENDIF

IF(PLAYER0,TIMER2 >= 8750)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,2,3,7,0)
ENDIF

IF(PLAYER0,TIMER2 >= 10500)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,3,2)
ENDIF

IF(PLAYER0,TIMER2 >= 12250)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,1,1)
    IF(PLAYER0,TIMER0 >= 25000)
        SET_TIMER(PLAYER0,TIMER3)
    ENDIF
ENDIF

IF(PLAYER0,TIMER2 >= 14000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SPIDER,2,3,9,0)
ENDIF

IF(PLAYER0,TIMER3 >= 2000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,1,4)
ENDIF

IF(PLAYER0,TIMER3 >= 8000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SEVEN,3,2)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DRAGON,3,5,9,0)
    DISPLAY_OBJECTIVE(11,PLAYER0)
ENDIF

IF(PLAYER0,TIMER3 >= 8100)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,1,3,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DEMONSPAWN,2,3,10,0)
    IF(PLAYER_GOOD,BILE_DEMON == 0)
        WIN_GAME
    ENDIF
ENDIF

IF(PLAYER0,FLY >= 1)
    DISPLAY_INFORMATION(8,PLAYER0)
ENDIF

IF(PLAYER0,BUG >= 1)
    DISPLAY_INFORMATION(32,PLAYER0)
ENDIF

IF(PLAYER0,SPIDER >= 1)
    DISPLAY_INFORMATION(33,PLAYER0)
ENDIF

IF(PLAYER0,DRAGON >= 1)
    DISPLAY_INFORMATION(34,PLAYER0)
ENDIF

IF(PLAYER0,HELL_HOUND >= 1)
    DISPLAY_INFORMATION(35,PLAYER0)
ENDIF

IF(PLAYER0,DEMONSPAWN >= 1)
    DISPLAY_INFORMATION(36,PLAYER0)
ENDIF

IF(PLAYER0,SORCEROR >= 1)
    DISPLAY_INFORMATION(37,PLAYER0)
ENDIF

IF(PLAYER0,BILE_DEMON >= 1)
    DISPLAY_INFORMATION(38,PLAYER0)
ENDIF
