REM Play Level Tower of Power

REM ******* Basic settings *******

SET_GENERATE_SPEED(1000)

MAX_CREATURES(PLAYER0,20)

START_MONEY(PLAYER0,50000)
START_MONEY(PLAYER1,9000000)
START_MONEY(PLAYER2,9000000)

ALLY_PLAYERS(PLAYER1,PLAYER_GOOD)
ALLY_PLAYERS(PLAYER2,PLAYER_GOOD)
ALLY_PLAYERS(PLAYER1,PLAYER2)

ADD_CREATURE_TO_POOL(BUG,10)

REM ********** Available creatures **********

CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,1)

REM ********** Available spells **********

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)

REM ********** settings **********

SET_CREATURE_MAX_LEVEL(ALL_PLAYERS,THIEF,10)

CREATE_PARTY(A)
    ADD_TO_PARTY(A,FAIRY,3,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(A,ARCHER,5,0,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(A,BARBARIAN,4,0,ATTACK_ENEMIES,0)


DISPLAY_OBJECTIVE(12,PLAYER0)

IF(PLAYER0,DUNGEON_DESTROYED == 1)
    LOSE_GAME
ENDIF

IF(PLAYER0,TOTAL_CREATURES == 0)
    LOSE_GAME
ENDIF

IF_ACTION_POINT(3,PLAYER0)
    WIN_GAME
ENDIF

SET_TIMER(PLAYER0,TIMER2)
SET_TIMER(PLAYER0,TIMER1)

IF(PLAYER0,TIMER2 >= 1000)
    SET_TIMER(PLAYER0,TIMER0)
ENDIF

IF(PLAYER0,TIMER2 >= 25000)
    SET_TIMER(PLAYER0,TIMER3)
ENDIF

IF(PLAYER0,TIMER0 >= 200)
    IF(PLAYER_GOOD,FAIRY < 5)
        NEXT_COMMAND_REUSABLE
        ADD_PARTY_TO_LEVEL(PLAYER_GOOD,A,4,1)
        NEXT_COMMAND_REUSABLE
        SET_TIMER(PLAYER0,TIMER0)
    ENDIF
ENDIF

IF(PLAYER0,TIMER1 >= 5000)
    IF(PLAYER_GOOD,ARCHER < 50)
        NEXT_COMMAND_REUSABLE
        ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,5,1,8,0)
        NEXT_COMMAND_REUSABLE
        SET_TIMER(PLAYER0,TIMER0)
    ENDIF
ENDIF

IF(PLAYER0,TIMER3 >= 500)
    NEXT_COMMAND_REUSABLE
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,4,1,10,0)
    NEXT_COMMAND_REUSABLE
    SET_TIMER(PLAYER0,TIMER3)
ENDIF

IF_ACTION_POINT(1,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,2,4,9,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,2,3,10,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,6,1,8,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,6,1,9,0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,6,1,10,0)
ENDIF
