begin project
This commit is contained in:
parent
ec31cf0fc3
commit
70ef6a1ee9
|
@ -1,7 +1,12 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
project(oldkeeperfiler)
|
||||
project(oldkeeperreader)
|
||||
|
||||
add_executable(oldkeeperfiler main.cpp)
|
||||
add_executable(
|
||||
oldkeeperreader
|
||||
src/main.cpp
|
||||
src/bmp.h
|
||||
src/dumbutil.h
|
||||
)
|
||||
|
||||
install(TARGETS oldkeeperfiler RUNTIME DESTINATION bin)
|
||||
install(TARGETS oldkeeperreader RUNTIME DESTINATION bin)
|
||||
|
|
6
main.cpp
6
main.cpp
|
@ -1,6 +0,0 @@
|
|||
#include <iostream>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
std::cout << "Hello, world!" << std::endl;
|
||||
return 0;
|
||||
}
|
136
src/bmp.h
Normal file
136
src/bmp.h
Normal file
|
@ -0,0 +1,136 @@
|
|||
#ifndef H_BMP
|
||||
#define H_BMP
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct BMPFileHeader {
|
||||
uint16_t file_type{0x4D42}; // File type always BM which is 0x4D42
|
||||
uint32_t file_size{0}; // Size of the file (in bytes)
|
||||
uint16_t reserved1{0}; // Reserved, always 0
|
||||
uint16_t reserved2{0}; // Reserved, always 0
|
||||
uint32_t offset_data{0}; // Start position of pixel data (bytes from the beginning of the file)
|
||||
};
|
||||
|
||||
struct BMPInfoHeader {
|
||||
uint32_t size{ 0 }; // Size of this header (in bytes)
|
||||
int32_t width{ 0 }; // width of bitmap in pixels
|
||||
int32_t height{ 0 }; // width of bitmap in pixels
|
||||
// (if positive, bottom-up, with origin in lower left corner)
|
||||
// (if negative, top-down, with origin in upper left corner)
|
||||
uint16_t planes{ 1 }; // No. of planes for the target device, this is always 1
|
||||
uint16_t bit_count{ 0 }; // No. of bits per pixel
|
||||
uint32_t compression{ 0 }; // 0 or 3 - uncompressed. THIS PROGRAM CONSIDERS ONLY UNCOMPRESSED BMP images
|
||||
uint32_t size_image{ 0 }; // 0 - for uncompressed images
|
||||
int32_t x_pixels_per_meter{ 0 };
|
||||
int32_t y_pixels_per_meter{ 0 };
|
||||
uint32_t colors_used{ 0 }; // No. color indexes in the color table. Use 0 for the max number of colors allowed by bit_count
|
||||
uint32_t colors_important{ 0 }; // No. of colors used for displaying the bitmap. If 0 all colors are required
|
||||
};
|
||||
|
||||
struct BMPColorHeader {
|
||||
uint32_t red_mask{ 0x00ff0000 }; // Bit mask for the red channel
|
||||
uint32_t green_mask{ 0x0000ff00 }; // Bit mask for the green channel
|
||||
uint32_t blue_mask{ 0x000000ff }; // Bit mask for the blue channel
|
||||
uint32_t alpha_mask{ 0xff000000 }; // Bit mask for the alpha channel
|
||||
uint32_t color_space_type{ 0x73524742 }; // Default "sRGB" (0x73524742)
|
||||
uint32_t unused[16]{ 0 }; // Unused data for sRGB color space
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
struct BMP {
|
||||
BMPFileHeader file_header;
|
||||
BMPInfoHeader bmp_info_header;
|
||||
BMPColorHeader bmp_color_header;
|
||||
std::vector<uint8_t> data;
|
||||
|
||||
BMP(int32_t width, int32_t height, bool has_alpha = true) {
|
||||
if (width <= 0 || height <= 0) {
|
||||
throw std::runtime_error("The image width and height must be positive numbers.");
|
||||
}
|
||||
|
||||
bmp_info_header.width = width;
|
||||
bmp_info_header.height = height;
|
||||
if (has_alpha) {
|
||||
bmp_info_header.size = sizeof(BMPInfoHeader) + sizeof(BMPColorHeader);
|
||||
file_header.offset_data = sizeof(BMPFileHeader) + sizeof(BMPInfoHeader) + sizeof(BMPColorHeader);
|
||||
|
||||
bmp_info_header.bit_count = 32;
|
||||
bmp_info_header.compression = 3;
|
||||
row_stride = width * 4;
|
||||
data.resize(row_stride * height);
|
||||
file_header.file_size = file_header.offset_data + data.size();
|
||||
}
|
||||
else {
|
||||
bmp_info_header.size = sizeof(BMPInfoHeader);
|
||||
file_header.offset_data = sizeof(BMPFileHeader) + sizeof(BMPInfoHeader);
|
||||
|
||||
bmp_info_header.bit_count = 24;
|
||||
bmp_info_header.compression = 0;
|
||||
row_stride = width * 3;
|
||||
data.resize(row_stride * height);
|
||||
|
||||
uint32_t new_stride = make_stride_aligned(4);
|
||||
file_header.file_size = file_header.offset_data + data.size() + bmp_info_header.height * (new_stride - row_stride);
|
||||
}
|
||||
}
|
||||
|
||||
void write(const char *fname) {
|
||||
std::ofstream of{ fname, std::ios_base::binary };
|
||||
if (of) {
|
||||
if (bmp_info_header.bit_count == 32) {
|
||||
write_headers_and_data(of);
|
||||
}
|
||||
else if (bmp_info_header.bit_count == 24) {
|
||||
if (bmp_info_header.width % 4 == 0) {
|
||||
write_headers_and_data(of);
|
||||
}
|
||||
else {
|
||||
uint32_t new_stride = make_stride_aligned(4);
|
||||
std::vector<uint8_t> padding_row(new_stride - row_stride);
|
||||
|
||||
write_headers(of);
|
||||
|
||||
for (int y = 0; y < bmp_info_header.height; ++y) {
|
||||
of.write((const char*)(data.data() + row_stride * y), row_stride);
|
||||
of.write((const char*)padding_row.data(), padding_row.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw std::runtime_error("The program can treat only 24 or 32 bits per pixel BMP files");
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw std::runtime_error("Unable to open the output image file.");
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
uint32_t row_stride{ 0 };
|
||||
|
||||
void write_headers(std::ofstream &of) {
|
||||
of.write((const char*)&file_header, sizeof(file_header));
|
||||
of.write((const char*)&bmp_info_header, sizeof(bmp_info_header));
|
||||
if(bmp_info_header.bit_count == 32) {
|
||||
of.write((const char*)&bmp_color_header, sizeof(bmp_color_header));
|
||||
}
|
||||
}
|
||||
|
||||
void write_headers_and_data(std::ofstream &of) {
|
||||
write_headers(of);
|
||||
of.write((const char*)data.data(), data.size());
|
||||
}
|
||||
|
||||
// Add 1 to the row_stride until it is divisible with align_stride
|
||||
uint32_t make_stride_aligned(uint32_t align_stride) {
|
||||
uint32_t new_stride = row_stride;
|
||||
while (new_stride % align_stride != 0) {
|
||||
new_stride++;
|
||||
}
|
||||
return new_stride;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
13
src/dumbutil.h
Normal file
13
src/dumbutil.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef H_DUMBUTIL
|
||||
#define H_DUMBUTIL
|
||||
#include <iostream>
|
||||
|
||||
bool str_ends_with(std::string const &fullString, std::string const &ending) {
|
||||
if (fullString.length() >= ending.length()) {
|
||||
return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
239
src/main.cpp
Normal file
239
src/main.cpp
Normal file
|
@ -0,0 +1,239 @@
|
|||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "bmp.h"
|
||||
#include "dumbutil.h"
|
||||
|
||||
std::string output;
|
||||
|
||||
using namespace std;
|
||||
int render_flg(char* path) {
|
||||
streampos size;
|
||||
char * memblock;
|
||||
|
||||
ifstream file(path, ios::in|ios::binary|ios::ate);
|
||||
if (file.is_open()) {
|
||||
size = file.tellg();
|
||||
memblock = new char [size];
|
||||
file.seekg (0, ios::beg);
|
||||
file.read (memblock, size);
|
||||
file.close();
|
||||
|
||||
BMP bmp(256,256,true);
|
||||
int channels = bmp.bmp_info_header.bit_count / 8;
|
||||
|
||||
int c = 0;
|
||||
for (size_t x {0}; x < 256; x++){
|
||||
for (size_t y {0}; y < 256; y++){
|
||||
int b1 = (int) memblock[c];
|
||||
int b2 = (int) memblock[c+1];
|
||||
|
||||
int color_b {0};
|
||||
int color_g {0};
|
||||
int color_r {0};
|
||||
int color_a {255};
|
||||
|
||||
if (b1 == -48 || b1 == 0 || b1 == 80) { // Bedrock
|
||||
// Do nothing for black
|
||||
} else if (b1 == 96) { // Dirt
|
||||
color_r = 36;
|
||||
color_g = 23;
|
||||
} else if (b1 == 2) { // Path
|
||||
color_r = 52;
|
||||
color_g = 36;
|
||||
color_b = 4;
|
||||
} else if (b1 == 65) { // Gold
|
||||
color_r = 96;
|
||||
color_g = 93;
|
||||
color_b = 16;
|
||||
} else if (b1 == -64 || b1 == 84) { // Wall
|
||||
color_r = 64;
|
||||
color_g = 48;
|
||||
color_b = 28;
|
||||
} else if (b1 == 22) { // Room
|
||||
color_r = 255;
|
||||
color_g = 255;
|
||||
color_b = 255;
|
||||
} else if (b1 == 64) { // Door
|
||||
if (b2 == 1) {
|
||||
color_r = 244;
|
||||
color_g = 132;
|
||||
color_b = 92;
|
||||
} else {
|
||||
color_r = 144;
|
||||
color_g = 152;
|
||||
color_b = 80;
|
||||
}
|
||||
} else {
|
||||
color_a = 0;
|
||||
cout << "Unknown byte '" << hex << b1 << "'.\n";
|
||||
}
|
||||
|
||||
if (b2) {
|
||||
cout << "Byte of '" << hex << b1 << "' has a secondary byte of '" << hex << b2 << "'.\n";
|
||||
}
|
||||
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 0] = color_b; // B
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 1] = color_g; // G
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 2] = color_r; // R
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 3] = color_a; // A
|
||||
|
||||
c+=2;
|
||||
}
|
||||
}
|
||||
bmp.bmp_info_header.height *=-1;
|
||||
bmp.write(output.c_str());
|
||||
|
||||
delete[] memblock;
|
||||
} else return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int render_ori(char* path) {
|
||||
streampos size;
|
||||
char * memblock;
|
||||
|
||||
cout << "Reading File: " << path << "\n";
|
||||
ifstream file(path, ios::in|ios::binary|ios::ate);
|
||||
if (file.is_open()) {
|
||||
size = file.tellg();
|
||||
memblock = new char [size];
|
||||
file.seekg (0, ios::beg);
|
||||
file.read (memblock, size);
|
||||
file.close();
|
||||
|
||||
BMP bmp(256,256,true);
|
||||
int channels = bmp.bmp_info_header.bit_count / 8;
|
||||
|
||||
int c = 0;
|
||||
for (size_t x {0}; x < 256; x++){
|
||||
for (size_t y {0}; y < 256; y++){
|
||||
int b1 = (int) memblock[c];
|
||||
|
||||
int color_b {0};
|
||||
int color_g {0};
|
||||
int color_r {0};
|
||||
int color_a {255};
|
||||
|
||||
if (b1 == 0) {
|
||||
color_r = 255;
|
||||
color_g = 255;
|
||||
color_b = 255;
|
||||
} else {
|
||||
color_a = 0;
|
||||
cout << "Unknown byte '" << hex << b1 << "'.\n";
|
||||
}
|
||||
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 0] = color_b; // B
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 1] = color_g; // G
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 2] = color_r; // R
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 3] = color_a; // A
|
||||
|
||||
c++;
|
||||
}
|
||||
}
|
||||
bmp.bmp_info_header.height *=-1;
|
||||
bmp.write(output.c_str());
|
||||
|
||||
delete[] memblock;
|
||||
} else return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int render_cei(char* path) {
|
||||
streampos size;
|
||||
char * memblock;
|
||||
|
||||
cout << "Reading File: " << path << "\n";
|
||||
ifstream file(path, ios::in|ios::binary|ios::ate);
|
||||
if (file.is_open()) {
|
||||
size = file.tellg();
|
||||
memblock = new char [size];
|
||||
file.seekg (0, ios::beg);
|
||||
file.read (memblock, size);
|
||||
file.close();
|
||||
|
||||
BMP bmp(256,256,true);
|
||||
int channels = bmp.bmp_info_header.bit_count / 8;
|
||||
|
||||
int c = 0;
|
||||
for (size_t x {0}; x < 256; x++){
|
||||
for (size_t y {0}; y < 256; y++){
|
||||
int b1 = (int) memblock[c];
|
||||
|
||||
int lightness = 0;
|
||||
int alpha {255};
|
||||
|
||||
if (b1 == 0) {
|
||||
// Do nothing for black
|
||||
} else if (b1 == 1) {
|
||||
lightness = 17;
|
||||
} else if (b1 == 2) {
|
||||
lightness = 34;
|
||||
} else if (b1 == 3) {
|
||||
lightness = 51;
|
||||
} else if (b1 == 4) {
|
||||
lightness = 68;
|
||||
} else if (b1 == 5) {
|
||||
lightness = 85;
|
||||
} else if (b1 == 6) {
|
||||
lightness = 102;
|
||||
} else if (b1 == 7) {
|
||||
lightness = 119;
|
||||
} else if (b1 == 8) {
|
||||
lightness = 136;
|
||||
} else if (b1 == 9) {
|
||||
lightness = 153;
|
||||
} else if (b1 == 10) {
|
||||
lightness = 170;
|
||||
} else if (b1 == 11) {
|
||||
lightness = 204;
|
||||
} else if (b1 == 12) {
|
||||
lightness = 255;
|
||||
} else {
|
||||
alpha = 0;
|
||||
cout << "Unknown byte '" << hex << b1 << "'.\n";
|
||||
}
|
||||
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 0] = lightness; // B
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 1] = lightness; // G
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 2] = lightness; // R
|
||||
bmp.data[channels * (x * bmp.bmp_info_header.width + y) + 3] = alpha; // A
|
||||
|
||||
c++;
|
||||
}
|
||||
}
|
||||
bmp.bmp_info_header.height *=-1;
|
||||
bmp.write(output.c_str());
|
||||
|
||||
delete[] memblock;
|
||||
} else return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
if (argc >= 1) {
|
||||
for(int i = 1; i < argc; i++) {
|
||||
std::string arg = std::string(argv[i]);
|
||||
if (arg == "render") {
|
||||
output = std::string(argv[i+1]) + ".bmp";
|
||||
cout << output << "\n";
|
||||
if (str_ends_with(argv[i+1], ".flg")) {
|
||||
return render_flg(argv[i+1]);
|
||||
} else if (str_ends_with(argv[i+1], ".ori")) {
|
||||
return render_ori(argv[i+1]);
|
||||
} else if (str_ends_with(argv[i+1], ".cei")) {
|
||||
return render_cei(argv[i+1]);
|
||||
} else {
|
||||
cout << "Format not supported.\n";
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
cout << "Old Keeper Render by Wirlaburla (v0.1)\n";
|
||||
cout << "oldkeeperrender render <file>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
BIN
test/map00021/map00021.anm
Normal file
BIN
test/map00021/map00021.anm
Normal file
Binary file not shown.
BIN
test/map00021/map00021.cei.png
Normal file
BIN
test/map00021/map00021.cei.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
test/map00021/map00021.cub
Normal file
BIN
test/map00021/map00021.cub
Normal file
Binary file not shown.
BIN
test/map00021/map00021.dor
Normal file
BIN
test/map00021/map00021.dor
Normal file
Binary file not shown.
BIN
test/map00021/map00021.rom
Normal file
BIN
test/map00021/map00021.rom
Normal file
Binary file not shown.
BIN
test/map00021/map00021.swt
Normal file
BIN
test/map00021/map00021.swt
Normal file
Binary file not shown.
BIN
test/map00021/map00021.tmn
Normal file
BIN
test/map00021/map00021.tmn
Normal file
Binary file not shown.
347
test/map00021/map00021.txt
Normal file
347
test/map00021/map00021.txt
Normal file
|
@ -0,0 +1,347 @@
|
|||
REM PLAY Level 34
|
||||
|
||||
SET_GENERATE_SPEED(700)
|
||||
|
||||
MAX_CREATURES(PLAYER0,25)
|
||||
MAX_CREATURES(PLAYER1,35)
|
||||
|
||||
START_MONEY(PLAYER0,20000)
|
||||
START_MONEY(PLAYER1,60000)
|
||||
|
||||
COMPUTER_PLAYER(PLAYER1,6)
|
||||
|
||||
|
||||
REM ALL PLAYERS
|
||||
|
||||
ADD_CREATURE_TO_POOL(FLY,20)
|
||||
ADD_CREATURE_TO_POOL(SPIDER,25)
|
||||
ADD_CREATURE_TO_POOL(DEMONSPAWN,45)
|
||||
ADD_CREATURE_TO_POOL(TROLL,30)
|
||||
ADD_CREATURE_TO_POOL(SORCEROR,17)
|
||||
ADD_CREATURE_TO_POOL(BILE_DEMON,25)
|
||||
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
|
||||
ADD_CREATURE_TO_POOL(VAMPIRE,11)
|
||||
ADD_CREATURE_TO_POOL(DRAGON,11)
|
||||
ADD_CREATURE_TO_POOL(HELL_HOUND,30)
|
||||
ADD_CREATURE_TO_POOL(ORC,30)
|
||||
|
||||
|
||||
REM Creature_Availability
|
||||
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,HELL_HOUND,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,VAMPIRE,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,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,WORKSHOP,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,SCAVENGER,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)
|
||||
|
||||
|
||||
REM Spells
|
||||
|
||||
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,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
|
||||
|
||||
|
||||
REM doors & traps
|
||||
|
||||
DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
|
||||
DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
|
||||
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
|
||||
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)
|
||||
|
||||
|
||||
REM research order
|
||||
|
||||
rem CREATE_TEXT(0,134"YOUR MISSION HERE IS TO CAPTURE THE AVATAR AND TURN THIS WHOLE WORLD EVIL. A RIVAL KEEPER CHALLENGES YOU FOR THE CROWN OF THE MOST EVIL.")
|
||||
rem CREATE_TEXT(1,135"WELL DONE,YOU HAVE DESTROYED THE AVATAR'S CASTLE, BUT YOUR RIVAL HAS ALREADY MADE OFF WITH THE CAPTURED AVATAR.ONLY THE MOST EVIL OF DUNGEON KEEPER'S CAN KILL THE AVATAR. PROVE YOUR WORTH, RAMSACK YOUR RIVALS CASTLE AND KILL THE AVATAR")
|
||||
rem CREATE_TEXT(2,136"THE AVATAR IS DEAD BUT NOT BURIED, HE HAS RESSURECTED HIMSELF IN A HIDDEN HERO STRONGHOLD AND IS ENTHUSING HIS ARMIES TO DESTROY YOUR DUNGEON. THIS NOW IS THE ULTIMATE BATTLE BETWEEN GOOD AND EVIL, THERE CAN ONLY BE ONE SURVIVOR.")
|
||||
|
||||
DISPLAY_OBJECTIVE(134,PLAYER0)
|
||||
|
||||
CREATE_PARTY(ONE)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(TWO)
|
||||
ADD_TO_PARTY(TWO,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,BARBARIAN,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,BARBARIAN,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(THREE)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
|
||||
|
||||
CREATE_PARTY(FOUR)
|
||||
ADD_TO_PARTY(FOUR,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,DWARFA,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,DWARFA,5,650,ATTACK_ENEMIES,0)
|
||||
|
||||
|
||||
CREATE_PARTY(FIVE)
|
||||
ADD_TO_PARTY(FIVE,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FIVE,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FIVE,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FIVE,FAIRY,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FIVE,FAIRY,5,750,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(THIEVES)
|
||||
ADD_TO_PARTY(THIEVES,THIEF,8,2000,STEAL_GOLD,0)
|
||||
ADD_TO_PARTY(THIEVES,THIEF,8,2000,STEAL_GOLD,0)
|
||||
|
||||
CREATE_PARTY(SKELETON)
|
||||
ADD_TO_PARTY(SKELETON(SKELETON,6,300,ATTACK_ENEMIES,0)
|
||||
|
||||
|
||||
|
||||
CREATE_PARTY(DWARVEN)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
|
||||
|
||||
CREATE_PARTY(TRAINERS)
|
||||
ADD_TO_PARTY(TRAINERS,BARBARIAN,4,1000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TRAINERS,BARBARIAN,4,1000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TRAINERS,WIZARD,5,1200,STEAL_SPELLS,0)
|
||||
ADD_TO_PARTY(TRAINERS,WIZARD,3,700,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TRAINERS,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TRAINERS,THIEF,7,3000,STEAL_GOLD,0)
|
||||
|
||||
CREATE_PARTY(SAMURAIII)
|
||||
ADD_TO_PARTY(SAMURAIII,SAMURAI,6,2500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(SAMURAIII,SAMURAI,6,2500,ATTACK_ENEMIES,0)
|
||||
|
||||
IF_ACTION_POINT(1,PLAYER0)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,2,1)
|
||||
SET_FLAG(PLAYER_GOOD,FLAG0,1)
|
||||
SET_TIMER(PLAYER_GOOD,TIMER0)
|
||||
ENDIF
|
||||
|
||||
|
||||
IF_ACTION_POINT(10,PLAYER0)
|
||||
SET_FLAG(PLAYER_GOOD,FLAG0,1)
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(17,PLAYER0)
|
||||
SET_FLAG(PLAYER_GOOD,FLAG0,1)
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
IF(PLAYER_GOOD,TIMER0 >= 1500)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,-4,1)
|
||||
SET_TIMER(PLAYER_GOOD,TIMER0)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
IF(PLAYER_GOOD,TIMER0 >= 6000)
|
||||
NEXT_COMMAND_REUSABLE
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,-4,1)
|
||||
next_command_reusable
|
||||
SET_TIMER(PLAYER_GOOD,TIMER0)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
IF(PLAYER0,TORTURE >= 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THIEVES,-4,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(3,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,4,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,5,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,6,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,7,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,8,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,9,1)
|
||||
SET_TIMER(PLAYER_GOOD,TIMER1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,TIMER1 >= 250)
|
||||
ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GHOST,6,1,8,0)
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,TIMER1 >= 290)
|
||||
ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GHOST,9,1,8,0)
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_good,DUNGEON_DESTROYED == 1)
|
||||
SET_FLAG(PLAYER_GOOD,FLAG0,2)
|
||||
DISPLAY_OBJECTIVE(135,PLAYER_GOOD)
|
||||
ADD_CREATURE_TO_LEVEL(PLAYER1,HORNY,PLAYER1,1,10,0)
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(10,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TRAINERS,11,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(12,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,-5,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(13,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SAMURAIII,14,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(13,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SAMURAIII,15,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(16,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,DWARVEN,-4,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE_PARTY(TUNNELLER)
|
||||
ADD_TO_PARTY(TUNNELLER,TUNNELLER,6,200,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TUNNELLER,TUNNELLER,6,200,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TUNNELLER,TUNNELLER,6,200,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TUNNELLER,TUNNELLER,6,200,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(AVATAR_I)
|
||||
ADD_TO_PARTY(AVATAR_I,KNIGHT,7,3000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_I,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_I,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_I,ARCHER,3,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_I,ARCHER,3,550,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(AVATAR_II)
|
||||
ADD_TO_PARTY(AVATAR_II,KNIGHT,8,3500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_II,SAMURAI,5,1750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_II,SAMURAI,5,1750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_II,SAMURAI,5,1750,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(AVATAR_III)
|
||||
ADD_TO_PARTY(AVATAR_III,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_III,MONK,7,3000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_III,MONK,7,3000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_III,MONK,7,3000,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(AVATAR)
|
||||
ADD_TO_PARTY(AVATAR,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR,AVATAR,10,20000,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(FAIRY)
|
||||
ADD_TO_PARTY(FAIRY,FAIRY,9,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FAIRY,FAIRY,9,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FAIRY,FAIRY,9,2000,ATTACK_ENEMIES,0)
|
||||
|
||||
IF(PLAYER1,DUNGEON_DESTROYED == 1)
|
||||
SET_FLAG(PLAYER0,FLAG0,3)
|
||||
ENDIF
|
||||
|
||||
|
||||
IF(PLAYER_GOOD,FLAG0 == 3)
|
||||
IF(PLAYER_GOOD,AVATAR == 0)
|
||||
DISPLAY_OBJECTIVE(136,PLAYER0)
|
||||
SET_FLAG(PLAYER0,FLAG0,4)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
IF(PLAYER0,FLAG0 == 4)
|
||||
ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TUNNELLER,18,DUNGEON,0,6,200)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,AVATAR_I,-1,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,AVATAR_II,-2,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,AVATAR_III,-3,1)
|
||||
SET_TIMER(PLAYER_GOOD,TIMER3)
|
||||
IF(PLAYER_GOOD,TIMER3 >= 300)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,AVATAR,-1,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FAIRY,-2,1)
|
||||
IF(PLAYER_GOOD,AVATAR == 0)
|
||||
WIN_GAME
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER0,DUNGEON_DESTROYED == 1)
|
||||
LOSE_GAME
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
test/map00021/map00021.zon
Normal file
BIN
test/map00021/map00021.zon
Normal file
Binary file not shown.
BIN
test/map00021/orig/map00021.anm
Normal file
BIN
test/map00021/orig/map00021.anm
Normal file
Binary file not shown.
BIN
test/map00021/orig/map00021.cub
Normal file
BIN
test/map00021/orig/map00021.cub
Normal file
Binary file not shown.
BIN
test/map00021/orig/map00021.dor
Normal file
BIN
test/map00021/orig/map00021.dor
Normal file
Binary file not shown.
BIN
test/map00021/orig/map00021.rom
Normal file
BIN
test/map00021/orig/map00021.rom
Normal file
Binary file not shown.
BIN
test/map00021/orig/map00021.swt
Normal file
BIN
test/map00021/orig/map00021.swt
Normal file
Binary file not shown.
BIN
test/map00021/orig/map00021.tmn
Normal file
BIN
test/map00021/orig/map00021.tmn
Normal file
Binary file not shown.
347
test/map00021/orig/map00021.txt
Normal file
347
test/map00021/orig/map00021.txt
Normal file
|
@ -0,0 +1,347 @@
|
|||
REM PLAY Level 34
|
||||
|
||||
SET_GENERATE_SPEED(700)
|
||||
|
||||
MAX_CREATURES(PLAYER0,25)
|
||||
MAX_CREATURES(PLAYER1,35)
|
||||
|
||||
START_MONEY(PLAYER0,20000)
|
||||
START_MONEY(PLAYER1,60000)
|
||||
|
||||
COMPUTER_PLAYER(PLAYER1,6)
|
||||
|
||||
|
||||
REM ALL PLAYERS
|
||||
|
||||
ADD_CREATURE_TO_POOL(FLY,20)
|
||||
ADD_CREATURE_TO_POOL(SPIDER,25)
|
||||
ADD_CREATURE_TO_POOL(DEMONSPAWN,45)
|
||||
ADD_CREATURE_TO_POOL(TROLL,30)
|
||||
ADD_CREATURE_TO_POOL(SORCEROR,17)
|
||||
ADD_CREATURE_TO_POOL(BILE_DEMON,25)
|
||||
ADD_CREATURE_TO_POOL(DARK_MISTRESS,20)
|
||||
ADD_CREATURE_TO_POOL(VAMPIRE,11)
|
||||
ADD_CREATURE_TO_POOL(DRAGON,11)
|
||||
ADD_CREATURE_TO_POOL(HELL_HOUND,30)
|
||||
ADD_CREATURE_TO_POOL(ORC,30)
|
||||
|
||||
|
||||
REM Creature_Availability
|
||||
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,TROLL,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,DEMONSPAWN,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,FLY,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,DARK_MISTRESS,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,SORCEROR,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,SPIDER,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,BILE_DEMON,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,HELL_HOUND,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,DRAGON,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,VAMPIRE,1,1)
|
||||
CREATURE_AVAILABLE(ALL_PLAYERS,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,WORKSHOP,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,BARRACKS,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,GUARD_POST,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,BRIDGE,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,PRISON,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,SCAVENGER,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,TEMPLE,1,0)
|
||||
ROOM_AVAILABLE(ALL_PLAYERS,GRAVEYARD,1,0)
|
||||
|
||||
|
||||
REM Spells
|
||||
|
||||
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,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CALL_TO_ARMS,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HEAL_CREATURE,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_LIGHTNING,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_PROTECT,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_DISEASE,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CAVE_IN,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CHICKEN,1,0)
|
||||
MAGIC_AVAILABLE(ALL_PLAYERS,POWER_HOLD_AUDIENCE,1,0)
|
||||
|
||||
|
||||
REM doors & traps
|
||||
|
||||
DOOR_AVAILABLE(ALL_PLAYERS,WOOD,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,ALARM,1,0)
|
||||
DOOR_AVAILABLE(ALL_PLAYERS,BRACED,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,POISON_GAS,1,0)
|
||||
DOOR_AVAILABLE(ALL_PLAYERS,STEEL,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,BOULDER,1,0)
|
||||
DOOR_AVAILABLE(ALL_PLAYERS,MAGIC,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,LIGHTNING,1,0)
|
||||
TRAP_AVAILABLE(ALL_PLAYERS,WORD_OF_POWER,1,0)
|
||||
|
||||
|
||||
REM research order
|
||||
|
||||
rem CREATE_TEXT(0,134"YOUR MISSION HERE IS TO CAPTURE THE AVATAR AND TURN THIS WHOLE WORLD EVIL. A RIVAL KEEPER CHALLENGES YOU FOR THE CROWN OF THE MOST EVIL.")
|
||||
rem CREATE_TEXT(1,135"WELL DONE,YOU HAVE DESTROYED THE AVATAR'S CASTLE, BUT YOUR RIVAL HAS ALREADY MADE OFF WITH THE CAPTURED AVATAR.ONLY THE MOST EVIL OF DUNGEON KEEPER'S CAN KILL THE AVATAR. PROVE YOUR WORTH, RAMSACK YOUR RIVALS CASTLE AND KILL THE AVATAR")
|
||||
rem CREATE_TEXT(2,136"THE AVATAR IS DEAD BUT NOT BURIED, HE HAS RESSURECTED HIMSELF IN A HIDDEN HERO STRONGHOLD AND IS ENTHUSING HIS ARMIES TO DESTROY YOUR DUNGEON. THIS NOW IS THE ULTIMATE BATTLE BETWEEN GOOD AND EVIL, THERE CAN ONLY BE ONE SURVIVOR.")
|
||||
|
||||
DISPLAY_OBJECTIVE(134,PLAYER0)
|
||||
|
||||
CREATE_PARTY(ONE)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(ONE,ARCHER,2,300,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(TWO)
|
||||
ADD_TO_PARTY(TWO,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,BARBARIAN,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,BARBARIAN,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TWO,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(THREE)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,DWARFA,4,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(THREE,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
|
||||
|
||||
CREATE_PARTY(FOUR)
|
||||
ADD_TO_PARTY(FOUR,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,WIZARD,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,DWARFA,5,650,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FOUR,DWARFA,5,650,ATTACK_ENEMIES,0)
|
||||
|
||||
|
||||
CREATE_PARTY(FIVE)
|
||||
ADD_TO_PARTY(FIVE,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FIVE,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FIVE,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FIVE,FAIRY,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FIVE,FAIRY,5,750,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(THIEVES)
|
||||
ADD_TO_PARTY(THIEVES,THIEF,8,2000,STEAL_GOLD,0)
|
||||
ADD_TO_PARTY(THIEVES,THIEF,8,2000,STEAL_GOLD,0)
|
||||
|
||||
CREATE_PARTY(SKELETON)
|
||||
ADD_TO_PARTY(SKELETON(SKELETON,6,300,ATTACK_ENEMIES,0)
|
||||
|
||||
|
||||
|
||||
CREATE_PARTY(DWARVEN)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(DWARVEN,DWARFA,5,2000,ATTACK_ENEMIES,0)
|
||||
|
||||
|
||||
CREATE_PARTY(TRAINERS)
|
||||
ADD_TO_PARTY(TRAINERS,BARBARIAN,4,1000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TRAINERS,BARBARIAN,4,1000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TRAINERS,WIZARD,5,1200,STEAL_SPELLS,0)
|
||||
ADD_TO_PARTY(TRAINERS,WIZARD,3,700,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TRAINERS,ARCHER,3,500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TRAINERS,THIEF,7,3000,STEAL_GOLD,0)
|
||||
|
||||
CREATE_PARTY(SAMURAIII)
|
||||
ADD_TO_PARTY(SAMURAIII,SAMURAI,6,2500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(SAMURAIII,SAMURAI,6,2500,ATTACK_ENEMIES,0)
|
||||
|
||||
IF_ACTION_POINT(1,PLAYER0)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,ONE,2,1)
|
||||
SET_FLAG(PLAYER_GOOD,FLAG0,1)
|
||||
SET_TIMER(PLAYER_GOOD,TIMER0)
|
||||
ENDIF
|
||||
|
||||
|
||||
IF_ACTION_POINT(10,PLAYER0)
|
||||
SET_FLAG(PLAYER_GOOD,FLAG0,1)
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(17,PLAYER0)
|
||||
SET_FLAG(PLAYER_GOOD,FLAG0,1)
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
IF(PLAYER_GOOD,TIMER0 >= 1500)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TWO,-4,1)
|
||||
SET_TIMER(PLAYER_GOOD,TIMER0)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
IF(PLAYER_GOOD,TIMER0 >= 6000)
|
||||
NEXT_COMMAND_REUSABLE
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THREE,-4,1)
|
||||
next_command_reusable
|
||||
SET_TIMER(PLAYER_GOOD,TIMER0)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
IF(PLAYER0,TORTURE >= 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,THIEVES,-4,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(3,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,4,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,5,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,6,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,7,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,8,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SKELETON,9,1)
|
||||
SET_TIMER(PLAYER_GOOD,TIMER1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,TIMER1 >= 250)
|
||||
ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GHOST,6,1,8,0)
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_GOOD,TIMER1 >= 290)
|
||||
ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,GHOST,9,1,8,0)
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER_good,DUNGEON_DESTROYED == 1)
|
||||
SET_FLAG(PLAYER_GOOD,FLAG0,2)
|
||||
DISPLAY_OBJECTIVE(135,PLAYER_GOOD)
|
||||
ADD_CREATURE_TO_LEVEL(PLAYER1,HORNY,PLAYER1,1,10,0)
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(10,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,TRAINERS,11,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(12,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FIVE,-5,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(13,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SAMURAIII,14,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(13,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,SAMURAIII,15,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF_ACTION_POINT(16,PLAYER0)
|
||||
IF(PLAYER_GOOD,FLAG0 == 1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,DWARVEN,-4,1)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE_PARTY(TUNNELLER)
|
||||
ADD_TO_PARTY(TUNNELLER,TUNNELLER,6,200,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TUNNELLER,TUNNELLER,6,200,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TUNNELLER,TUNNELLER,6,200,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(TUNNELLER,TUNNELLER,6,200,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(AVATAR_I)
|
||||
ADD_TO_PARTY(AVATAR_I,KNIGHT,7,3000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_I,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_I,BARBARIAN,5,750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_I,ARCHER,3,550,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_I,ARCHER,3,550,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(AVATAR_II)
|
||||
ADD_TO_PARTY(AVATAR_II,KNIGHT,8,3500,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_II,SAMURAI,5,1750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_II,SAMURAI,5,1750,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_II,SAMURAI,5,1750,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(AVATAR_III)
|
||||
ADD_TO_PARTY(AVATAR_III,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_III,MONK,7,3000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_III,MONK,7,3000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR_III,MONK,7,3000,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(AVATAR)
|
||||
ADD_TO_PARTY(AVATAR,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR,KNIGHT,9,4000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(AVATAR,AVATAR,10,20000,ATTACK_ENEMIES,0)
|
||||
|
||||
CREATE_PARTY(FAIRY)
|
||||
ADD_TO_PARTY(FAIRY,FAIRY,9,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FAIRY,FAIRY,9,2000,ATTACK_ENEMIES,0)
|
||||
ADD_TO_PARTY(FAIRY,FAIRY,9,2000,ATTACK_ENEMIES,0)
|
||||
|
||||
IF(PLAYER1,DUNGEON_DESTROYED == 1)
|
||||
SET_FLAG(PLAYER0,FLAG0,3)
|
||||
ENDIF
|
||||
|
||||
|
||||
IF(PLAYER_GOOD,FLAG0 == 3)
|
||||
IF(PLAYER_GOOD,AVATAR == 0)
|
||||
DISPLAY_OBJECTIVE(136,PLAYER0)
|
||||
SET_FLAG(PLAYER0,FLAG0,4)
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
IF(PLAYER0,FLAG0 == 4)
|
||||
ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,TUNNELLER,18,DUNGEON,0,6,200)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,AVATAR_I,-1,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,AVATAR_II,-2,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,AVATAR_III,-3,1)
|
||||
SET_TIMER(PLAYER_GOOD,TIMER3)
|
||||
IF(PLAYER_GOOD,TIMER3 >= 300)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,AVATAR,-1,1)
|
||||
ADD_PARTY_TO_LEVEL(PLAYER_GOOD,FAIRY,-2,1)
|
||||
IF(PLAYER_GOOD,AVATAR == 0)
|
||||
WIN_GAME
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF(PLAYER0,DUNGEON_DESTROYED == 1)
|
||||
LOSE_GAME
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
test/map00021/orig/map00021.zon
Normal file
BIN
test/map00021/orig/map00021.zon
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user