REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for Level TulipScent
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 New creatures for the player:
REM   TENTACLE - NO - CORRECTED
REM New powers for the player:
REM   POWER_OBEY - NO - CORRECTED
Removed:
REM   TRAP_LAVA - Text not supposed to be here; but the trap is researchable

SET_GENERATE_SPEED(750)

MAX_CREATURES(PLAYER0,17)
MAX_CREATURES(PLAYER1,17)

START_MONEY(PLAYER0,27500)
START_MONEY(PLAYER1,33500)

REM COMPUTER PLAYER STUFF

COMPUTER_PLAYER(PLAYER1,0)

SET_COMPUTER_CHECKS(PLAYER1,"CHECK FOR NEUTRAL PLACES",15000,0,0,0,65000)
REM "CHECK FOR QUICK ATTACK" CheckEvery AttackPercent CTADuration MinForAttack LastCheck
SET_COMPUTER_CHECKS(PLAYER1,"CHECK FOR QUICK ATTACK",700,70,3000,8,12500)
SET_COMPUTER_PROCESS(PLAYER1,"ATTACK SAFE ATTACK",-1,100,17,100,0)
SET_COMPUTER_PROCESS(PLAYER1,"ATTACK PLAN 1",-1,100,17,100,0)

ADD_CREATURE_TO_POOL(TROLL,8)
ADD_CREATURE_TO_POOL(ORC,20)
ADD_CREATURE_TO_POOL(BILE_DEMON,2)
ADD_CREATURE_TO_POOL(TENTACLE,30)
ADD_CREATURE_TO_POOL(SKELETON,30)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,30)
ADD_CREATURE_TO_POOL(SORCEROR,21)
ADD_CREATURE_TO_POOL(DRAGON,35)
ADD_CREATURE_TO_POOL(HELL_HOUND,40)

REM	Creature availability
CREATURE_AVAILABLE(PLAYER0,TROLL,1,1)
CREATURE_AVAILABLE(PLAYER0,ORC,1,1)
CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER0,TENTACLE,1,1)
CREATURE_AVAILABLE(PLAYER0,SKELETON,1,1)

CREATURE_AVAILABLE(PLAYER1,DARK_MISTRESS,1,1)
CREATURE_AVAILABLE(PLAYER1,SORCEROR,1,1)
CREATURE_AVAILABLE(PLAYER1,BILE_DEMON,1,1)
CREATURE_AVAILABLE(PLAYER1,DRAGON,1,1)
CREATURE_AVAILABLE(PLAYER1,HELL_HOUND,1,1)
CREATURE_AVAILABLE(PLAYER1,ORC,1,1)

REM	Room availability
ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,LAIR,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,GARDEN,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,TRAINING,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,RESEARCH,1,1)

ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,WORKSHOP,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,1)
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)
ROOM_AVAILABLE(ALL_PLAYERS,SCAVENGER,1,0)

REM	Spells availability
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_SIGHT,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_OBEY,1,1)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
MAGIC_AVAILABLE(PLAYER1,POWER_CHICKEN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_ARMAGEDDON,1,0)
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DESTROY_WALLS,1,0)

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

CREATE_PARTY(ONE)
    ADD_TO_PARTY(ONE,ARCHER,5,750,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,ARCHER,5,750,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,ARCHER,5,750,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ONE,THIEF,7,1750,ATTACK_ENEMIES,0)

CREATE_PARTY(TWO)
    ADD_TO_PARTY(TWO,DWARFA,5,800,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,DWARFA,5,800,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,DWARFA,5,800,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,DWARFA,5,800,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(TWO,ARCHER,5,800,ATTACK_ENEMIES,0)

CREATE_PARTY(THREE)
    ADD_TO_PARTY(THREE,BARBARIAN,6,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,BARBARIAN,6,1000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(THREE,BARBARIAN,6,1000,ATTACK_ENEMIES,0)

CREATE_PARTY(FOUR)
    ADD_TO_PARTY(FOUR,WIZARD,5,1200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,WIZARD,5,1200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FOUR,WIZARD,5,1200,ATTACK_ENEMIES,0)

CREATE_PARTY(FIVE)
    ADD_TO_PARTY(FIVE,GIANT,8,2000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,ARCHER,2,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,ARCHER,2,300,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(FIVE,ARCHER,2,300,ATTACK_ENEMIES,0)

CREATE_PARTY(SIX)
    ADD_TO_PARTY(SIX,THIEF,7,2000,STEAL_GOLD,0)
    ADD_TO_PARTY(SIX,THIEF,6,2000,STEAL_GOLD,0)
    ADD_TO_PARTY(SIX,THIEF,6,2000,STEAL_GOLD,0)
    ADD_TO_PARTY(SIX,THIEF,6,2000,STEAL_GOLD,0)

CREATE_PARTY(SEVEN)
    ADD_TO_PARTY(SEVEN,WITCH,4,1200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SEVEN,WITCH,4,1200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SEVEN,WITCH,4,1200,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(SEVEN,WITCH,4,1200,ATTACK_ENEMIES,0)

CREATE_PARTY(ELITE)
    ADD_TO_PARTY(ELITE,SAMURAI,9,4000,ATTACK_ENEMIES,0)
    ADD_TO_PARTY(ELITE,WIZARD,8,2000,STEAL_SPELLS,0)
    ADD_TO_PARTY(ELITE,BARBARIAN,8,2000,STEAL_GOLD,0)
    ADD_TO_PARTY(ELITE,GIANT,7,2000,STEAL_SPELLS,0)

REM ****************************************************************************

DISPLAY_OBJECTIVE(125,PLAYER0)

IF(PLAYER0,GAME_TURN >= 10)
REM	"Make haste to subjugate your adversary here, you will not find any easy path through this level, you must fight for every advantage."
	DISPLAY_INFORMATION(120)
	DISPLAY_INFORMATION(168)
ENDIF

IF(PLAYER0,GAME_TURN >= 5000)
	DISPLAY_INFORMATION(126)
ENDIF

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

IF_ACTION_POINT(4,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,-1,1)
	SET_TIMER(PLAYER_GOOD,TIMER0)
	IF(PLAYER_GOOD,TIMER0 >= 1500)
		ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,-1,1)
	ENDIF
ENDIF

IF_ACTION_POINT(7,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FOUR,-4,1)
ENDIF

IF_ACTION_POINT(6,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,-5,1)
ENDIF

IF_ACTION_POINT(5,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SIX,-3,1)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SEVEN,-2,1)
ENDIF

IF_ACTION_POINT(8,PLAYER0)
	ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,9,1)
ENDIF

IF_AVAILABLE(PLAYER0,POWER_CONCEAL == 1)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ELITE,10,DUNGEON,0,6,500)
ENDIF

IF(PLAYER0,TOTAL_CREATURES >= 17)
	ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ELITE,10,DUNGEON,0,6,500)
ENDIF

IF(PLAYER1,TOTAL_CREATURES >= 17)
	IF_AVAILABLE(PLAYER1,POWER_CONCEAL == 1)
		ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,ELITE,10,DUNGEON,1,6,500)
	ENDIF
ENDIF

IF(PLAYER1,DUNGEON_DESTROYED == 1)
	WIN_GAME
ENDIF

IF(PLAYER0,TENTACLE > 0)
	DISPLAY_INFORMATION(161)
ENDIF
