REM ********************************************
REM
REM Script for Level 211
REM
REM ********************************************

REM Briefing

REM ********************************************
REM The war against these children's party magicians continues, and the next
REM target is Hopemirth. Again.
REM Well, not Hopemirth exactly, but the frozen desert east of the once cheery
REM locale known as the Hopemirth Wastelands.
REM Some heroes have a 'stronghold' there, where they materialise out of
REM their Gates, sit down at a large table, sip tea and worry about you
REM killing them all in their beds. Do so.
REM These heroes do not have any knowledge of the experiment and the demon
REM luring that you've encounted previously, which means that the new-fangled
REM Scavenger Room will be nearly useless here, but we're forewarding the plans
REM to other Keepers as you read.

SET_GENERATE_SPEED(600)

MAX_CREATURES(ALL_PLAYERS,110)

START_MONEY(ALL_PLAYERS,20000)

ADD_CREATURE_TO_POOL(BILE_DEMON,10)
ADD_CREATURE_TO_POOL(DRAGON,15)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
ADD_CREATURE_TO_POOL(TROLL,20)
ADD_CREATURE_TO_POOL(BUG,5)
ADD_CREATURE_TO_POOL(TENTACLE,5)
ADD_CREATURE_TO_POOL(ORC,15)
ADD_CREATURE_TO_POOL(SPIDER,15)
ADD_CREATURE_TO_POOL(SORCEROR,15)

CREATURE_AVAILABLE(ALL_PLAYERS,TENTACLE,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,1)

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

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DESTROY_WALLS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)

DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LAVA,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,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(GOODIE1)
    ADD_TO_PARTY(GOODIE1,GIANT,8,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE1,BARBARIAN,5,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE1,MONK,3,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE1,BARBARIAN,5,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE1,FAIRY,5,400,ATTACK_ENEMIES,0)

CREATE_PARTY(GOODIE2)
    ADD_TO_PARTY(GOODIE2,WITCH,10,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE2,DWARFA,7,2000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE2,GIANT,3,3000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE2,DWARFA,5,100,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE2,DWARFA,5,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE2,WIZARD,10,400,ATTACK_ENEMIES,0)

CREATE_PARTY(GOODIE3)
    ADD_TO_PARTY(GOODIE3,WIZARD,9,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE3,SAMURAI,6,20,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE3,SAMURAI,5,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE3,DWARFA,5,9000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE3,BARBARIAN,7,10,ATTACK_ENEMIES,0)

CREATE_PARTY(GOODIE4)
    ADD_TO_PARTY(GOODIE4,DWARFA,9,1,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE4,DWARFA,10,50,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE4,DWARFA,8,400,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE4,DWARFA,2,20,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE4,GIANT,10,18,ATTACK_ENEMIES,0)

CREATE_PARTY(LAVAMAN)
    ADD_TO_PARTY(LAVAMAN,ARCHER,9,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(LAVAMAN,ARCHER,10,220,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(LAVAMAN,ARCHER,5,500,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(LAVAMAN,ARCHER,5,9000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(LAVAMAN,ARCHER,3,1000,ATTACK_ENEMIES,0)

CREATE_PARTY(GOODIE5)
    ADD_TO_PARTY(GOODIE5,MONK,2,100,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE5,BARBARIAN,8,220,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE5,WITCH,10,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE5,BARBARIAN,5,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE5,DWARFA,7,1000,ATTACK_ENEMIES,0)

CREATE_PARTY(GOODIE6)
    ADD_TO_PARTY(GOODIE6,SAMURAI,10,100,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE6,DWARFA,10,220,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE6,THIEF,10,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE6,ARCHER,10,200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(GOODIE6,ARCHER,10,1000,ATTACK_ENEMIES,0)

SET_TIMER(PLAYER0,TIMER0)

DISPLAY_OBJECTIVE(53,ALL_PLAYERS)

IF(PLAYER0,GAME_TURN > 800)
    DISPLAY_INFORMATION(54)
ENDIF

IF(PLAYER0,TIMER0 >= 5000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,GOODIE1,-1,DUNGEON,0,10,1000)
ENDIF

IF_AVAILABLE(PLAYER0,SCAVENGER >= 1)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,GOODIE2,-2,DUNGEON,0,10,1000)
ENDIF

IF_AVAILABLE(PLAYER0,PRISON >= 1)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,GOODIE6,-5,DUNGEON,0,10,1000)
ENDIF

IF(PLAYER0,TOTAL_GOLD_MINED > 25000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,GOODIE3,-7,DUNGEON,0,10,1000)
ENDIF

IF(PLAYER0,TOTAL_GOLD_MINED > 30000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,1,7,10,2000)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,LAVAMAN,-5,1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-4,2,3,500)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,GOODIE5,-2,DUNGEON,0,1,1000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,-3,1,5,1000)
ENDIF

IF_ACTION_POINT(2,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,-1,5,5,300)
ENDIF


IF(PLAYER_GOOD,TOTAL_CREATURES == 1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,-9,10,10,1000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-2,10,10,1000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,-9,10,10,1000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,-9,10,10,2000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,-9,10,10,3000)
ENDIF


IF(PLAYER_GOOD,TOTAL_CREATURES == 0)
    WIN_GAME
ENDIF

IF(PLAYER0,DUNGEON_DESTROYED == 1)
    LOSE_GAME
    
ENDIF
