REM ********************************************
REM  Ancient Keeper campaign for KeeperFX
REM  Script for Level 100 (Secret 1)
REM  Version 1.00
REM ********************************************

COMPUTER_PLAYER(PLAYER1,0)
COMPUTER_PLAYER(PLAYER2,0)
COMPUTER_PLAYER(PLAYER3,0)

SET_FLAG(PLAYER0,FLAG0,0)

DISPLAY_OBJECTIVE(18,PLAYER0)

IF(PLAYER0,FLAG0 == 0)
  IF(PLAYER1,ORC == 0)
    IF(PLAYER2,ORC == 0)
      IF(PLAYER3,ORC == 0)
        IF(PLAYER_GOOD,ORC == 0)
          SET_FLAG(PLAYER0,FLAG0,1)
          ADD_CREATURE_TO_LEVEL(PLAYER1,GIANT,1,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER2,GIANT,2,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER3,GIANT,3,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GIANT,4,1,10,100)
        ENDIF
      ENDIF
    ENDIF
  ENDIF
ENDIF

IF(PLAYER0,FLAG0 == 1)
  IF(PLAYER1,GIANT == 0)
    IF(PLAYER2,GIANT == 0)
      IF(PLAYER3,GIANT == 0)
        IF(PLAYER_GOOD,GIANT == 0)
          SET_FLAG(PLAYER0,FLAG0,2)
          ADD_CREATURE_TO_LEVEL(PLAYER1,BILE_DEMON,1,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER2,BILE_DEMON,2,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER3,BILE_DEMON,3,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BILE_DEMON,4,1,10,100)
        ENDIF
      ENDIF
    ENDIF
  ENDIF
ENDIF

IF(PLAYER0,FLAG0 == 2)
  IF(PLAYER1,BILE_DEMON == 0)
    IF(PLAYER2,BILE_DEMON == 0)
      IF(PLAYER3,BILE_DEMON == 0)
        IF(PLAYER_GOOD,BILE_DEMON == 0)
          SET_FLAG(PLAYER0,FLAG0,3)
          ADD_CREATURE_TO_LEVEL(PLAYER1,SAMURAI,1,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER2,SAMURAI,2,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER3,SAMURAI,3,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,4,1,10,100)
        ENDIF
      ENDIF
    ENDIF
  ENDIF
ENDIF

IF(PLAYER0,FLAG0 == 3)
  IF(PLAYER1,SAMURAI == 0)
    IF(PLAYER2,SAMURAI == 0)
      IF(PLAYER3,SAMURAI == 0)
        IF(PLAYER_GOOD,SAMURAI == 0)
          SET_FLAG(PLAYER0,FLAG0,4)
          ADD_CREATURE_TO_LEVEL(PLAYER1,DARK_MISTRESS,1,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER2,DARK_MISTRESS,2,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER3,DARK_MISTRESS,3,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DARK_MISTRESS,4,1,10,100)
        ENDIF
      ENDIF
    ENDIF
  ENDIF
ENDIF

IF(PLAYER0,FLAG0 == 4)
  IF(PLAYER1,DARK_MISTRESS == 0)
    IF(PLAYER2,DARK_MISTRESS == 0)
      IF(PLAYER3,DARK_MISTRESS == 0)
        IF(PLAYER_GOOD,DARK_MISTRESS == 0)
          SET_FLAG(PLAYER0,FLAG0,5)
          ADD_CREATURE_TO_LEVEL(PLAYER1,KNIGHT,1,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER2,KNIGHT,2,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER3,KNIGHT,3,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,KNIGHT,4,1,10,100)
        ENDIF
      ENDIF
    ENDIF
  ENDIF
ENDIF

IF(PLAYER0,FLAG0 == 5)
  IF(PLAYER1,KNIGHT == 0)
    IF(PLAYER2,KNIGHT == 0)
      IF(PLAYER3,KNIGHT == 0)
        IF(PLAYER_GOOD,KNIGHT == 0)
          SET_FLAG(PLAYER0,FLAG0,6)
          ADD_CREATURE_TO_LEVEL(PLAYER1,HORNY,1,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER2,HORNY,2,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER3,HORNY,3,1,10,100)
          ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,HORNY,4,1,10,100)
        ENDIF
      ENDIF
    ENDIF
  ENDIF
ENDIF

IF(PLAYER0,FLAG0 == 6)
  IF(PLAYER1,HORNY == 0)
    IF(PLAYER2,HORNY == 0)
      IF(PLAYER3,HORNY == 0)
        IF(PLAYER_GOOD,HORNY == 0)
          ADD_CREATURE_TO_LEVEL(PLAYER0,IMP,PLAYER0,1,9,0)
          DISPLAY_OBJECTIVE(19,PLAYER0)
          WIN_GAME
        ENDIF
      ENDIF
    ENDIF
  ENDIF
ENDIF

IF(PLAYER0,ORC == 0)
  DISPLAY_OBJECTIVE(20,PLAYER0)
  LOSE_GAME
ENDIF
