REM ********************************************
REM STEVE First
REM Script for Level 203
REM Steve Tupper
REM ********************************************


REM ************* SETUP ****************

REM *** Entrance speed ***
SET_GENERATE_SPEED(400)

REM *** Set up 4 computer oponents - 3 and hero ***
COMPUTER_PLAYER(PLAYER1,3)
COMPUTER_PLAYER(PLAYER2,4)
COMPUTER_PLAYER(PLAYER3,5)

REM *** Max creatures ***
MAX_CREATURES(PLAYER0,15)
MAX_CREATURES(PLAYER1,20)
MAX_CREATURES(PLAYER2,20)
MAX_CREATURES(PLAYER3,20)

REM *** Money ***
START_MONEY(PLAYER0,100000)
START_MONEY(PLAYER1,10000)
START_MONEY(PLAYER2,10000)
START_MONEY(PLAYER3,10000)

REM *** Set creatures ***
ADD_CREATURE_TO_POOL(BUG,30)
ADD_CREATURE_TO_POOL(FLY,20)
ADD_CREATURE_TO_POOL(SPIDER,30)
ADD_CREATURE_TO_POOL(TROLL,30)
ADD_CREATURE_TO_POOL(DRAGON,20)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,30)
ADD_CREATURE_TO_POOL(BILE_DEMON,30)

CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
REM *** Following need to be available from sacrifice, torture and imprisonment but not from pool ***
CREATURE_AVAILABLE(ALL_PLAYERS,HORNY,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,VAMPIRE,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,SKELETON,1,0)
CREATURE_AVAILABLE(ALL_PLAYERS,GHOST,1,0)

REM *** Set rooms ***
ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)

REM *** Set Doors and traps ***
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)

REM *** Set Magic ***
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_IMP,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SIGHT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(PLAYER0,POWER_ARMAGEDDON,1,0)

REM *** Set up flags ***
SET_FLAG(PLAYER0,FLAG0,0)

REM ********** MAIN ************

REM *** If conditions ***

REM *** Opening Storyline - can't make text too long so split in two ***
IF(PLAYER0,GAME_TURN < 50)
QUICK_INFORMATION(1,"After the defeat of the Avatar you decided to build yourself a little retirement dungeon, with the heroic scum's body reanimated as a butler. You did a good job, well re-enforced, plenty of gold and easily defendable. What you didn't count on however is your new neighbours.")
ENDIF
IF(PLAYER0,GAME_TURN > 100)
QUICK_INFORMATION(2,"These pityful worms have ruined your little holiday home and so must pay with their lives! Only thing is, they've blocked the only exit and hidden the destroy walls spell that you need to break thier barrier. You have a trick up your sleeve though master - the most powerful spell in the realm - research it and teach these scum the meaning of pain.")
ENDIF


REM *** If action point triggered drop in heros
IF_ACTION_POINT(1,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,1,2,10,10000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,1,2,10,10000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,1,2,10,10000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,1,2,10,10000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,1,2,10,10000)
    QUICK_INFORMATION(3,"Ye Gods! A party of powerful magic users have used their combined power to save themselves from your summoning - see to it they don't survive any longer!")
ENDIF

IF_ACTION_POINT(2,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,2,2,10,10000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,2,2,10,10000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,2,2,10,90000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,2,2,10,10000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,THIEF,2,2,10,10000)
    QUICK_INFORMATION(4,"AARRGGGHH! Warriors from above have obviously heard of the fate of their kin below and seek vengience, kill them, kill them allll....")
ENDIF

REM *** If action point triggered display message ***
IF_ACTION_POINT(3,PLAYER0)
QUICK_INFORMATION(5,"You have found one of the three ingredients you need to destroy these scum - use with great care Master, this bonus could be dangerous if used at the wrong time. Go forth and multiply sire")
ENDIF

IF_ACTION_POINT(4,PLAYER0)
QUICK_INFORMATION(6,"You have found one of the three ingredients you need to destroy your neighbours. This temple will allow you to build the strongest army before summoning your opponents. A word of warning master, do not ask of the gods too quickly or you could have a riot on your evil hands.")
ENDIF

REM *** If armageddon is researched display message ***
IF_AVAILABLE(PLAYER0,POWER_ARMAGEDDON == 1)
    QUICK_INFORMATION(7,"Finally you have the last of the three components that you need to defeat your enemies, crush them with your Darkness")
ENDIF

REM *** If any enemy player sets foot near dungeon heart give player destroy walls spell ***
IF(PLAYER0,FLAG0 == 0)
    IF_ACTION_POINT(5,PLAYER1)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
    REM *** Having problems with action pt 5 so have a second one as a backup ****
    IF_ACTION_POINT(6,PLAYER1)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
    IF_ACTION_POINT(5,PLAYER2)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
    IF_ACTION_POINT(6,PLAYER2)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
    IF_ACTION_POINT(5,PLAYER3)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
    IF_ACTION_POINT(6,PLAYER3)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
    IF_ACTION_POINT(5,PLAYER_GOOD)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
    IF_ACTION_POINT(6,PLAYER_GOOD)
        SET_FLAG(PLAYER0,FLAG0,1)
    ENDIF
ENDIF

REM *** still having probs so try this - think it might be the magic available command but try this anyway ***
IF(PLAYER_GOOD,TOTAL_CREATURES < 20)
    SET_FLAG(PLAYER0,FLAG0,1)
ENDIF

IF(PLAYER0,FLAG0 == 1)
    MAGIC_AVAILABLE(PLAYER0,POWER_DESTROY_WALLS,1,1)
ENDIF

REM *** Win / Lose conditions
IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
    
    WIN_GAME
    
ENDIF
