REM ********************************************
REM  Ancient Keeper campaign for KeeperFX
REM  Script for Level 13
REM  Version 1.00
REM ********************************************

SET_GENERATE_SPEED(400)
SET_TIMER(PLAYER0,TIMER0)

MAX_CREATURES(PLAYER0,20)
ADD_CREATURE_TO_POOL(AVATAR,1)
CREATURE_AVAILABLE(PLAYER0,AVATAR,1,1)

DOOR_AVAILABLE(PLAYER0,STEEL,1,10)

DISPLAY_OBJECTIVE(67,PLAYER0)

CREATE_PARTY(SAMURAIS)
  ADD_TO_PARTY(SAMURAIS,SAMURAI,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(SAMURAIS,SAMURAI,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(SAMURAIS,SAMURAI,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(SAMURAIS,SAMURAI,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(SAMURAIS,SAMURAI,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(SAMURAIS,SAMURAI,10,0,ATTACK_ENEMIES,0)

CREATE_PARTY(WIZARDS)
  ADD_TO_PARTY(WIZARDS,WIZARD,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(WIZARDS,WIZARD,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(WIZARDS,WIZARD,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(WIZARDS,WIZARD,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(WIZARDS,WIZARD,10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(WIZARDS,WIZARD,10,0,ATTACK_ENEMIES,0)

CREATE_PARTY(KNIGHTS)
  ADD_TO_PARTY(KNIGHTS,KNIGHT),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(KNIGHTS,KNIGHT),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(KNIGHTS,KNIGHT),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(KNIGHTS,KNIGHT),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(KNIGHTS,KNIGHT),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(KNIGHTS,KNIGHT),10,0,ATTACK_ENEMIES,0)

CREATE_PARTY(HORNIES)
  ADD_TO_PARTY(HORNIES,HORNY),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(HORNIES,HORNY),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(HORNIES,HORNY),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(HORNIES,HORNY),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(HORNIES,HORNY),10,0,ATTACK_ENEMIES,0)
  ADD_TO_PARTY(HORNIES,HORNY),10,0,ATTACK_ENEMIES,0)

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

IF(PLAYER0,TIMER0 >= 8000)
  IF(PLAYER0,ENTRANCE < 1)
    DISPLAY_OBJECTIVE(68,PLAYER0)
  ENDIF
ENDIF

IF(PLAYER0,AVATAR > 0)
  DISPLAY_OBJECTIVE(69,PLAYER0)
ENDIF

IF(PLAYER0,TIMER0 >= 10000)
  ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SAMURAIS,1,DUNGEON,0,1,0)
  ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,SAMURAIS,1,DUNGEON,0,1,0)
ENDIF

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

IF(PLAYER0,TIMER0 >= 20000)
  ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,WIZARDS,2,DUNGEON,0,1,0)
  ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,WIZARDS,2,DUNGEON,0,1,0)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
  ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)
ENDIF

IF(PLAYER0,TIMER0 >= 30000)
  ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,KNIGHTS,3,DUNGEON,0,1,0)
  ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,KNIGHTS,3,DUNGEON,0,1,0)
ENDIF

IF_ACTION_POINT(4,PLAYER0)
  ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)
ENDIF

IF(PLAYER0,TIMER0 >= 60000)
  ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,HORNIES,4,DUNGEON,0,1,0)
  ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,HORNIES,4,DUNGEON,0,1,0)
ENDIF

IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
  DISPLAY_OBJECTIVE(70,PLAYER0)
  WIN_GAME
ENDIF
