REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for DD Level Abbadon
REM  Campaign: DK Original
REM  Authors:  based on Bullfrog script
REM            KeeperFX CCP Team
REM  Date:     17 Dec 1996 - 11 Feb 2011
REM  Copying and copyrights:
REM    This program is free software; you can redistribute it and/or modify
REM    it under the terms of the GNU General Public License as published by
REM    the Free Software Foundation; either version 2 of the License, or
REM    (at your option) any later version.
REM ****************************************************************************

REM	Initializations
SET_GENERATE_SPEED(500)
MAX_CREATURES(PLAYER0,10)
START_MONEY(PLAYER0,20000)

REM	Creature pool
ADD_CREATURE_TO_POOL(SORCEROR,5)
ADD_CREATURE_TO_POOL(BILE_DEMON,5)
ADD_CREATURE_TO_POOL(DRAGON,5)
ADD_CREATURE_TO_POOL(DEMONSPAWN,15)
ADD_CREATURE_TO_POOL(BUG,15)
ADD_CREATURE_TO_POOL(SPIDER,5)
ADD_CREATURE_TO_POOL(TROLL,5)
ADD_CREATURE_TO_POOL(ORC,5)

REM Creature availability
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,BUG,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
CREATURE_AVAILABLE(ALL_PLAYERS,ORC,1,1)

REM Room availability - given when claimed

IF(PLAYER0,TREASURE > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
ENDIF

IF(PLAYER0,LAIR > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ENDIF

IF(PLAYER0,GARDEN > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
ENDIF

IF(PLAYER0,TRAINING > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
ENDIF

IF(PLAYER0,RESEARCH > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)
ENDIF

IF(PLAYER0,BARRACKS > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,1)
ENDIF

IF(PLAYER0,PRISON > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,1)
ENDIF

IF(PLAYER0,WORKSHOP > 0)
    ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,1)
ENDIF

IF(PLAYER0,BRIDGE > 0)
	  ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,1)
ENDIF

REM Room availability - researchable
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)

REM Spells availability
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HAND,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SLAP,1,1)

REM Doors and traps availability
DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LAVA,1,0)

IF(PLAYER0,TREASURE > 0)
    IF(PLAYER0,LAIR > 0)
        IF(PLAYER0,GARDEN > 0)
            IF(PLAYER0,TRAINING > 0)
                IF(PLAYER0,RESEARCH > 0)
                    DISPLAY_OBJECTIVE(902,PLAYER0)
                ENDIF
            ENDIF
        ENDIF
    ENDIF
ENDIF

REM Party 1

CREATE_PARTY(PARTY1)
	ADD_TO_PARTY(PARTY1,WIZARD,5,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY1,THIEF,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY1,BARBARIAN,4,100,ATTACK_ENEMIES,0)

IF_ACTION_POINT(1,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY1,1,1)
ENDIF

REM Party 2

CREATE_PARTY(PARTY2)
	ADD_TO_PARTY(PARTY2,FAIRY,7,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY2,WITCH,5,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY2,GIANT,4,0,ATTACK_ENEMIES,0)

IF_ACTION_POINT(2,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY2,2,1)
ENDIF

REM Party 3

CREATE_PARTY(PARTY3)
	ADD_TO_PARTY(PARTY3,FAIRY,10,200,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY3,ARCHER,8,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY3,BARBARIAN,7,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY3,FAIRY,10,200,ATTACK_ENEMIES,0)

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

REM Party 5

CREATE_PARTY(PARTY4)
	ADD_TO_PARTY(PARTY4,WITCH,10,300,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY4,SAMURAI,8,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY4,THIEF,8,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY4,WITCH,10,300,ATTACK_ENEMIES,0)

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

REM Party 5

CREATE_PARTY(PARTY5)
	ADD_TO_PARTY(PARTY5,WIZARD,10,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY5,GIANT,8,800,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY5,GIANT,8,800,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY5,WIZARD,10,100,ATTACK_ENEMIES,0)

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

REM Party 6

CREATE_PARTY(PARTY6)
	ADD_TO_PARTY(PARTY6,BARBARIAN,8,100,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY6,BARBARIAN,7,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY6,BARBARIAN,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY6,ARCHER,7,0,ATTACK_ENEMIES,0)

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

REM Party 7

CREATE_PARTY(PARTY7)
	ADD_TO_PARTY(PARTY7,BARBARIAN,10,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY7,BARBARIAN,10,400,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY7,GIANT,9,1000,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY7,MONK,10,200,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY7,SAMURAI,10,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY7,ARCHER,10,200,ATTACK_ENEMIES,0)

IF_ACTION_POINT(7,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY7,7,1)
ENDIF

REM Party 8

CREATE_PARTY(PARTY8)
	ADD_TO_PARTY(PARTY8,FAIRY,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY8,FAIRY,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY8,FAIRY,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY8,WITCH,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY8,WITCH,10,0,ATTACK_ENEMIES,0)

IF_ACTION_POINT(8,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY8,8,1)
ENDIF

REM Party 9

CREATE_PARTY(PARTY9)
	ADD_TO_PARTY(PARTY9,FAIRY,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY9,FAIRY,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY9,WITCH,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY9,WITCH,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY9,WITCH,10,0,ATTACK_ENEMIES,0)

IF_ACTION_POINT(9,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY9,9,1)
ENDIF

REM Party 10

CREATE_PARTY(PARTY10)
	ADD_TO_PARTY(PARTY10,SAMURAI,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY10,SAMURAI,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY10,WIZARD,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY10,WIZARD,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY10,GIANT,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY10,GIANT,10,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY10,KNIGHT,10,0,ATTACK_ENEMIES,0)

IF_ACTION_POINT(10,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY10,10,1)
	SET_FLAG(PLAYER0,FLAG0,1)
ENDIF

REM Party 11

CREATE_PARTY(PARTY11)
	ADD_TO_PARTY(PARTY11,THIEF,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY11,THIEF,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY11,THIEF,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY11,THIEF,4,500,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY11,ARCHER,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY11,ARCHER,6,0,ATTACK_ENEMIES,0)

IF_ACTION_POINT(11,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY11,11,1)
ENDIF

REM	Party 12

CREATE_PARTY(PARTY12)
	ADD_TO_PARTY(PARTY12,FAIRY,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY12,FAIRY,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY12,FAIRY,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY12,FAIRY,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY12,FAIRY,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY12,FAIRY,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY12,FAIRY,6,0,ATTACK_ENEMIES,0)

IF_ACTION_POINT(12,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY12,12,1)
ENDIF

REM		*** BOULDER TRAPS AVAILABLE ***

IF_ACTION_POINT(13,PLAYER0)
	TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
ENDIF

REM	Guard gold

CREATE_PARTY(PARTY14)
	ADD_TO_PARTY(PARTY14,GIANT,5,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY14,SAMURAI,8,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY14,ARCHER,7,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY14,THIEF,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY14,ARCHER,7,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY14,SAMURAI,6,0,ATTACK_ENEMIES,0)
	ADD_TO_PARTY(PARTY14,GIANT,5,0,ATTACK_ENEMIES,0)

IF_ACTION_POINT(14,PLAYER0)
	IF(PLAYER0,MONEY > 25000)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY14,14,1)
	ENDIF
ENDIF

REM	Objectives

DISPLAY_OBJECTIVE(898,PLAYER0)

REM	Win conditions

IF(PLAYER0,FLAG0 == 1)
	IF(PLAYER_GOOD,KNIGHT == 0)
		IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
			WIN_GAME
		ENDIF
	ENDIF
ENDIF

IF(PLAYER0,DARK_MISTRESS >= 1)
	DISPLAY_INFORMATION(923,PLAYER0)
ENDIF

REM	End of file
