REM Level Name : Vassago 1.29.0
REM	Author: Duke Ragereaver, Created on 21 Aug 2012
REM	converted to use pot file by dayokay dec2020

COMPUTER_PLAYER(PLAYER1,1)
COMPUTER_PLAYER(PLAYER2,1)
COMPUTER_PLAYER(PLAYER3,0)

ALLY_PLAYERS(PLAYER0,PLAYER1)
ALLY_PLAYERS(PLAYER2,PLAYER3)
ALLY_PLAYERS(PLAYER_GOOD,PLAYER2)
ALLY_PLAYERS(PLAYER_GOOD,PLAYER3)

REM	"This realm sees you and the Heroes as unlikely allies against a trio of rival Keepers. Dispose of them all, and I do mean ALL!"
DISPLAY_OBJECTIVE(18,PLAYER0)

START_MONEY(PLAYER0,12500)
START_MONEY(PLAYER1,75000)
START_MONEY(PLAYER2,250000)
START_MONEY(PLAYER3,250000)

SET_GENERATE_SPEED(700)
ADD_CREATURE_TO_POOL(TROLL,20)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,30)
ADD_CREATURE_TO_POOL(SKELETON,25)
ADD_CREATURE_TO_POOL(BILE_DEMON,12)
ADD_CREATURE_TO_POOL(SORCEROR,20)
ADD_CREATURE_TO_POOL(ORC,30)
ADD_CREATURE_TO_POOL(DRAGON,7)
ADD_CREATURE_TO_POOL(SPIDER,10)
ADD_CREATURE_TO_POOL(TENTACLE,20)
ADD_CREATURE_TO_POOL(VAMPIRE,3)
ADD_CREATURE_TO_POOL(GHOST,15)
ADD_CREATURE_TO_POOL(HELL_HOUND,15)

ADD_CREATURE_TO_POOL(WIZARD,2)
ADD_CREATURE_TO_POOL(BARBARIAN,3)
ADD_CREATURE_TO_POOL(ARCHER,4)
ADD_CREATURE_TO_POOL(MONK,3)
ADD_CREATURE_TO_POOL(KNIGHT,2)
ADD_CREATURE_TO_POOL(AVATAR,1)
ADD_CREATURE_TO_POOL(WITCH,3)
ADD_CREATURE_TO_POOL(GIANT,2)
ADD_CREATURE_TO_POOL(FAIRY,3)
ADD_CREATURE_TO_POOL(THIEF,4)
ADD_CREATURE_TO_POOL(DWARFA,4)
ADD_CREATURE_TO_POOL(SAMURAI,2)

MAX_CREATURES(PLAYER0,23)
MAX_CREATURES(PLAYER1,19)
MAX_CREATURES(PLAYER2,24)
MAX_CREATURES(PLAYER3,32)

CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER0,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER0,ORC,1,1)
CREATURE_AVAILABLE(PLAYER0,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER0,TENTACLE,1,1)

CREATURE_AVAILABLE(PLAYER1,AVATAR,1,1)
CREATURE_AVAILABLE(PLAYER1,WIZARD,1,1)
CREATURE_AVAILABLE(PLAYER1,BARBARIAN,1,1)
CREATURE_AVAILABLE(PLAYER1,GIANT,1,1)
CREATURE_AVAILABLE(PLAYER1,KNIGHT,1,1)
CREATURE_AVAILABLE(PLAYER1,THIEF,1,1)
CREATURE_AVAILABLE(PLAYER1,DWARFA,1,1)
CREATURE_AVAILABLE(PLAYER1,SAMURAI,1,1)
CREATURE_AVAILABLE(PLAYER1,FAIRY,1,1)
CREATURE_AVAILABLE(PLAYER1,ARCHER,1,1)
CREATURE_AVAILABLE(PLAYER1,MONK,1,1)
CREATURE_AVAILABLE(PLAYER1,WITCH,1,1)

CREATURE_AVAILABLE(PLAYER2,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER2,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER2,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER2,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER2,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER2,TENTACLE,1,1)
CREATURE_AVAILABLE(PLAYER2,SPIDER,1,1)
CREATURE_AVAILABLE(PLAYER2,DARK_MISTRESS,1,1)

CREATURE_AVAILABLE(PLAYER3,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER3,VAMPIRE,1,1)
CREATURE_AVAILABLE(PLAYER3,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER3,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER3,TENTACLE,1,1)
CREATURE_AVAILABLE(PLAYER3,SPIDER,1,1)
CREATURE_AVAILABLE(PLAYER3,GHOST,1,1)
CREATURE_AVAILABLE(PLAYER3,DARK_MISTRESS,1,1)

ROOM_AVAILABLE(PLAYER0,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER1,TRAINING,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER0,BARRACKS,1,0)
ROOM_AVAILABLE(PLAYER0,GRAVEYARD,1,0)
ROOM_AVAILABLE(PLAYER2,GRAVEYARD,1,0)
ROOM_AVAILABLE(PLAYER3,GRAVEYARD,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,SCAVENGER,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(PLAYER1,BRIDGE,1,0)
ROOM_AVAILABLE(PLAYER2,BRIDGE,1,0)
ROOM_AVAILABLE(PLAYER3,BRIDGE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)

SET_COMPUTER_PROCESS(PLAYER3,"BUILD A GRAVEYARD ROOM",0,5,6,11,0)

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(PLAYER1,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(PLAYER2,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(PLAYER3,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(PLAYER2,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(PLAYER2,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER2,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER3,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER3,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)

TRAP_AVAILABLE(PLAYER0,ALARM,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LAVA,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)

CREATE_PARTY(HOUNDS)
	ADD_TO_PARTY(HOUNDS,ORC,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(HOUNDS,ORC,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(HOUNDS,HELL_HOUND,3,200,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(HOUNDS,HELL_HOUND,3,200,ATTACK_ENEMIES,0)

CREATE_PARTY(MAGIC)
	ADD_TO_PARTY(MAGIC,DRAGON,3,250,STEAL_SPELLS,0)
	ADD_TO_PARTY(MAGIC,SORCEROR,5,250,STEAL_SPELLS,0)
	ADD_TO_PARTY(MAGIC,SORCEROR,4,250,DEFEND_PARTY,0)
	ADD_TO_PARTY(MAGIC,DEMONSPAWN,5,250,ATTACK_ENEMIES,0)

CREATE_PARTY(UNDEAD)
	ADD_TO_PARTY(UNDEAD,GHOST,6,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(UNDEAD,GHOST,8,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(UNDEAD,VAMPIRE,6,1000,STEAL_SPELLS,0)
	ADD_TO_PARTY(UNDEAD,SKELETON,5,350,DEFEND_PARTY,0)

CREATE_PARTY(NECROMANCERS)
	ADD_TO_PARTY(NECROMANCERS,SORCEROR,5,250,STEAL_SPELLS,0)
	ADD_TO_PARTY(NECROMANCERS,SORCEROR,4,250,DEFEND_PARTY,0)
	ADD_TO_PARTY(NECROMANCERS,SKELETON,5,350,DEFEND_PARTY,0)
	ADD_TO_PARTY(NECROMANCERS,SKELETON,3,350,DEFEND_PARTY,0)

CREATE_PARTY(ASSAULT_ONE)
	ADD_TO_PARTY(ASSAULT_ONE,BUG,3,150,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ASSAULT_ONE,SPIDER,3,150,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ASSAULT_ONE,BUG,3,150,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ASSAULT_ONE,SPIDER,4,150,DEFEND_PARTY,0)

CREATE_PARTY(ASSAULT_TWO)
	ADD_TO_PARTY(ASSAULT_TWO,DEMONSPAWN,5,250,STEAL_SPELLS,0)
	ADD_TO_PARTY(ASSAULT_TWO,DEMONSPAWN,4,450,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ASSAULT_TWO,HELL_HOUND,4,550,DEFEND_PARTY,0)
	ADD_TO_PARTY(ASSAULT_TWO,HELL_HOUND,3,550,DEFEND_PARTY,0)

CREATE_PARTY(ASSAULT_THREE)
	ADD_TO_PARTY(ASSAULT_THREE,TROLL,4,350,DEFEND_PARTY,0)
	ADD_TO_PARTY(ASSAULT_THREE,ORC,6,550,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ASSAULT_THREE,TROLL,4,350,DEFEND_PARTY,0)
	ADD_TO_PARTY(ASSAULT_THREE,TROLL,4,350,STEAL_SPELLS,0)
	ADD_TO_PARTY(ASSAULT_THREE,ORC,5,550,ATTACK_ENEMIES,0)

CREATE_PARTY(ASSAULT_FOUR)
	ADD_TO_PARTY(ASSAULT_FOUR,TENTACLE,5,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ASSAULT_FOUR,TENTACLE,6,500,STEAL_SPELLS,0)
	ADD_TO_PARTY(ASSAULT_FOUR,TENTACLE,5,450,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ASSAULT_FOUR,SORCEROR,6,600,STEAL_SPELLS,0)

CREATE_PARTY(ASSAULT_FIVE)
	ADD_TO_PARTY(ASSAULT_FIVE,BILE_DEMON,4,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ASSAULT_FIVE,DRAGON,7,500,STEAL_SPELLS,0)
	ADD_TO_PARTY(ASSAULT_FIVE,GHOST,8,400,STEAL_SPELLS,0)
	ADD_TO_PARTY(ASSAULT_FIVE,ORC,6,400,DEFEND_PARTY,0)
	ADD_TO_PARTY(ASSAULT_FIVE,SORCEROR,5,500,STEAL_SPELLS,0)

CREATE_PARTY(ELITE)
	ADD_TO_PARTY(ELITE,DARK_MISTRESS,8,750,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ELITE,SORCEROR,9,1250,STEAL_SPELLS,0)
	ADD_TO_PARTY(ELITE,VAMPIRE,8,2000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(ELITE,DRAGON,7,1000,DEFEND_PARTY,0)
	ADD_TO_PARTY(ELITE,BILE_DEMON,6,500,DEFEND_PARTY,0)

CREATE_PARTY(MASTER)
	ADD_TO_PARTY(MASTER,HORNY,9,2500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(MASTER,DRAGON,8,1500,STEAL_SPELLS,0)
	ADD_TO_PARTY(MASTER,HELL_HOUND,7,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(MASTER,ORC,8,800,DEFEND_PARTY,0)
	ADD_TO_PARTY(MASTER,TENTACLE,9,900,DEFEND_PARTY,0)

IF(PLAYER0,BRIDGE >= 1)
	ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)
	TUTORIAL_FLASH_BUTTON(18,PLAYER0)
ENDIF

SET_TIMER(PLAYER_GOOD,TIMER0)

IF(PLAYER_GOOD,TIMER0 >= 11850)
	SET_FLAG(PLAYER_GOOD,FLAG0,1)
ENDIF

IF(PLAYER_GOOD,FLAG0 == 1)
	SET_TIMER(PLAYER_GOOD,TIMER1)
	SET_FLAG(PLAYER_GOOD,FLAG1,1)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 18300)
	IF(PLAYER_GOOD,FLAG1 == 1)
		ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,IMP,5,1,1,0)
	ENDIF
ENDIF

IF(PLAYER_GOOD,TIMER1 >= 17650)
	IF(PLAYER_GOOD,FLAG1 == 1)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ASSAULT_ONE,5,1)
	ENDIF
ENDIF

IF(PLAYER_GOOD,TIMER1 >= 29950)
	IF(PLAYER_GOOD,FLAG1 == 1)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ASSAULT_TWO,5,1)
	ENDIF
ENDIF

IF(PLAYER_GOOD,TIMER1 >= 38850)
	IF(PLAYER_GOOD,FLAG1 == 1)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ASSAULT_THREE,5,1)
	ENDIF
ENDIF

IF(PLAYER_GOOD,TIMER1 >= 46000)
	IF(PLAYER_GOOD,FLAG1 == 1)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ASSAULT_FOUR,5,1)
	ENDIF
ENDIF

IF(PLAYER_GOOD,TIMER1 >= 59550)
	IF(PLAYER_GOOD,FLAG1 == 1)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ASSAULT_FIVE,5,1)
		SET_TIMER(PLAYER_GOOD,TIMER1)
	ENDIF
ENDIF

IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
	SET_FLAG(PLAYER_GOOD,FLAG1,0)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,HOUNDS,2,2)
	DISPLAY_INFORMATION(23)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,MAGIC,4,1)
	SET_TIMER(PLAYER_GOOD,TIMER2)
ENDIF

IF(PLAYER_GOOD,TIMER2 >= 3075)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,UNDEAD,4,1)
ENDIF

IF(PLAYER_GOOD,TIMER2 >= 7375)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,NECROMANCERS,4,1)
ENDIF

IF_ACTION_POINT(6,PLAYER0)
	SET_TIMER(PLAYER_GOOD,TIMER3)
	DISPLAY_OBJECTIVE(19,6)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 450)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ELITE,-1,1)
	DISPLAY_OBJECTIVE(20,-1)
ENDIF

IF(PLAYER_GOOD,TIMER3 >= 1100)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,MASTER,-2,1)
	DISPLAY_OBJECTIVE(21,-2)
ENDIF

IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
	IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
		DISPLAY_OBJECTIVE(22,PLAYER0)
		WIN_GAME
	ENDIF
ENDIF
