REM ********************************************
REM Steve Tupper
REM Script for Level 220
REM Pirates
REM ********************************************


REM ************************************
REM ********** SETUP COMMANDS **********
REM ************************************


REM ********** Set up player information **********

REM *** Number of turns wait for new creature (max 12 turns per second depending on computer speed) ***
SET_GENERATE_SPEED(1440)

REM *** money sart with - duh ***
START_MONEY(PLAYER0,50000)

REM *** remember max of 255 in all dungeons on level at any time ***
MAX_CREATURES(PLAYER0,30)


REM ********** Set up rooms, traps, doors and magic **********

REM *** rooms available to players also ENTRANCE but don't need here ***
ROOM_AVAILABLE(PLAYER0,TREASURE,1,1)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER0,PRISON,1,0)
ROOM_AVAILABLE(PLAYER0,TORTURE,1,0)
ROOM_AVAILABLE(PLAYER0,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER0,WORKSHOP,1,0)
ROOM_AVAILABLE(PLAYER0,SCAVENGER,1,0)
ROOM_AVAILABLE(PLAYER0,TEMPLE,1,0)
ROOM_AVAILABLE(PLAYER0,GRAVEYARD,1,0)
ROOM_AVAILABLE(PLAYER0,BARRACKS,1,0)
ROOM_AVAILABLE(PLAYER0,BRIDGE,1,0)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER0,LAIR,1,1)
ROOM_AVAILABLE(PLAYER0,GUARD_POST,1,0)

REM *** spells available to players ***
MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,1)
MAGIC_AVAILABLE(PLAYER0,POWER_OBEY,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_SIGHT,0,0)
MAGIC_AVAILABLE(PLAYER0,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_DESTROY_WALLS,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_ARMAGEDDON,1,0)

REM *** doors available to players ***
DOOR_AVAILABLE(PLAYER0,WOOD,1,0)
DOOR_AVAILABLE(PLAYER0,BRACED,1,0)
DOOR_AVAILABLE(PLAYER0,STEEL,1,0)
DOOR_AVAILABLE(PLAYER0,MAGIC,1,0)

REM *** traps available to players ***
TRAP_AVAILABLE(PLAYER0,BOULDER,1,0)
TRAP_AVAILABLE(PLAYER0,ALARM,1,0)
TRAP_AVAILABLE(PLAYER0,POISON_GAS,1,0)
TRAP_AVAILABLE(PLAYER0,LIGHTNING,1,0)
TRAP_AVAILABLE(PLAYER0,WORD_OF_POWER,1,0)


REM ********** Set up creature information **********

REM *** remember to have enough to cover all players ***
ADD_CREATURE_TO_POOL(TROLL,2)
ADD_CREATURE_TO_POOL(HELL_HOUND,1)
ADD_CREATURE_TO_POOL(ORC,25)
ADD_CREATURE_TO_POOL(THIEF,5)
ADD_CREATURE_TO_POOL(SKELETON,25)

REM *** the 1 field must be in here ***
CREATURE_AVAILABLE(PLAYER0,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER0,ORC,1,1)
CREATURE_AVAILABLE(PLAYER0,THIEF,1,1)
CREATURE_AVAILABLE(PLAYER0,SKELETON,1,1)


REM ************************************************
REM ********** CONDITIONS & GAME COMMANDS **********
REM ************************************************

REM *** if PLAYER? creature sets foot near action pt ***
IF_ACTION_POINT(1,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,AVATAR,1,1,10,10000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,1,1,10,1000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,1,1,10,1000)
ENDIF

QUICK_OBJECTIVE(1,"Avast me hearties - its been a long voyage but a'last we've reached our destination. Get them land-lubbers ashore and set up camp yer black hearted, thieving cut throats aarrr jim lad ",PLAYER0)
IF(PLAYER0,GAME_TURN > 4000)
QUICK_OBJECTIVE(2,"Unknown to the pitiful inhabitants of the impenetrable city of Gagginthrobber, cut into the solid granite of the Jax Cliffs, is enough gold and gems for a keeper to live in luxury for all eternity o evil one. Now with the help of Cap'n Red Horn and his motley crew of pirates you have managed to find a possible back door to the city",PLAYER0)
ENDIF

IF(PLAYER0,GAME_TURN > 6000)
QUICK_OBJECTIVE(3,"Invade the city and steal their gold, spells, equipment and hell even the landlubbers themselves! Then, when you are done pilfering destroy their city's heart aaarrrrse ",PLAYER0)
ENDIF


IF(PLAYER0,GAME_TURN > 25000)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,2,DUNGEON_HEART,0,10,5000)
ENDIF


REM ************************************************
REM ********** WIN / LOSE GAME CONDITIONS **********
REM ************************************************

REM *** Win or lose condition ***
IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
    WIN_GAME
ENDIF
