START_MONEY(ALL_PLAYERS,200)

ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,SCAVENGER,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,3,0)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,3,0)

TRAP_AVAILABLE(PLAYER1,WORD_OF_POWER,1,0)
TRAP_AVAILABLE(PLAYER1,BOULDER,1,0)
TRAP_AVAILABLE(PLAYER1,LIGHTNING,1,0)
TRAP_AVAILABLE(PLAYER1,POISON_GAS,1,0)

DOOR_AVAILABLE(PLAYER1,MAGIC,1,0)
DOOR_AVAILABLE(PLAYER1,STEEL,1,0)
DOOR_AVAILABLE(PLAYER1,BRACED,1,0)
DOOR_AVAILABLE(PLAYER1,WOOD,1,0)

CREATE_PARTY(ONE)
    ADD_TO_PARTY(ONE,THIEF,1,100,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,ARCHER,2,150,DEFEND_PARTY,0)
    ADD_TO_PARTY(ONE,DWARFA,1,50,STEAL_GOLD,0)
	ADD_TO_PARTY(ONE,DWARFA,1,50,STEAL_GOLD,0)

CREATE_PARTY(TWO)
    ADD_TO_PARTY(TWO,BARBARIAN,3,150,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,BARBARIAN,4,150,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(TWO,ARCHER,3,150,DEFEND_PARTY,0)
    ADD_TO_PARTY(TWO,ARCHER,4,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(TWO,ARCHER,2,150,DEFEND_PARTY,0)

CREATE_PARTY(THREE)
    ADD_TO_PARTY(THREE,MONK,5,150,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(THREE,MONK,7,150,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(THREE,MONK,6,150,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(THREE,MONK,4,150,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(THREE,MONK,5,150,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(FOUR)
    ADD_TO_PARTY(FOUR,BARBARIAN,4,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(FOUR,BARBARIAN,5,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(FOUR,BARBARIAN,4,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(FOUR,ARCHER,7,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(FOUR,ARCHER,5,150,DEFEND_PARTY,0)

CREATE_PARTY(FIVE)
    ADD_TO_PARTY(FIVE,BARBARIAN,7,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(FIVE,BARBARIAN,6,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(FIVE,BARBARIAN,7,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(FIVE,TIME_MAGE,8,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(FIVE,TIME_MAGE,6,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(FIVE,TIME_MAGE,5,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(FIVE,TIME_MAGE,7,150,DEFEND_PARTY,0)

CREATE_PARTY(SIX)
    ADD_TO_PARTY(SIX,MONK,7,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SIX,MONK,6,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SIX,MONK,7,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(SIX,MONK,8,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(SIX,MONK,6,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(SIX,MONK,5,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(SIX,MONK,7,150,DEFEND_PARTY,0)

CREATE_PARTY(SEVEN)
    ADD_TO_PARTY(SEVEN,BARBARIAN,7,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SEVEN,BARBARIAN,6,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SEVEN,BARBARIAN,7,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(SEVEN,ARCHER,7,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(SEVEN,ARCHER,8,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(SEVEN,ARCHER,6,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(SEVEN,ARCHER,7,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(SEVEN,ARCHER,7,150,DEFEND_PARTY,0)

CREATE_PARTY(EIGHT)
    ADD_TO_PARTY(EIGHT,BARBARIAN,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(EIGHT,BARBARIAN,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(EIGHT,BARBARIAN,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(EIGHT,ARCHER,10,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(EIGHT,ARCHER,10,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(EIGHT,THIEF,10,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(EIGHT,THIEF,10,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(EIGHT,THIEF,10,150,DEFEND_PARTY,0)
	
CREATE_PARTY(NINE)
    ADD_TO_PARTY(NINE,MONK,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(NINE,MONK,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(NINE,MONK,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(NINE,MONK,10,500,ATTACK_DUNGEON_HEART,0)
	ADD_TO_PARTY(NINE,TIME_MAGE,10,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(NINE,TIME_MAGE,10,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(NINE,TIME_MAGE,10,150,DEFEND_PARTY,0)
	ADD_TO_PARTY(NINE,TIME_MAGE,10,150,DEFEND_PARTY,0)

SET_TIMER(PLAYER0,TIMER0)

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

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

IF(PLAYER0,TIMER0 >= 36000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,4,1)
ENDIF

IF(PLAYER0,TIMER0 >= 48000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,2,1)
ENDIF

IF(PLAYER0,TIMER0 >= 60000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,4,1)
ENDIF

IF(PLAYER0,TIMER0 >= 70000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,4,1)
ENDIF

IF(PLAYER0,TIMER0 >= 100000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SEVEN,2,1)
ENDIF

IF(PLAYER0,TIMER0 >= 150000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,EIGHT,4,1)
ENDIF

IF(PLAYER0,TIMER0 >= 180000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,NINE,3,1)
ENDIF

IF(PLAYER0,TIMER0 >= 300000)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,7,APPROPIATE_DUNGEON,0,10,400)
	ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,7,APPROPIATE_DUNGEON,0,10,400)
	ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,7,APPROPIATE_DUNGEON,0,10,400)
ENDIF

IF(PLAYER0,TIMER0 >= 310000)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,5,APPROPIATE_DUNGEON,0,10,400)
	ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,5,APPROPIATE_DUNGEON,0,10,400)
	ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,5,APPROPIATE_DUNGEON,0,10,400)
ENDIF

IF(PLAYER0,TIMER0 >= 320000)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,6,APPROPIATE_DUNGEON,0,10,400)
	ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,6,APPROPIATE_DUNGEON,0,10,400)
	ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,6,APPROPIATE_DUNGEON,0,10,400)
ENDIF

IF(PLAYER0,TIMER0 >= 330000)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,1,APPROPIATE_DUNGEON,0,10,400)
	ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,1,APPROPIATE_DUNGEON,0,10,400)
	ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,1,APPROPIATE_DUNGEON,0,10,400)
ENDIF

IF(PLAYER0,GOOD_CREATURES > 4)
	NEXT_COMMAND_REUSABLE
	SET_GAME_RULE(TortureDeathChance, 25)
ENDIF

IF(PLAYER0,GOOD_CREATURES > 8)
	NEXT_COMMAND_REUSABLE
	SET_GAME_RULE(TortureDeathChance, 50)
ENDIF

IF(PLAYER0,GOOD_CREATURES > 12)
	NEXT_COMMAND_REUSABLE
	SET_GAME_RULE(TortureDeathChance, 75)
ENDIF

IF(PLAYER0,GOOD_CREATURES > 16)
	NEXT_COMMAND_REUSABLE
	SET_GAME_RULE(TortureDeathChance, 90)
ENDIF

IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
	WIN_GAME
ENDIF