REM	Level Name Frostsorrow Glacier 1.67.0
REM	Author: Duke Ragereaver, Created on 08 Mar 2011
REM	v2.0 updated to use pot file by dayokay Dec2020

COMPUTER_PLAYER(PLAYER1,0)
ALLY_PLAYERS(PLAYER0,PLAYER2)
ALLY_PLAYERS(PLAYER1,PLAYER_GOOD)

START_MONEY(PLAYER0,50000)
START_MONEY(PLAYER1,150000)

SET_GENERATE_SPEED(600)
ADD_CREATURE_TO_POOL(HORNY,1)
ADD_CREATURE_TO_POOL(FLY,3)
ADD_CREATURE_TO_POOL(DRAGON,5)
ADD_CREATURE_TO_POOL(VAMPIRE,2)
ADD_CREATURE_TO_POOL(HELL_HOUND,10)
ADD_CREATURE_TO_POOL(TROLL,2)
ADD_CREATURE_TO_POOL(GIANT,3)
ADD_CREATURE_TO_POOL(BARBARIAN,3)
ADD_CREATURE_TO_POOL(MONK,4)
ADD_CREATURE_TO_POOL(ARCHER,6)
ADD_CREATURE_TO_POOL(DWARFA,6)
ADD_CREATURE_TO_POOL(FAIRY,3)
ADD_CREATURE_TO_POOL(THIEF,6)
ADD_CREATURE_TO_POOL(WITCH,3)
ADD_CREATURE_TO_POOL(GHOST,2)

MAX_CREATURES(PLAYER0,12)
MAX_CREATURES(PLAYER1,17)

CREATURE_AVAILABLE(PLAYER0,GIANT,1,1)
CREATURE_AVAILABLE(PLAYER0,BARBARIAN,1,1)
CREATURE_AVAILABLE(PLAYER0,MONK,1,1)
CREATURE_AVAILABLE(PLAYER0,ARCHER,1,1)
CREATURE_AVAILABLE(PLAYER0,DWARFA,1,1)
CREATURE_AVAILABLE(PLAYER0,FAIRY,1,1)
CREATURE_AVAILABLE(PLAYER0,THIEF,1,1)
CREATURE_AVAILABLE(PLAYER0,WITCH,1,1)

SET_CREATURE_MAX_LEVEL(PLAYER0,THIEF,10)

CREATURE_AVAILABLE(PLAYER1,HORNY,1,1)
CREATURE_AVAILABLE(PLAYER1,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER1,VAMPIRE,1,1)
CREATURE_AVAILABLE(PLAYER1,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER1,FLY,1,1)
CREATURE_AVAILABLE(PLAYER1,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER1,GHOST,1,1)

ROOM_AVAILABLE(PLAYER0,TREASURE,1,1)
ROOM_AVAILABLE(PLAYER0,LAIR,1,1)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER0,WORKSHOP,1,0)
ROOM_AVAILABLE(PLAYER0,BARRACKS,1,0)
ROOM_AVAILABLE(PLAYER1,SCAVENGER,1,1)
ROOM_AVAILABLE(PLAYER1,GRAVEYARD,1,0)

TRAP_AVAILABLE(PLAYER0,ALARM,1,0)
TRAP_AVAILABLE(PLAYER0,POISON_GAS,1,0)
TRAP_AVAILABLE(PLAYER0,WORD_OF_POWER,1,0)

DOOR_AVAILABLE(PLAYER0,WOOD,1,0)
DOOR_AVAILABLE(PLAYER0,BRACED,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)

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_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_CHICKEN,1,0)

CREATE_PARTY(LIGHT)
    ADD_TO_PARTY(LIGHT,THIEF,5,300,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(LIGHT,THIEF,5,200,STEAL_GOLD,0)
    ADD_TO_PARTY(LIGHT,THIEF,5,200,STEAL_GOLD,0)
    ADD_TO_PARTY(LIGHT,ARCHER,5,300,DEFEND_PARTY,0)
    ADD_TO_PARTY(LIGHT,DWARFA,5,400,ATTACK_ENEMIES,0)

CREATE_PARTY(BRUTES)
    ADD_TO_PARTY(BRUTES,DWARFA,5,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(BRUTES,GIANT,7,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(BRUTES,GIANT,6,400,DEFEND_PARTY,0)
    ADD_TO_PARTY(BRUTES,DWARFA,5,400,STEAL_GOLD,0)
    ADD_TO_PARTY(BRUTES,DWARFA,5,400,DEFEND_PARTY,0)
    ADD_TO_PARTY(BRUTES,BARBARIAN,6,450,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(BRUTES,BARBARIAN,6,450,DEFEND_PARTY,0)

CREATE_PARTY(MAGIC)
    ADD_TO_PARTY(MAGIC,SAMURAI,9,500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(MAGIC,WIZARD,8,750,STEAL_SPELLS,0)
    ADD_TO_PARTY(MAGIC,MONK,8,600,DEFEND_PARTY,0)
    ADD_TO_PARTY(MAGIC,WITCH,9,600,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(ELITE)
    ADD_TO_PARTY(ELITE,SAMURAI,9,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ELITE,WIZARD,8,1500,STEAL_SPELLS,0)
    ADD_TO_PARTY(ELITE,GIANT,6,1000,ATTACK_ROOMS,0)
    ADD_TO_PARTY(ELITE,BARBARIAN,8,1000,DEFEND_PARTY,0)

CREATE_PARTY(BOSS)
    ADD_TO_PARTY(BOSS,WIZARD,9,1500,STEAL_SPELLS,0)
    ADD_TO_PARTY(BOSS,KNIGHT,10,2500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(BOSS,BARBARIAN,8,1250,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(BOSS,WITCH,9,1500,STEAL_SPELLS,0)
    ADD_TO_PARTY(BOSS,ARCHER,8,1000,DEFEND_PARTY,0)
    ADD_TO_PARTY(BOSS,SAMURAI,9,1000,ATTACK_ENEMIES,0)

REM	QUICK_OBJECTIVE(0,"Noble one, the ruler of this realm, Lord Davaraux, has gone rogue at the expensive of the innocent citizens who are now overtaxed. Deal with this bandit king appriopately and do not let other matters distract you, he is your first and only priority.",PLAYER0)
DISPLAY_OBJECTIVE(36,PLAYER0)

IF(PLAYER0,GAME_TURN >= 1000)
REM	QUICK_OBJECTIVE(1,"Beware, we have detected the presence of a relentless Keeper bij the name of Eis who brings with him a massive demonic army who arrives within some days. Hold off Eis and deal with Lord Davaraux quickly, you cannot hold Eis out indefinately.",PLAYER0)
	DISPLAY_OBJECTIVE(37,PLAYER0)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,LIGHT,2,1)
ENDIF

IF_ACTION_POINT(7,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BRUTES,1,1)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,2,5,6,500)
ENDIF

IF_ACTION_POINT(5,PLAYER0)
    SET_TIMER(PLAYER0,TIMER0)
ENDIF

IF(PLAYER0,TIMER0 >= 1125)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,LIGHT,2,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BRUTES,1,1)
ENDIF

IF(PLAYER0,TIMER0 >= 1500)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,MAGIC,6,1)
ENDIF

IF_ACTION_POINT(8,PLAYER0)
    SET_TIMER(PLAYER0,TIMER1)
ENDIF

IF(PLAYER0,TIMER1 >= 1125)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,THIEF,2,6,8,1000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,6,4,8,1000)
ENDIF

IF(PLAYER0,TIMER1 >= 1500)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,MAGIC,10,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ELITE,9,1)
ENDIF

IF(PLAYER0,TIMER1 >= 1800)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BOSS,-1,1)
ENDIF

IF(PLAYER0,KNIGHT == 0)
    LOSE_GAME
	DISPLAY_OBJECTIVE(32,PLAYER0)
ENDIF

IF(PLAYER0,GAME_TURN >= 270000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HORNY,PLAYER1,8,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DRAGON,PLAYER1,10,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HELL_HOUND,PLAYER1,12,10,0)
    REM	QUICK_OBJECTIVE(3,"The forces of Eis have arrived, we are history!",PLAYER0)
	DISPLAY_OBJECTIVE(38,PLAYER0)
ENDIF

IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
    ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)
    MAX_CREATURES(PLAYER0,17)
    TUTORIAL_FLASH_BUTTON(18,PLAYER0)
    REM	QUICK_OBJECTIVE(4,"We have found construction plans for bridges, use it to defeat Eis.",PLAYER0)
	DISPLAY_OBJECTIVE(39,PLAYER0)
ENDIF


IF(PLAYER1,DUNGEON_DESTROYED == 1)
    IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
		DISPLAY_OBJECTIVE(35,PLAYER0)
        WIN_GAME
    ENDIF
ENDIF
