REM ********************************************
REM
REM Script for Level 203
REM
REM ********************************************

SET_GENERATE_SPEED(700)
COMPUTER_PLAYER(PLAYER1,1)
COMPUTER_PLAYER(PLAYER2,0)
MAX_CREATURES(PLAYER0,15)
MAX_CREATURES(PLAYER1,15)
MAX_CREATURES(PLAYER1,30)

START_MONEY(PLAYER0,0)
START_MONEY(PLAYER1,10000)
START_MONEY(PLAYER2,10000)

ADD_CREATURE_TO_POOL(TROLL,15)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
ADD_CREATURE_TO_POOL(DRAGON,10)
ADD_CREATURE_TO_POOL(ORC,10)
ADD_CREATURE_TO_POOL(BILE_DEMON,10)
ADD_CREATURE_TO_POOL(DEMONSPAWN,5)
ADD_CREATURE_TO_POOL(BUG,5)
ADD_CREATURE_TO_POOL(SPIDER,5)
ADD_CREATURE_TO_POOL(VAMPIRE,3)

CREATURE_AVAILABLE(PLAYER0,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER0,SPIDER,1,1)
CREATURE_AVAILABLE(PLAYER0,DEMONSPAWN,1,1)
CREATURE_AVAILABLE(PLAYER0,BUG,1,1)
CREATURE_AVAILABLE(PLAYER0,ORC,1,1)

CREATURE_AVAILABLE(PLAYER1,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER1,TROLL,1,1)

CREATURE_AVAILABLE(PLAYER2,ORC,1,1)
CREATURE_AVAILABLE(PLAYER2,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER2,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER2,BILE_DEMON,1,1)

ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)

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_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_LIGHTNING,1,1)
MAGIC_AVAILABLE(PLAYER2,POWER_LIGHTNING,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(PLAYER2,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)

TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)

IF(PLAYER2,DUNGEON_DESTROYED == 1)
    WIN_GAME
ENDIF

CREATE_PARTY(BREAKER)
    ADD_TO_PARTY(BREAKER,SAMURAI,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(BREAKER,SAMURAI,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(BREAKER,FAIRY,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(BREAKER,FAIRY,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(BREAKER,WIZARD,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(BREAKER,WIZARD,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(BREAKER,AVATAR,10,4000,ATTACK_DUNGEON_HEART,0)

IF_ACTION_POINT(1,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,BREAKER,1,2)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HELL_HOUND,1,4,10,800)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,THIEF,1,4,10,400)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,1,2,10,800)
ENDIF

IF_ACTION_POINT(2,PLAYER0)
    ROOM_AVAILABLE(PLAYER0,BRIDGE,0,0)
ENDIF


CREATE_PARTY(MAGMATAISI)
    ADD_TO_PARTY(MAGMATAISI,HELL_HOUND,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(MAGMATAISI,HELL_HOUND,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(MAGMATAISI,HELL_HOUND,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(MAGMATAISI,DRAGON,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(MAGMATAISI,DRAGON,10,800,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(MAGMATAISI,DRAGON,10,800,ATTACK_DUNGEON_HEART,0)

IF_ACTION_POINT(3,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,MAGMATAISI,3,1)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,MAGMATAISI,4,1)
ENDIF

IF_ACTION_POINT(5,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,MAGMATAISI,5,1)
ENDIF

IF_ACTION_POINT(6,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,MAGMATAISI,6,1)
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,-2,5,7,800)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ORC,-3,5,7,800)
ENDIF

IF_ACTION_POINT(7,PLAYER0)
    ROOM_AVAILABLE(PLAYER0,BRIDGE,1,0)
ENDIF

IF(PLAYER0,TRAINING > 1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ORC,-1,4,3,400)
    SET_TIMER(PLAYER0,TIMER0)
ENDIF

IF(PLAYER0,RESEARCH > 1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SORCEROR,-1,4,5,600)
ENDIF

IF(PLAYER0,TIMER0 > 15000)
    IF(PLAYER1,DUNGEON_DESTROYED == 0)
        NEXT_COMMAND_REUSABLE
        SET_TIMER(PLAYER0,TIMER0)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BUG,-1,3,3,400)
        IF(PLAYER0,BATTLES_WON > 15)
            NEXT_COMMAND_REUSABLE
            ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SPIDER,-1,3,3,400)
            IF(PLAYER0,BATTLES_WON > 45)
                NEXT_COMMAND_REUSABLE
                ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FLY,-1,6,3,400)
                IF(PLAYER0,BATTLES_WON > 150)
                    NEXT_COMMAND_REUSABLE
                    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DRAGON,-1,6,8,1600)
                ENDIF
            ENDIF
        ENDIF
    ENDIF
ENDIF
