REM ****************************************************************************
REM  Campaigns Consolidation Project for KeeperFX strategy game.
REM ****************************************************************************
REM  Script for Level The Nameless Hero (also called Nameless Dungeon 1)
REM  Campaign: Twin Keepers
REM  Authors:  Original author unknown
REM            KeeperFX CCP Team
REM            Switched to translatable objectives by dayokay Nov 2014
REM  Date:     31 Jul 2005 - 20 Jan 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 ****************************************************************************

LEVEL_VERSION(1)

START_MONEY(PLAYER0,15000)

SET_GENERATE_SPEED(300)

MAX_CREATURES(PLAYER0,15)

SET_TIMER(PLAYER_GOOD,TIMER0)

ADD_CREATURE_TO_POOL(BUG,20)
ADD_CREATURE_TO_POOL(DEMONSPAWN,20)
ADD_CREATURE_TO_POOL(SPIDER,20)
ADD_CREATURE_TO_POOL(TROLL,20)
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
ADD_CREATURE_TO_POOL(DRAGON,20)
ADD_CREATURE_TO_POOL(BILE_DEMON,20)
ADD_CREATURE_TO_POOL(ORC,20)
ADD_CREATURE_TO_POOL(TENTACLE,20)
ADD_CREATURE_TO_POOL(HELL_HOUND,20)
ADD_CREATURE_TO_POOL(SORCEROR,20)

CREATURE_AVAILABLE(PLAYER0,TROLL,1,0)
CREATURE_AVAILABLE(PLAYER0,DARK_MISTRESS,1,0)
CREATURE_AVAILABLE(PLAYER0,TENTACLE,1,0)
CREATURE_AVAILABLE(PLAYER0,ORC,1,0)
CREATURE_AVAILABLE(PLAYER0,BILE_DEMON,1,0)
CREATURE_AVAILABLE(PLAYER0,SPIDER,1,0)
CREATURE_AVAILABLE(PLAYER0,BUG,1,0)
CREATURE_AVAILABLE(PLAYER0,DEMONSPAWN,1,0)
CREATURE_AVAILABLE(PLAYER0,DRAGON,1,0)
CREATURE_AVAILABLE(PLAYER0,HELL_HOUND,1,0)
CREATURE_AVAILABLE(PLAYER0,SORCEROR,1,0)

ROOM_AVAILABLE(PLAYER0,TREASURE,1,1)
ROOM_AVAILABLE(PLAYER0,LAIR,1,1)
ROOM_AVAILABLE(PLAYER0,GARDEN,1,1)
ROOM_AVAILABLE(PLAYER0,TRAINING,1,1)
ROOM_AVAILABLE(PLAYER0,RESEARCH,1,1)
ROOM_AVAILABLE(PLAYER0,BARRACKS,1,0)
ROOM_AVAILABLE(PLAYER0,WORKSHOP,1,0)
ROOM_AVAILABLE(PLAYER0,GRAVEYARD,1,0)
ROOM_AVAILABLE(PLAYER0,SCAVENGER,1,0)

MAGIC_AVAILABLE(PLAYER0,POWER_IMP,1,1)

TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
DOOR_AVAILABLE(PLAYER0,STEEL,1,0)
DOOR_AVAILABLE(PLAYER0,MAGIC,1,0)

CREATE_PARTY(PARTY1)
    ADD_TO_PARTY(PARTY1,WIZARD,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY1,KNIGHT,10,10000,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY1,WIZARD,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY1,SAMURAI,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY1,SAMURAI,10,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PARTY2)
    ADD_TO_PARTY(PARTY2,GIANT,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY2,GIANT,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY2,MONK,10,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PARTY3)
    ADD_TO_PARTY(PARTY3,DWARFA,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY3,DWARFA,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY3,WITCH,10,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PARTY4)
    ADD_TO_PARTY(PARTY4,BARBARIAN,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY4,BARBARIAN,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY4,WIZARD,10,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PARTY5)
    ADD_TO_PARTY(PARTY5,SAMURAI,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY5,DWARFA,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY5,WITCH,10,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PARTY6)
    ADD_TO_PARTY(PARTY6,WIZARD,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY6,MONK,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY6,ARCHER,10,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PARTY7)
    ADD_TO_PARTY(PARTY7,DWARFA,4,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY7,BARBARIAN,5,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY7,GIANT,4,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PARTY8)
    ADD_TO_PARTY(PARTY8,WIZARD,8,500,STEAL_SPELLS,0)
    ADD_TO_PARTY(PARTY8,MONK,8,500,STEAL_SPELLS,0)
    ADD_TO_PARTY(PARTY8,ARCHER,6,500,STEAL_SPELLS,0)
    ADD_TO_PARTY(PARTY8,ARCHER,6,500,STEAL_SPELLS,0)

CREATE_PARTY(PARTY9)
    ADD_TO_PARTY(PARTY9,GIANT,8,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY9,GIANT,8,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY9,MONK,8,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY9,DWARFA,8,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY9,DWARFA,8,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY9,WITCH,8,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PARTY10)
    ADD_TO_PARTY(PARTY10,SAMURAI,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY10,WIZARD,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY10,MONK,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY10,DWARFA,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY10,WITCH,10,500,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(PARTY10,BARBARIAN,10,500,ATTACK_DUNGEON_HEART,0)

CREATE_PARTY(PARTY11)
    ADD_TO_PARTY(PARTY11,DWARFA,1,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY11,DWARFA,1,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY11,THIEF,1,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY11,THIEF,1,500,STEAL_GOLD,0)

CREATE_PARTY(PARTY12)
    ADD_TO_PARTY(PARTY12,GIANT,2,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY12,MONK,2,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY12,ARCHER,2,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY12,THIEF,2,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY12,THIEF,2,500,STEAL_GOLD,0)

CREATE_PARTY(PARTY13)
    ADD_TO_PARTY(PARTY13,SAMURAI,3,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY13,WIZARD,3,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY13,BARBARIAN,3,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY13,THIEF,3,500,STEAL_GOLD,0)
    ADD_TO_PARTY(PARTY13,THIEF,3,500,STEAL_GOLD,0)

DISPLAY_OBJECTIVE(19)

IF_ACTION_POINT(2,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY7,2,2)
ENDIF

IF_ACTION_POINT(3,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,4,8,4,500)
ENDIF

IF_ACTION_POINT(5,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,5,6,5,500)
ENDIF

IF_ACTION_POINT(6,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY7,6,1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,7,4,6,500)
ENDIF

IF_ACTION_POINT(8,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY7,9,3)
ENDIF

IF_ACTION_POINT(10,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,10,4,6,500)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY8,11,1)
ENDIF

IF_ACTION_POINT(12,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,13,6,7,500)
ENDIF

IF_ACTION_POINT(14,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,14,6,7,500)
ENDIF

IF_ACTION_POINT(15,PLAYER0)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,15,6,7,500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,16,6,7,500)
ENDIF

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

IF_ACTION_POINT(18,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY3,18,3)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY10,-2,1)
ENDIF

IF_ACTION_POINT(19,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY4,19,3)
ENDIF

IF_ACTION_POINT(20,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY5,20,3)
ENDIF

IF_ACTION_POINT(21,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY10,-6,2)
ENDIF

IF_ACTION_POINT(22,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY9,-7,1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,23,6,10,500)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY8,24,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY8,25,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY5,-4,2)
    DISPLAY_OBJECTIVE(20)
ENDIF

IF_ACTION_POINT(26,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY10,26,2)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,FAIRY,27,10,10,500)
ENDIF

IF_ACTION_POINT(28,PLAYER0)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY1,-8,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY10,-8,9)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 2500)
    ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,-1,ACTION_POINT,1,1,500)
    DISPLAY_INFORMATION(21)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 5000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY11,-2,DUNGEON_HEART,0,1,500)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 8000)
    ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY12,-3,DUNGEON_HEART,0,1,500)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 12000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY13,-1,1)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,-2,3,3,500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,-2,3,3,500)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 12000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-3,3,4,500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,-3,3,4,500)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 16000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY7,-1,2)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 19000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,-2,3,4,500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,BARBARIAN,-2,3,4,500)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 22000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,DWARFA,-3,3,5,500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,MONK,-3,3,5,500)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 26000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,THIEF,-1,4,5,500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,-2,4,6,500)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 30000)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,SAMURAI,-3,4,5,500)
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,-4,4,7,500)
ENDIF

IF(PLAYER_GOOD,TIMER0 >= 40000)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY9,-1,1)
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,PARTY9,-3,1)
ENDIF

IF(PLAYER0,BRIDGE >= 1)
    ROOM_AVAILABLE(PLAYER0,BRIDGE,1,1)
ENDIF

IF(PLAYER0,TEMPLE >= 1)
    ROOM_AVAILABLE(PLAYER0,TEMPLE,1,1)
ENDIF

IF(PLAYER0,PRISON >= 1)
    ROOM_AVAILABLE(PLAYER0,PRISON,1,1)
ENDIF

IF(PLAYER0,TORTURE >= 1)
    ROOM_AVAILABLE(PLAYER0,TORTURE,1,1)
ENDIF

IF(PLAYER0,ALL_DUNGEONS_DESTROYED == 1)
    REM QUICK_OBJECTIVE(19,"Almost there! Just make slaughter of all survivors, we can't have opinion of being mercyful.",PLAYER0)
    DISPLAY_OBJECTIVE(9)
    IF(PLAYER_GOOD,TOTAL_CREATURES < 1)
        WIN_GAME
    ENDIF
ENDIF
