forked from github/server
- Fixing the alliance code, proper tests.
- reorganizing weapons xml files
This commit is contained in:
parent
f9946ff7f8
commit
9b972601f7
48 changed files with 1069 additions and 646 deletions
src
common
eressea/tolua
res
common
de
e2k9.xmle2k9
eressea.xmleressea
eressea2
weapons
axe.xmlbow.xmlcatapult.xmlcrossbow.xmlfiresword.xmlgreatbow.xmlgreatsword-2.xmlgreatsword.xmlhalberd-2.xmlhalberd.xmllaensword.xmllance.xmlmallornbow.xmlmallorncrossbow.xmlmallornlance.xmlmallornspear.xmlrunesword.xmlrustyaxe.xmlrustygreatsword-2.xmlrustygreatsword.xmlrustyhalberd-2.xmlrustyhalberd.xmlrustysword.xmlspear.xmlsword.xml
scripts
|
@ -493,7 +493,7 @@ recruit(unit * u, struct order * ord, request ** recruitorders)
|
||||||
n = getuint();
|
n = getuint();
|
||||||
|
|
||||||
str = getstrtoken();
|
str = getstrtoken();
|
||||||
if (str) {
|
if (str && str[0]) {
|
||||||
/* Monster dürfen REKRUTIERE 15 dracoid machen
|
/* Monster dürfen REKRUTIERE 15 dracoid machen
|
||||||
* also: secondary race */
|
* also: secondary race */
|
||||||
rc = findrace(str, f->locale);
|
rc = findrace(str, f->locale);
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
* permission from the authors.
|
* permission from the authors.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma region includes
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <kernel/eressea.h>
|
#include <kernel/eressea.h>
|
||||||
#include "laws.h"
|
#include "laws.h"
|
||||||
|
@ -103,6 +105,8 @@
|
||||||
|
|
||||||
#include <attributes/otherfaction.h>
|
#include <attributes/otherfaction.h>
|
||||||
|
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
/* chance that a peasant dies of starvation: */
|
/* chance that a peasant dies of starvation: */
|
||||||
#define PEASANT_STARVATION_CHANCE 0.9F
|
#define PEASANT_STARVATION_CHANCE 0.9F
|
||||||
/* Pferdevermehrung */
|
/* Pferdevermehrung */
|
||||||
|
@ -127,8 +131,7 @@ static int
|
||||||
RemoveNMRNewbie(void) {
|
RemoveNMRNewbie(void) {
|
||||||
static int value = -1;
|
static int value = -1;
|
||||||
if (value<0) {
|
if (value<0) {
|
||||||
const char * str = get_param(global.parameters, "nmr.removenewbie");
|
value = get_param_int(global.parameters, "nmr.removenewbie", 0);
|
||||||
value = str?atoi(str):0;
|
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,153 +69,121 @@ findalliance(int id)
|
||||||
typedef struct alliance_transaction {
|
typedef struct alliance_transaction {
|
||||||
struct alliance_transaction * next;
|
struct alliance_transaction * next;
|
||||||
unit * u;
|
unit * u;
|
||||||
variant userdata;
|
|
||||||
order * ord;
|
order * ord;
|
||||||
|
// alliance * al;
|
||||||
|
// variant userdata;
|
||||||
} alliance_transaction;
|
} alliance_transaction;
|
||||||
|
|
||||||
|
static struct alliance_transaction * transactions[ALLIANCE_MAX];
|
||||||
|
|
||||||
|
|
||||||
static faction * alliance_leader(const alliance * al)
|
static faction * alliance_leader(const alliance * al)
|
||||||
{
|
{
|
||||||
return al->leader;
|
return al->leader;
|
||||||
}
|
}
|
||||||
|
|
||||||
static alliance_transaction **
|
// static alliance_transaction **
|
||||||
get_transaction(alliance * al, const variant * userdata, int type)
|
// get_transaction(const variant * userdata, int type)
|
||||||
{
|
// {
|
||||||
alliance_transaction ** tap=al->transactions+type;
|
// alliance_transaction ** tap=transactions+type;
|
||||||
while (*tap) {
|
// while (*tap) {
|
||||||
alliance_transaction * ta = *tap;
|
// alliance_transaction * ta = *tap;
|
||||||
if (userdata==NULL || memcmp(&ta->userdata, userdata, sizeof(variant))==0) {
|
// if (userdata==NULL || memcmp(&ta->userdata, userdata, sizeof(variant))==0) {
|
||||||
return tap;
|
// return tap;
|
||||||
}
|
// }
|
||||||
tap = &ta->next;
|
// tap = &ta->next;
|
||||||
}
|
// }
|
||||||
return NULL;
|
// return NULL;
|
||||||
}
|
// }
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_transaction(alliance * al, int type, const variant * userdata, unit * u, order * ord)
|
create_transaction(int type, unit * u, order * ord)
|
||||||
{
|
{
|
||||||
alliance_transaction * tr = malloc(sizeof(alliance_transaction));
|
alliance_transaction * tr = calloc(1, sizeof(alliance_transaction));
|
||||||
memcpy(&tr->userdata, userdata, sizeof(variant));
|
// if (userdata) {
|
||||||
|
// memcpy(&tr->userdata, userdata, sizeof(variant));
|
||||||
|
// }
|
||||||
|
// tr->al = al;
|
||||||
tr->ord = ord;
|
tr->ord = ord;
|
||||||
tr->next = al->transactions[type];
|
tr->u = u;
|
||||||
al->transactions[type] = tr;
|
tr->next = transactions[type];
|
||||||
|
transactions[type] = tr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cmd_kick(const tnode * tnext, void * data, struct order * ord)
|
cmd_kick(const tnode * tnext, void * data, struct order * ord)
|
||||||
{
|
{
|
||||||
unit * u = (unit*)data;
|
create_transaction(ALLIANCE_KICK, (unit*)data, ord);
|
||||||
alliance * al = u->faction->alliance;
|
|
||||||
faction * f = findfaction(getid());
|
|
||||||
unused(tnext);
|
|
||||||
|
|
||||||
if (f && al && u->faction==alliance_leader(al)) {
|
|
||||||
static variant var;
|
|
||||||
var.v = f;
|
|
||||||
create_transaction(al, ALLIANCE_KICK, &var, u, ord);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cmd_leave(const tnode * tnext, void * data, struct order * ord)
|
cmd_leave(const tnode * tnext, void * data, struct order * ord)
|
||||||
{
|
{
|
||||||
unit * u = (unit*)data;
|
create_transaction(ALLIANCE_LEAVE, (unit*)data, ord);
|
||||||
alliance * al = u->faction->alliance;
|
|
||||||
unused(tnext);
|
|
||||||
|
|
||||||
if (al) {
|
|
||||||
create_transaction(al, ALLIANCE_LEAVE, NULL, u, ord);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cmd_transfer(const tnode * tnext, void * data, struct order * ord)
|
cmd_transfer(const tnode * tnext, void * data, struct order * ord)
|
||||||
{
|
{
|
||||||
unit * u = (unit*)data;
|
create_transaction(ALLIANCE_TRANSFER, (unit*)data, ord);
|
||||||
alliance * al = u->faction->alliance;
|
|
||||||
faction * f = findfaction(getid());
|
|
||||||
unused(tnext);
|
|
||||||
|
|
||||||
if (f && al && f->alliance==al && u->faction==alliance_leader(al)) {
|
|
||||||
static variant var;
|
|
||||||
var.v = f;
|
|
||||||
create_transaction(al, ALLIANCE_TRANSFER, &var, u, ord);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cmd_new(const tnode * tnext, void * data, struct order * ord)
|
cmd_new(const tnode * tnext, void * data, struct order * ord)
|
||||||
{
|
{
|
||||||
unit * u = (unit*)data;
|
create_transaction(ALLIANCE_NEW, (unit*)data, ord);
|
||||||
alliance * al = u->faction->alliance;
|
|
||||||
unused(tnext);
|
|
||||||
|
|
||||||
if (al && u->faction==alliance_leader(al)) {
|
|
||||||
static variant var;
|
|
||||||
const char * str = getstrtoken();
|
|
||||||
|
|
||||||
var.i = str?atoi36(str):0;
|
|
||||||
create_transaction(al, ALLIANCE_NEW, &var, u, ord);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cmd_invite(const tnode * tnext, void * data, struct order * ord)
|
cmd_invite(const tnode * tnext, void * data, struct order * ord)
|
||||||
{
|
{
|
||||||
unit * u = (unit*)data;
|
create_transaction(ALLIANCE_INVITE, (unit*)data, ord);
|
||||||
alliance * al = u->faction->alliance;
|
|
||||||
faction * f = findfaction(getid());
|
|
||||||
unused(tnext);
|
|
||||||
|
|
||||||
if (f==NULL || al==NULL) {
|
|
||||||
/* TODO: error message */
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
static variant var;
|
|
||||||
var.v = f;
|
|
||||||
create_transaction(al, ALLIANCE_INVITE, &var, u, ord);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cmd_join(const tnode * tnext, void * data, struct order * ord)
|
cmd_join(const tnode * tnext, void * data, struct order * ord)
|
||||||
{
|
{
|
||||||
unit * u = (unit*)data;
|
create_transaction(ALLIANCE_JOIN, (unit*)data, ord);
|
||||||
alliance * al = findalliance(getid());
|
|
||||||
unused(tnext);
|
|
||||||
|
|
||||||
if (u->faction->alliance==al || al==NULL) {
|
|
||||||
/* TODO: error message */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
create_transaction(al, ALLIANCE_JOIN, NULL, u, ord);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
perform_kick(alliance * al)
|
perform_kick()
|
||||||
{
|
{
|
||||||
alliance_transaction ** tap = al->transactions+ALLIANCE_KICK;
|
alliance_transaction ** tap = transactions+ALLIANCE_KICK;
|
||||||
while (*tap) {
|
while (*tap) {
|
||||||
alliance_transaction * ta = *tap;
|
alliance_transaction * ta = *tap;
|
||||||
faction * f = ta->u->faction;
|
alliance * al = ta->u->faction->alliance;
|
||||||
setalliance(f, NULL);
|
|
||||||
|
if (al && alliance_leader(al)==ta->u->faction) {
|
||||||
|
faction * f;
|
||||||
|
init_tokens(ta->ord);
|
||||||
|
skip_token();
|
||||||
|
skip_token();
|
||||||
|
f = getfaction();
|
||||||
|
if (f && f->alliance==al) {
|
||||||
|
setalliance(f, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
*tap = ta->next;
|
*tap = ta->next;
|
||||||
free(ta);
|
free(ta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
perform_new(alliance * al)
|
perform_new(void)
|
||||||
{
|
{
|
||||||
alliance_transaction ** tap = al->transactions+ALLIANCE_LEAVE;
|
alliance_transaction ** tap = transactions+ALLIANCE_NEW;
|
||||||
while (*tap) {
|
while (*tap) {
|
||||||
alliance * al;
|
|
||||||
alliance_transaction * ta = *tap;
|
alliance_transaction * ta = *tap;
|
||||||
|
alliance * al;
|
||||||
|
int id;
|
||||||
faction * f = ta->u->faction;
|
faction * f = ta->u->faction;
|
||||||
int id = ta->userdata.i;
|
|
||||||
|
init_tokens(ta->ord);
|
||||||
|
skip_token();
|
||||||
|
skip_token();
|
||||||
|
id = getid();
|
||||||
|
|
||||||
do {
|
do {
|
||||||
id = id?id:(1 + (rng_int() % MAX_UNIT_NR));
|
id = id?id:(1 + (rng_int() % MAX_UNIT_NR));
|
||||||
for (al=alliances;al;al=al->next) {
|
for (al=alliances;al;al=al->next) {
|
||||||
|
@ -226,20 +194,18 @@ perform_new(alliance * al)
|
||||||
}
|
}
|
||||||
} while (id==0);
|
} while (id==0);
|
||||||
|
|
||||||
al = calloc(1, sizeof(alliance));
|
al = makealliance(id, itoa36(id));
|
||||||
al->id = id;
|
|
||||||
setalliance(f, al);
|
setalliance(f, al);
|
||||||
|
|
||||||
*tap = ta->next;
|
*tap = ta->next;
|
||||||
free(ta);
|
free(ta);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
perform_leave(alliance * al)
|
perform_leave(void)
|
||||||
{
|
{
|
||||||
alliance_transaction ** tap = al->transactions+ALLIANCE_LEAVE;
|
alliance_transaction ** tap = transactions+ALLIANCE_LEAVE;
|
||||||
while (*tap) {
|
while (*tap) {
|
||||||
alliance_transaction * ta = *tap;
|
alliance_transaction * ta = *tap;
|
||||||
faction * f = ta->u->faction;
|
faction * f = ta->u->faction;
|
||||||
|
@ -249,54 +215,76 @@ perform_leave(alliance * al)
|
||||||
*tap = ta->next;
|
*tap = ta->next;
|
||||||
free(ta);
|
free(ta);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
perform_transfer(alliance * al)
|
perform_transfer(void)
|
||||||
{
|
{
|
||||||
alliance_transaction ** tap = al->transactions+ALLIANCE_LEAVE;
|
alliance_transaction ** tap = transactions+ALLIANCE_TRANSFER;
|
||||||
while (*tap) {
|
while (*tap) {
|
||||||
alliance_transaction * ta = *tap;
|
alliance_transaction * ta = *tap;
|
||||||
faction * f = (faction *)ta->userdata.v;
|
alliance * al = ta->u->faction->alliance;
|
||||||
|
|
||||||
assert(f->alliance==al);
|
if (al && alliance_leader(al)==ta->u->faction) {
|
||||||
|
faction * f;
|
||||||
al->leader = f;
|
init_tokens(ta->ord);
|
||||||
|
skip_token();
|
||||||
*tap = ta->next;
|
skip_token();
|
||||||
free(ta);
|
f = getfaction();
|
||||||
}
|
if (f && f->alliance==al) {
|
||||||
|
al->leader = f;
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
perform_join(alliance * al)
|
|
||||||
{
|
|
||||||
alliance_transaction ** tap = al->transactions+ALLIANCE_JOIN;
|
|
||||||
while (*tap) {
|
|
||||||
alliance_transaction * ta = *tap;
|
|
||||||
faction * f = ta->u->faction;
|
|
||||||
if (f->alliance!=al) {
|
|
||||||
alliance_transaction ** tip = al->transactions+ALLIANCE_INVITE;
|
|
||||||
alliance_transaction * ti = *tip;
|
|
||||||
while (ti) {
|
|
||||||
if (ti->userdata.v==f) break;
|
|
||||||
tip = &ti->next;
|
|
||||||
ti = *tip;
|
|
||||||
}
|
|
||||||
if (ti) {
|
|
||||||
setalliance(f, al);
|
|
||||||
*tip = ti->next;
|
|
||||||
free(ti);
|
|
||||||
} else {
|
|
||||||
/* TODO: error message */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*tap = ta->next;
|
*tap = ta->next;
|
||||||
free(ta);
|
free(ta);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
perform_join(void)
|
||||||
|
{
|
||||||
|
alliance_transaction ** tap = transactions+ALLIANCE_JOIN;
|
||||||
|
while (*tap) {
|
||||||
|
alliance_transaction * ta = *tap;
|
||||||
|
faction * fj = ta->u->faction;
|
||||||
|
int aid;
|
||||||
|
|
||||||
|
init_tokens(ta->ord);
|
||||||
|
skip_token();
|
||||||
|
skip_token();
|
||||||
|
aid = getid();
|
||||||
|
if (aid) {
|
||||||
|
alliance * al = findalliance(aid);
|
||||||
|
if (al && fj->alliance!=al) {
|
||||||
|
alliance_transaction ** tip = transactions+ALLIANCE_INVITE;
|
||||||
|
alliance_transaction * ti = *tip;
|
||||||
|
while (ti) {
|
||||||
|
faction * fi = ti->u->faction;
|
||||||
|
if (fi->alliance==al) {
|
||||||
|
int fid;
|
||||||
|
init_tokens(ti->ord);
|
||||||
|
skip_token();
|
||||||
|
skip_token();
|
||||||
|
fid = getid();
|
||||||
|
if (fid==fj->no) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tip = &ti->next;
|
||||||
|
ti = *tip;
|
||||||
|
}
|
||||||
|
if (ti) {
|
||||||
|
setalliance(fj, al);
|
||||||
|
*tip = ti->next;
|
||||||
|
free(ti);
|
||||||
|
} else {
|
||||||
|
/* TODO: error message */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*tap = ta->next;
|
||||||
|
free(ta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -325,22 +313,11 @@ execute(const struct syntaxtree * syntax, keyword_t kwd)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (run) {
|
if (run) {
|
||||||
alliance * al;
|
perform_kick();
|
||||||
for (al=alliances;al;al=al->next) {
|
perform_leave();
|
||||||
perform_kick(al);
|
perform_transfer();
|
||||||
}
|
perform_new();
|
||||||
for (al=alliances;al;al=al->next) {
|
perform_join();
|
||||||
perform_leave(al);
|
|
||||||
}
|
|
||||||
for (al=alliances;al;al=al->next) {
|
|
||||||
perform_transfer(al);
|
|
||||||
}
|
|
||||||
for (al=alliances;al;al=al->next) {
|
|
||||||
perform_new(al);
|
|
||||||
}
|
|
||||||
for (al=alliances;al;al=al->next) {
|
|
||||||
perform_join(al);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,15 +328,16 @@ alliance_cmd(void)
|
||||||
if (stree==NULL) {
|
if (stree==NULL) {
|
||||||
syntaxtree * slang = stree = stree_create();
|
syntaxtree * slang = stree = stree_create();
|
||||||
while (slang) {
|
while (slang) {
|
||||||
struct tnode * root = calloc(sizeof(tnode), 1);
|
// struct tnode * root = calloc(sizeof(tnode), 1);
|
||||||
struct tnode * leaf = calloc(sizeof(tnode), 1);
|
struct tnode * leaf = calloc(sizeof(tnode), 1);
|
||||||
add_command(root, leaf, LOC(slang->lang, "alliance"), NULL);
|
// add_command(root, leaf, LOC(slang->lang, "alliance"), NULL);
|
||||||
add_command(leaf, NULL, LOC(slang->lang, "new"), &cmd_new);
|
add_command(leaf, NULL, LOC(slang->lang, "new"), &cmd_new);
|
||||||
add_command(leaf, NULL, LOC(slang->lang, "invite"), &cmd_invite);
|
add_command(leaf, NULL, LOC(slang->lang, "invite"), &cmd_invite);
|
||||||
add_command(leaf, NULL, LOC(slang->lang, "join"), &cmd_join);
|
add_command(leaf, NULL, LOC(slang->lang, "join"), &cmd_join);
|
||||||
add_command(leaf, NULL, LOC(slang->lang, "kick"), &cmd_kick);
|
add_command(leaf, NULL, LOC(slang->lang, "kick"), &cmd_kick);
|
||||||
add_command(leaf, NULL, LOC(slang->lang, "leave"), &cmd_new);
|
add_command(leaf, NULL, LOC(slang->lang, "leave"), &cmd_new);
|
||||||
add_command(leaf, NULL, LOC(slang->lang, "command"), &cmd_transfer);
|
add_command(leaf, NULL, LOC(slang->lang, "command"), &cmd_transfer);
|
||||||
|
slang->root = leaf;
|
||||||
slang = slang->next;
|
slang = slang->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -423,6 +401,7 @@ setalliance(struct faction * f, alliance * al)
|
||||||
if (al->leader==NULL) {
|
if (al->leader==NULL) {
|
||||||
al->leader = f;
|
al->leader = f;
|
||||||
}
|
}
|
||||||
|
flist = NULL;
|
||||||
}
|
}
|
||||||
free(flist);
|
free(flist);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,17 +24,20 @@ struct faction;
|
||||||
struct region;
|
struct region;
|
||||||
struct faction_list;
|
struct faction_list;
|
||||||
|
|
||||||
struct alliance_transaction;
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ALLIANCE_KICK, ALLIANCE_LEAVE, ALLIANCE_TRANSFER, ALLIANCE_NEW, ALLIANCE_INVITE, ALLIANCE_JOIN, ALLIANCE_MAX
|
ALLIANCE_KICK,
|
||||||
|
ALLIANCE_LEAVE,
|
||||||
|
ALLIANCE_TRANSFER,
|
||||||
|
ALLIANCE_NEW,
|
||||||
|
ALLIANCE_INVITE,
|
||||||
|
ALLIANCE_JOIN,
|
||||||
|
ALLIANCE_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct alliance {
|
typedef struct alliance {
|
||||||
struct alliance * next;
|
struct alliance * next;
|
||||||
struct faction * leader;
|
struct faction * leader;
|
||||||
struct faction_list * members;
|
struct faction_list * members;
|
||||||
struct alliance_transaction * transactions[ALLIANCE_MAX];
|
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
int id;
|
int id;
|
||||||
char * name;
|
char * name;
|
||||||
|
|
|
@ -28,46 +28,46 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
typedef struct command {
|
typedef struct command {
|
||||||
parser fun;
|
parser fun;
|
||||||
struct tnode * nodes;
|
struct tnode * nodes;
|
||||||
} command;
|
} command;
|
||||||
|
|
||||||
tnode *
|
tnode *
|
||||||
stree_find(const syntaxtree * stree, const struct locale * lang)
|
stree_find(const syntaxtree * stree, const struct locale * lang)
|
||||||
{
|
{
|
||||||
while (stree) {
|
while (stree) {
|
||||||
if (stree->lang==lang) return stree->root;
|
if (stree->lang==lang) return stree->root;
|
||||||
stree = stree->next;
|
stree = stree->next;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
syntaxtree *
|
syntaxtree *
|
||||||
stree_create(void)
|
stree_create(void)
|
||||||
{
|
{
|
||||||
syntaxtree * sroot = NULL;
|
syntaxtree * sroot = NULL;
|
||||||
const struct locale * lang = locales;
|
const struct locale * lang = locales;
|
||||||
while (lang) {
|
while (lang) {
|
||||||
syntaxtree * stree = (syntaxtree *)malloc(sizeof(syntaxtree));
|
syntaxtree * stree = (syntaxtree *)malloc(sizeof(syntaxtree));
|
||||||
stree->lang = lang;
|
stree->lang = lang;
|
||||||
stree->next = sroot;
|
stree->next = sroot;
|
||||||
sroot=stree;
|
sroot=stree;
|
||||||
lang=nextlocale(lang);
|
lang=nextlocale(lang);
|
||||||
}
|
}
|
||||||
return sroot;
|
return sroot;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
add_command(struct tnode * keys, struct tnode * tnext,
|
add_command(struct tnode * keys, struct tnode * tnext,
|
||||||
const char * str, parser fun)
|
const char * str, parser fun)
|
||||||
{
|
{
|
||||||
command * cmd = (command *)malloc(sizeof(command));
|
command * cmd = (command *)malloc(sizeof(command));
|
||||||
variant var;
|
variant var;
|
||||||
|
|
||||||
cmd->fun = fun;
|
cmd->fun = fun;
|
||||||
cmd->nodes = tnext;
|
cmd->nodes = tnext;
|
||||||
var.v = cmd;
|
var.v = cmd;
|
||||||
addtoken(keys, str, var);
|
addtoken(keys, str, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -97,7 +97,7 @@ do_command(const struct tnode * keys, void * u, struct order * ord)
|
||||||
skip_token();
|
skip_token();
|
||||||
if (do_command_i(keys, u, ord)!=E_TOK_SUCCESS) {
|
if (do_command_i(keys, u, ord)!=E_TOK_SUCCESS) {
|
||||||
char * cmd = getcommand(ord);
|
char * cmd = getcommand(ord);
|
||||||
log_warning(("%s failed GM command '%s'\n", unitname(u), cmd));
|
log_warning(("%s failed command '%s'\n", unitname(u), cmd));
|
||||||
free(cmd);
|
free(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -545,22 +545,21 @@ read_items(struct storage * store, item **ilist)
|
||||||
static void
|
static void
|
||||||
read_alliances(struct storage * store)
|
read_alliances(struct storage * store)
|
||||||
{
|
{
|
||||||
char pbuf[32];
|
int id;
|
||||||
|
|
||||||
if (store->version<SAVEALLIANCE_VERSION) {
|
if (store->version<SAVEALLIANCE_VERSION) {
|
||||||
if (!AllianceRestricted() && !AllianceAuto()) return;
|
if (!AllianceRestricted() && !AllianceAuto()) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
store->r_str_buf(store, pbuf, sizeof(pbuf));
|
id = store->r_id(store);
|
||||||
while (strcmp(pbuf, "end")!=0) {
|
while (id!=0) {
|
||||||
char aname[128];
|
char aname[128];
|
||||||
alliance * al;
|
alliance * al;
|
||||||
store->r_str_buf(store, aname, sizeof(aname));
|
store->r_str_buf(store, aname, sizeof(aname));
|
||||||
al = makealliance(atoi36(pbuf), aname);
|
al = makealliance(id, aname);
|
||||||
if (store->version>=ALLIANCELEADER_VERSION) {
|
if (store->version>=ALLIANCELEADER_VERSION) {
|
||||||
read_reference(&al->leader, store, read_faction_reference, resolve_faction);
|
read_reference(&al->leader, store, read_faction_reference, resolve_faction);
|
||||||
}
|
}
|
||||||
store->r_str_buf(store, pbuf, sizeof(pbuf));
|
id = store->r_id(store);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,15 +570,15 @@ write_alliances(struct storage * store)
|
||||||
while (al) {
|
while (al) {
|
||||||
if (al->leader) {
|
if (al->leader) {
|
||||||
store->w_id(store, al->id);
|
store->w_id(store, al->id);
|
||||||
store->w_tok(store, al->name);
|
store->w_str(store, al->name);
|
||||||
if (store->version>=ALLIANCELEADER_VERSION) {
|
if (store->version>=ALLIANCELEADER_VERSION) {
|
||||||
write_faction_reference(al->leader, store);
|
write_faction_reference(al->leader, store);
|
||||||
}
|
}
|
||||||
|
store->w_brk(store);
|
||||||
}
|
}
|
||||||
al = al->next;
|
al = al->next;
|
||||||
store->w_brk(store);
|
|
||||||
}
|
}
|
||||||
store->w_tok(store, "end");
|
store->w_id(store, 0);
|
||||||
store->w_brk(store);
|
store->w_brk(store);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1593,6 +1592,7 @@ writegame(const char *filename, int mode)
|
||||||
char path[MAX_PATH];
|
char path[MAX_PATH];
|
||||||
storage my_store = (mode==IO_BINARY)?binary_store:text_store;
|
storage my_store = (mode==IO_BINARY)?binary_store:text_store;
|
||||||
storage * store = &my_store;
|
storage * store = &my_store;
|
||||||
|
store->version = RELEASE_VERSION;
|
||||||
|
|
||||||
sprintf(path, "%s/%s", datapath(), filename);
|
sprintf(path, "%s/%s", datapath(), filename);
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
|
|
|
@ -64,4 +64,4 @@
|
||||||
#define ALLIANCELEADER_VERSION 333 /* alliances have a leader */
|
#define ALLIANCELEADER_VERSION 333 /* alliances have a leader */
|
||||||
|
|
||||||
#define MIN_VERSION CURSETYPE_VERSION /* minimal datafile we support */
|
#define MIN_VERSION CURSETYPE_VERSION /* minimal datafile we support */
|
||||||
#define RELEASE_VERSION REGIONOWNER_VERSION /* current datafile */
|
#define RELEASE_VERSION ALLIANCELEADER_VERSION /* current datafile */
|
||||||
|
|
|
@ -177,20 +177,21 @@ xml_readconstruction(xmlXPathContextPtr xpath, xmlNodeSetPtr nodeSet, constructi
|
||||||
construction * con;
|
construction * con;
|
||||||
xmlXPathObjectPtr req;
|
xmlXPathObjectPtr req;
|
||||||
int m;
|
int m;
|
||||||
|
skill_t sk = NOSKILL;
|
||||||
assert(*consPtr==NULL);
|
|
||||||
*consPtr = con = calloc(sizeof(construction), 1);
|
|
||||||
consPtr = &con->improvement;
|
|
||||||
|
|
||||||
propValue = xmlGetProp(node, BAD_CAST "skill");
|
propValue = xmlGetProp(node, BAD_CAST "skill");
|
||||||
if (propValue!=NULL) {
|
if (propValue!=NULL) {
|
||||||
con->skill = sk_find((const char*)propValue);
|
sk = sk_find((const char*)propValue);
|
||||||
assert(con->skill!=NOSKILL);
|
assert(sk!=NOSKILL);
|
||||||
xmlFree(propValue);
|
xmlFree(propValue);
|
||||||
} else {
|
|
||||||
con->skill = NOSKILL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(*consPtr==NULL);
|
||||||
|
|
||||||
|
*consPtr = con = calloc(sizeof(construction), 1);
|
||||||
|
consPtr = &con->improvement;
|
||||||
|
|
||||||
|
con->skill = sk;
|
||||||
con->maxsize = xml_ivalue(node, "maxsize", -1);
|
con->maxsize = xml_ivalue(node, "maxsize", -1);
|
||||||
con->minskill = xml_ivalue(node, "minskill", -1);
|
con->minskill = xml_ivalue(node, "minskill", -1);
|
||||||
con->reqsize = xml_ivalue(node, "reqsize", -1);
|
con->reqsize = xml_ivalue(node, "reqsize", -1);
|
||||||
|
@ -1686,9 +1687,9 @@ parse_races(xmlDocPtr doc)
|
||||||
assert(propValue!=NULL);
|
assert(propValue!=NULL);
|
||||||
frc = rc_find((const char *)propValue);
|
frc = rc_find((const char *)propValue);
|
||||||
if (frc == NULL) {
|
if (frc == NULL) {
|
||||||
log_error(("%s not registered, is familiar for %s\n",
|
// log_error(("%s not registered, is familiar for %s\n",
|
||||||
(const char*)propValue, rc->_name[0]));
|
// (const char*)propValue, rc->_name[0]));
|
||||||
assert(frc!=NULL);
|
// assert(frc!=NULL);
|
||||||
frc = rc_add(rc_new((const char*)propValue));
|
frc = rc_add(rc_new((const char*)propValue));
|
||||||
}
|
}
|
||||||
if (xml_bvalue(node, "default", false)) {
|
if (xml_bvalue(node, "default", false)) {
|
||||||
|
|
|
@ -829,10 +829,12 @@ tolua_unit_create(lua_State* tolua_S)
|
||||||
faction * f = (faction *)tolua_tousertype(tolua_S, 1, 0);
|
faction * f = (faction *)tolua_tousertype(tolua_S, 1, 0);
|
||||||
region * r = (region *)tolua_tousertype(tolua_S, 2, 0);
|
region * r = (region *)tolua_tousertype(tolua_S, 2, 0);
|
||||||
int num = (int)tolua_tonumber(tolua_S, 3, 0);
|
int num = (int)tolua_tonumber(tolua_S, 3, 0);
|
||||||
unit * u = create_unit(r, f, num, f->race, 0, NULL, NULL);
|
if (f && r) {
|
||||||
|
unit * u = create_unit(r, f, num, f->race, 0, NULL, NULL);
|
||||||
tolua_pushusertype(tolua_S, u, "unit");
|
tolua_pushusertype(tolua_S, u, "unit");
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
89
src/res/common/herbs.xml
Normal file
89
src/res/common/herbs.xml
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resources>
|
||||||
|
<!-- this file contains herbs that are part of the alchemy system -->
|
||||||
|
|
||||||
|
<resource name="h0" appearance="herbbag"><!-- Flachwurz -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h1" appearance="herbbag"><!-- Würziger Wagemut -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h2" appearance="herbbag"><!-- Eulenauge -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h3" appearance="herbbag"><!-- Grüner Spinnerich -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h4" appearance="herbbag"><!-- Blauer Baumringel -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h5" appearance="herbbag"><!-- Elfenlieb -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h6" appearance="herbbag"><!-- Gurgelkraut -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h7" appearance="herbbag"><!-- Knotiger Saugwurz -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h8" appearance="herbbag"><!-- Blasenmorchel -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h9" appearance="herbbag"><!-- Wasserfinder -->
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h10" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h11" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h12" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h13" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h14" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h15" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h16" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h17" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h18" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h19" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="h20" appearance="herbbag">
|
||||||
|
<item weight="0" score="10" herb="yes"/>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
</resources>
|
|
@ -1,91 +1,6 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- this file contains potions and herbs that are part of the alchemy system -->
|
<!-- this file contains potions that are part of the alchemy system -->
|
||||||
|
|
||||||
<!-- 21 stupidly named herbs -->
|
|
||||||
<resource name="h0" appearance="herbbag"><!-- Flachwurz -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h1" appearance="herbbag"><!-- Würziger Wagemut -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h2" appearance="herbbag"><!-- Eulenauge -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h3" appearance="herbbag"><!-- Grüner Spinnerich -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h4" appearance="herbbag"><!-- Blauer Baumringel -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h5" appearance="herbbag"><!-- Elfenlieb -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h6" appearance="herbbag"><!-- Gurgelkraut -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h7" appearance="herbbag"><!-- Knotiger Saugwurz -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h8" appearance="herbbag"><!-- Blasenmorchel -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h9" appearance="herbbag"><!-- Wasserfinder -->
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h10" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h11" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h12" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h13" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h14" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h15" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h16" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h17" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h18" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h19" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="h20" appearance="herbbag">
|
|
||||||
<item weight="0" score="10" herb="yes"/>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<!-- potions -->
|
<!-- potions -->
|
||||||
<resource name="p0" appearance="vial">
|
<resource name="p0" appearance="vial">
|
||||||
|
|
|
@ -1,276 +1,25 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<resources>
|
<resources xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<!-- this file contains a lot of weapons -->
|
<!-- this file contains a lot of weapons -->
|
||||||
<resource name="mallornbow">
|
<xi:include href="../weapons/axe.xml"/>
|
||||||
<item weight="100">
|
<xi:include href="../weapons/bow.xml"/>
|
||||||
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
<xi:include href="../weapons/catapult.xml"/>
|
||||||
<requirement type="mallorn" quantity="1"/>
|
<xi:include href="../weapons/crossbow.xml"/>
|
||||||
</construction>
|
<xi:include href="../weapons/firesword.xml"/>
|
||||||
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.15">
|
<xi:include href="../weapons/greatbow.xml"/>
|
||||||
<damage type="rider" value="1d11+2"/>
|
<xi:include href="../weapons/greatsword.xml"/>
|
||||||
<damage type="footman" value="1d11+2"/>
|
<xi:include href="../weapons/halberd.xml"/>
|
||||||
<modifier type="missile_target" value="2"/>
|
<xi:include href="../weapons/laensword.xml"/>
|
||||||
<modifier type="damage" value="1">
|
<xi:include href="../weapons/lance.xml"/>
|
||||||
<race name="elf"/>
|
<xi:include href="../weapons/mallornbow.xml"/>
|
||||||
</modifier>
|
<xi:include href="../weapons/mallorncrossbow.xml"/>
|
||||||
</weapon>
|
<xi:include href="../weapons/mallornlance.xml"/>
|
||||||
</item>
|
<xi:include href="../weapons/mallornspear.xml"/>
|
||||||
</resource>
|
<xi:include href="../weapons/runesword.xml"/>
|
||||||
|
<xi:include href="../weapons/rustyaxe.xml"/>
|
||||||
<resource name="laensword">
|
<xi:include href="../weapons/rustygreatsword.xml"/>
|
||||||
<item weight="100" score="400">
|
<xi:include href="../weapons/rustyhalberd.xml"/>
|
||||||
<construction skill="weaponsmithing" minskill="8" reqsize="1">
|
<xi:include href="../weapons/rustysword.xml"/>
|
||||||
<requirement type="laen" quantity="1"/>
|
<xi:include href="../weapons/spear.xml"/>
|
||||||
</construction>
|
<xi:include href="../weapons/sword.xml"/>
|
||||||
<weapon cut="true" skill="melee" offmod="1" defmod="1" magres="0.30">
|
|
||||||
<damage type="rider" value="3d6+10"/>
|
|
||||||
<damage type="footman" value="3d6+10"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="rustygreatsword">
|
|
||||||
<item weight="200" score="20">
|
|
||||||
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
|
||||||
<requirement type="iron" quantity="2"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="melee" offmod="-2" defmod="-3">
|
|
||||||
<damage type="rider" value="2d8"/>
|
|
||||||
<damage type="footman" value="2d8"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="runesword">
|
|
||||||
<item weight="100" score="2000">
|
|
||||||
<weapon minskill="7" cut="true" magical="yes" skill="melee" offmod="2" defmod="2">
|
|
||||||
<function name="attack" value="attack_firesword"/>
|
|
||||||
<damage type="rider" value="3d10+10"/>
|
|
||||||
<damage type="footman" value="3d10+10"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="firesword">
|
|
||||||
<item weight="100">
|
|
||||||
<weapon minskill="7" magres="0.3" cut="true" skill="melee" offmod="1" defmod="1">
|
|
||||||
<function name="attack" value="attack_firesword"/>
|
|
||||||
<damage type="rider" value="3d6+10"/>
|
|
||||||
<damage type="footman" value="3d6+10"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="greatsword">
|
|
||||||
<item weight="200" score="30">
|
|
||||||
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
|
||||||
<requirement type="iron" quantity="2"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="melee" offmod="-1" defmod="-2">
|
|
||||||
<damage type="rider" value="2d8+3"/>
|
|
||||||
<damage type="footman" value="2d8+3"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="sword">
|
|
||||||
<item weight="100" score="30">
|
|
||||||
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
|
||||||
<requirement type="iron" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="melee">
|
|
||||||
<damage type="rider" value="1d9+2"/>
|
|
||||||
<damage type="footman" value="1d9+2"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="greatbow">
|
|
||||||
<item weight="100">
|
|
||||||
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
|
||||||
<modifier function="mod_elves_only"/>
|
|
||||||
<requirement type="mallorn" quantity="2"/>
|
|
||||||
</construction>
|
|
||||||
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.0">
|
|
||||||
<damage type="rider" value="2d6+4"/>
|
|
||||||
<damage type="footman" value="2d6+4"/>
|
|
||||||
<modifier type="missile_target" value="2"/>
|
|
||||||
<modifier type="damage" value="1">
|
|
||||||
<race name="elf"/>
|
|
||||||
</modifier>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="halberd">
|
|
||||||
<item weight="200">
|
|
||||||
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
|
||||||
<requirement type="log" quantity="2"/>
|
|
||||||
<requirement type="iron" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="polearm" offmod="-1" defmod="2" magres="0.0">
|
|
||||||
<damage type="rider" value="2d6+3"/>
|
|
||||||
<damage type="footman" value="2d6+3"/>
|
|
||||||
<modifier type="skill" value="1" walking="true" against_riding="true" defensive="true"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="rustyhalberd">
|
|
||||||
<item weight="200" score="20">
|
|
||||||
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
|
||||||
<requirement type="iron" quantity="1"/>
|
|
||||||
<requirement type="log" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="polearm" offmod="-2" defmod="-1">
|
|
||||||
<damage type="rider" value="2d6"/>
|
|
||||||
<damage type="footman" value="2d6"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="rustysword">
|
|
||||||
<item weight="100" score="10">
|
|
||||||
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
|
||||||
<requirement type="iron" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="melee" offmod="-1" defmod="-1">
|
|
||||||
<damage type="rider" value="1d9"/>
|
|
||||||
<damage type="footman" value="1d9"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="axe">
|
|
||||||
<item weight="200">
|
|
||||||
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
|
||||||
<requirement type="log" quantity="1"/>
|
|
||||||
<requirement type="iron" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="melee" offmod="1" defmod="-2">
|
|
||||||
<damage type="rider" value="2d6+4"/>
|
|
||||||
<damage type="footman" value="2d6+4"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="rustyaxe">
|
|
||||||
<item weight="200">
|
|
||||||
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
|
||||||
<requirement type="log" quantity="1"/>
|
|
||||||
<requirement type="iron" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="melee" offmod="0" defmod="-3">
|
|
||||||
<damage type="rider" value="2d6"/>
|
|
||||||
<damage type="footman" value="2d6"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="bow">
|
|
||||||
<item weight="100">
|
|
||||||
<construction skill="weaponsmithing" minskill="2" reqsize="1">
|
|
||||||
<requirement type="log" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0">
|
|
||||||
<damage type="rider" value="1d11+1"/>
|
|
||||||
<damage type="footman" value="1d11+1"/>
|
|
||||||
<modifier type="missile_target" value="2"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="catapult">
|
|
||||||
<item weight="10000">
|
|
||||||
<construction skill="cartmaking" minskill="5" reqsize="1">
|
|
||||||
<requirement type="log" quantity="10"/>
|
|
||||||
</construction>
|
|
||||||
<weapon siege="true" bash="true" missile="true" skill="catapult" offmod="0" defmod="0" reload="5">
|
|
||||||
<damage type="rider" value="3d10+5"/>
|
|
||||||
<damage type="footman" value="3d10+5"/>
|
|
||||||
<modifier type="missile_target" value="4"/>
|
|
||||||
<function name="attack" value="attack_catapult"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="crossbow">
|
|
||||||
<item weight="100">
|
|
||||||
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
|
||||||
<requirement type="log" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2">
|
|
||||||
<damage type="rider" value="3d3+5"/>
|
|
||||||
<damage type="footman" value="3d3+5"/>
|
|
||||||
<modifier type="missile_target" value="2"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="mallorncrossbow">
|
|
||||||
<item weight="100">
|
|
||||||
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
|
||||||
<requirement type="mallorn" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2" magres="0.15">
|
|
||||||
<damage type="rider" value="3d3+5"/>
|
|
||||||
<damage type="footman" value="3d3+5"/>
|
|
||||||
<modifier type="missile_target" value="2"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="spear">
|
|
||||||
<item weight="100">
|
|
||||||
<construction skill="weaponsmithing" minskill="2" reqsize="1">
|
|
||||||
<requirement type="log" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon pierce="true" skill="polearm" offmod="0" defmod="0">
|
|
||||||
<damage type="footman" value="1d10"/>
|
|
||||||
<damage type="rider" value="1d12+2"/>
|
|
||||||
<modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/>
|
|
||||||
<modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="mallornspear">
|
|
||||||
<item weight="100">
|
|
||||||
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
|
||||||
<requirement type="mallorn" quantity="1"/>
|
|
||||||
</construction>
|
|
||||||
<weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15">
|
|
||||||
<damage type="footman" value="1d10+1"/>
|
|
||||||
<damage type="rider" value="1d12+3"/>
|
|
||||||
<modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/>
|
|
||||||
<modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="lance">
|
|
||||||
<item weight="200">
|
|
||||||
<construction skill="weaponsmithing" minskill="2" reqsize="1">
|
|
||||||
<requirement type="log" quantity="2"/>
|
|
||||||
</construction>
|
|
||||||
<weapon pierce="true" skill="polearm" offmod="0" defmod="-2">
|
|
||||||
<damage type="footman" value="1d5"/>
|
|
||||||
<damage type="rider" value="2d6+5"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="mallornlance">
|
|
||||||
<item weight="100">
|
|
||||||
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
|
||||||
<requirement type="mallorn" quantity="2"/>
|
|
||||||
</construction>
|
|
||||||
<weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15">
|
|
||||||
<damage type="footman" value="1d5+1"/>
|
|
||||||
<damage type="rider" value="2d6+6"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -6736,8 +6736,8 @@
|
||||||
<text locale="en">JOIN</text>
|
<text locale="en">JOIN</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="invite">
|
<string name="invite">
|
||||||
<text locale="de">AUFNEHEMEN</text>
|
<text locale="de">EINLADEN</text>
|
||||||
<text locale="en">JOIN</text>
|
<text locale="en">INVITE</text>
|
||||||
</string>
|
</string>
|
||||||
<string name="rm_stone">
|
<string name="rm_stone">
|
||||||
<text locale="de">Steine</text>
|
<text locale="de">Steine</text>
|
||||||
|
|
|
@ -8,10 +8,11 @@
|
||||||
|
|
||||||
<xi:include href="common/items.xml" />
|
<xi:include href="common/items.xml" />
|
||||||
<xi:include href="common/armor.xml" />
|
<xi:include href="common/armor.xml" />
|
||||||
<xi:include href="common/weapons.xml" />
|
<!-- xi:include href="common/weapons.xml" /-->
|
||||||
<xi:include href="common/resources.xml" />
|
<xi:include href="common/resources.xml" />
|
||||||
<xi:include href="common/luxuries.xml" />
|
<xi:include href="common/luxuries.xml" />
|
||||||
<xi:include href="common/potions.xml" />
|
<xi:include href="common/herbs.xml" />
|
||||||
|
<!-- xi:include href="common/potions.xml" /-->
|
||||||
<xi:include href="spoils.xml"/>
|
<xi:include href="spoils.xml"/>
|
||||||
<xi:include href="prefixes.xml"/>
|
<xi:include href="prefixes.xml"/>
|
||||||
<xi:include href="ships.xml"/>
|
<xi:include href="ships.xml"/>
|
||||||
|
@ -23,6 +24,7 @@
|
||||||
<xi:include href="directions.xml"/>
|
<xi:include href="directions.xml"/>
|
||||||
|
|
||||||
<xi:include href="e2k9/weapons.xml" />
|
<xi:include href="e2k9/weapons.xml" />
|
||||||
|
<xi:include href="e2k9/items.xml" />
|
||||||
<xi:include href="e2k9/strings.xml"/>
|
<xi:include href="e2k9/strings.xml"/>
|
||||||
<xi:include href="e2k9/races.xml"/>
|
<xi:include href="e2k9/races.xml"/>
|
||||||
<xi:include href="e2k9/buildings.xml"/>
|
<xi:include href="e2k9/buildings.xml"/>
|
||||||
|
@ -109,7 +111,7 @@
|
||||||
<param name="entertain.base" value="0"/>
|
<param name="entertain.base" value="0"/>
|
||||||
<param name="entertain.perlevel" value="20"/>
|
<param name="entertain.perlevel" value="20"/>
|
||||||
<param name="nmr.timeout" value="5"/>
|
<param name="nmr.timeout" value="5"/>
|
||||||
<param name="nmr.removenewbie" value="10"/>
|
<param name="nmr.removenewbie" value="0"/>
|
||||||
<param name="GiveRestriction" value="3"/>
|
<param name="GiveRestriction" value="3"/>
|
||||||
<param name="hunger.long" value="0"/>
|
<param name="hunger.long" value="0"/>
|
||||||
<param name="hunger.damage" value="1d9+9"/>
|
<param name="hunger.damage" value="1d9+9"/>
|
||||||
|
|
|
@ -1,6 +1,20 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
|
<resource name="p2" appearance="vial">
|
||||||
|
<item weight="0" score="30">
|
||||||
|
<function name="use" value="usepotion"/>
|
||||||
|
<potion level="1"/>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="p10" appearance="vial">
|
||||||
|
<item weight="0" score="90">
|
||||||
|
<function name="use" value="usepotion"/>
|
||||||
|
<potion level="3"/>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
<resource name="charger">
|
<resource name="charger">
|
||||||
<item big="yes" weight="5000" score="10" capacity="7000" animal="yes">
|
<item big="yes" weight="5000" score="10" capacity="7000" animal="yes">
|
||||||
<construction skill="training" minskill="4" reqsize="1">
|
<construction skill="training" minskill="4" reqsize="1">
|
||||||
|
|
|
@ -558,6 +558,7 @@
|
||||||
<attack type="4" damage="2d4"/>
|
<attack type="4" damage="2d4"/>
|
||||||
<attack type="6" spell="fiery_dragonbreath"/>
|
<attack type="6" spell="fiery_dragonbreath"/>
|
||||||
</race>
|
</race>
|
||||||
|
|
||||||
<race name="rat" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="100" capacity="540" speed="1.000000" hp="10" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" walk="yes" teach="no" giveitem="yes" getitem="yes">
|
<race name="rat" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="100" capacity="540" speed="1.000000" hp="10" damage="1d4" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" walk="yes" teach="no" giveitem="yes" getitem="yes">
|
||||||
<ai splitsize="9999"/>
|
<ai splitsize="9999"/>
|
||||||
<function name="initfamiliar" value="oldfamiliars"/>
|
<function name="initfamiliar" value="oldfamiliars"/>
|
||||||
|
@ -996,34 +997,12 @@
|
||||||
<attack type="1" damage="1d7"/>
|
<attack type="1" damage="1d7"/>
|
||||||
</race>
|
</race>
|
||||||
|
|
||||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
|
||||||
<skill name="crossbow" modifier="1"/>
|
|
||||||
<skill name="mining" modifier="-3"/>
|
|
||||||
<skill name="bow" modifier="1"/>
|
|
||||||
<skill name="building" modifier="-2"/>
|
|
||||||
<skill name="catapult" modifier="-2"/>
|
|
||||||
<skill name="herbalism" modifier="1"/>
|
|
||||||
<skill name="training" modifier="4"/>
|
|
||||||
<skill name="armorer" modifier="-1"/>
|
|
||||||
<skill name="shipcraft" modifier="-4"/>
|
|
||||||
<skill name="sailing" modifier="-4"/>
|
|
||||||
<skill name="polearm" modifier="1"/>
|
|
||||||
<skill name="quarrying" modifier="-1"/>
|
|
||||||
<skill name="weaponsmithing" modifier="1"/>
|
|
||||||
<skill name="cartmaking" modifier="1"/>
|
|
||||||
<attack type="1" damage="2d5"/>
|
|
||||||
<familiar race="eagle" default="yes"/>
|
|
||||||
<familiar race="fairy"/>
|
|
||||||
<familiar race="owl"/>
|
|
||||||
<familiar race="unicorn"/>
|
|
||||||
<familiar race="nymph"/>
|
|
||||||
<familiar race="imp"/>
|
|
||||||
</race>
|
|
||||||
<race name="shadowknight" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="1000" capacity="540" speed="1.000000" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noblock="yes">
|
<race name="shadowknight" magres="0.000000" maxaura="0.000000" regaura="0.000000" weight="1000" capacity="540" speed="1.000000" hp="1" damage="1d1" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noblock="yes">
|
||||||
<ai splitsize="20000" moverandom="yes"/>
|
<ai splitsize="20000" moverandom="yes"/>
|
||||||
<function name="name" value="namegeneric"/>
|
<function name="name" value="namegeneric"/>
|
||||||
<attack type="1" damage="1d1"/>
|
<attack type="1" damage="1d1"/>
|
||||||
</race>
|
</race>
|
||||||
|
|
||||||
<race name="seaserpent" magres="0.500000" maxaura="1.000000" regaura="1.000000" weight="20000" capacity="5000" speed="1.000000" hp="600" ac="3" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" swim="yes" teach="no" getitem="yes" resistbash="yes">
|
<race name="seaserpent" magres="0.500000" maxaura="1.000000" regaura="1.000000" weight="20000" capacity="5000" speed="1.000000" hp="600" ac="3" damage="2d15" unarmedattack="0" unarmeddefense="0" attackmodifier="4" defensemodifier="4" scarepeasants="yes" swim="yes" teach="no" getitem="yes" resistbash="yes">
|
||||||
<ai splitsize="6" killpeasants="yes" moverandom="yes" learn="yes"/>
|
<ai splitsize="6" killpeasants="yes" moverandom="yes" learn="yes"/>
|
||||||
<function name="name" value="namegeneric"/>
|
<function name="name" value="namegeneric"/>
|
||||||
|
@ -1078,4 +1057,4 @@
|
||||||
<attack type="2" damage="2d60"/>
|
<attack type="2" damage="2d60"/>
|
||||||
</race>
|
</race>
|
||||||
|
|
||||||
</races>
|
</races>
|
||||||
|
|
|
@ -28,4 +28,4 @@
|
||||||
<text locale="de">Streitrösser</text>
|
<text locale="de">Streitrösser</text>
|
||||||
<text locale="en">chargers</text>
|
<text locale="en">chargers</text>
|
||||||
</string>
|
</string>
|
||||||
</string>
|
</strings>
|
||||||
|
|
|
@ -1,55 +1,24 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<resources>
|
<resources xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<!-- this file contains a lot of weapons -->
|
<xi:include href="../weapons/axe.xml"/>
|
||||||
<resource name="halberd">
|
<xi:include href="../weapons/bow.xml"/>
|
||||||
<item weight="200">
|
<xi:include href="../weapons/catapult.xml"/>
|
||||||
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
<xi:include href="../weapons/crossbow.xml"/>
|
||||||
<requirement type="log" quantity="2"/>
|
<xi:include href="../weapons/firesword.xml"/>
|
||||||
<requirement type="iron" quantity="1"/>
|
<xi:include href="../weapons/greatbow.xml"/>
|
||||||
</construction>
|
<xi:include href="../weapons/greatsword-2.xml"/>
|
||||||
<weapon cut="true" skill="polearm" offmod="-1" defmod="2" magres="0.0" horse="false">
|
<xi:include href="../weapons/halberd-2.xml"/>
|
||||||
<damage type="rider" value="2d6+3"/>
|
<xi:include href="../weapons/laensword.xml"/>
|
||||||
<damage type="footman" value="2d6+3"/>
|
<xi:include href="../weapons/lance.xml"/>
|
||||||
<modifier type="skill" value="1" walking="true" against_riding="true" defensive="true"/>
|
<xi:include href="../weapons/mallornbow.xml"/>
|
||||||
</weapon>
|
<xi:include href="../weapons/mallorncrossbow.xml"/>
|
||||||
</item>
|
<xi:include href="../weapons/mallornlance.xml"/>
|
||||||
</resource>
|
<xi:include href="../weapons/mallornspear.xml"/>
|
||||||
|
<xi:include href="../weapons/runesword.xml"/>
|
||||||
<resource name="rustyhalberd">
|
<xi:include href="../weapons/rustyaxe.xml"/>
|
||||||
<item weight="200" score="20">
|
<xi:include href="../weapons/rustygreatsword-2.xml"/>
|
||||||
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
<xi:include href="../weapons/rustyhalberd-2.xml"/>
|
||||||
<requirement type="iron" quantity="1"/>
|
<xi:include href="../weapons/rustysword.xml"/>
|
||||||
<requirement type="log" quantity="1"/>
|
<xi:include href="../weapons/spear.xml"/>
|
||||||
</construction>
|
<xi:include href="../weapons/sword.xml"/>
|
||||||
<weapon cut="true" skill="polearm" offmod="-2" defmod="-1" horse="false">
|
|
||||||
<damage type="rider" value="2d6"/>
|
|
||||||
<damage type="footman" value="2d6"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="greatsword">
|
|
||||||
<item weight="200" score="30">
|
|
||||||
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
|
||||||
<requirement type="iron" quantity="2"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="melee" offmod="-1" defmod="-2" horse="false">
|
|
||||||
<damage type="rider" value="2d8+3"/>
|
|
||||||
<damage type="footman" value="2d8+3"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
<resource name="rustygreatsword">
|
|
||||||
<item weight="200" score="20">
|
|
||||||
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
|
||||||
<requirement type="iron" quantity="2"/>
|
|
||||||
</construction>
|
|
||||||
<weapon cut="true" skill="melee" offmod="-2" defmod="-3" horse="false">
|
|
||||||
<damage type="rider" value="2d8"/>
|
|
||||||
<damage type="footman" value="2d8"/>
|
|
||||||
</weapon>
|
|
||||||
</item>
|
|
||||||
</resource>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<xi:include href="common/weapons.xml" />
|
<xi:include href="common/weapons.xml" />
|
||||||
<xi:include href="common/resources.xml" />
|
<xi:include href="common/resources.xml" />
|
||||||
<xi:include href="common/luxuries.xml" />
|
<xi:include href="common/luxuries.xml" />
|
||||||
|
<xi:include href="common/herbs.xml" />
|
||||||
<xi:include href="common/potions.xml" />
|
<xi:include href="common/potions.xml" />
|
||||||
<xi:include href="spoils.xml"/>
|
<xi:include href="spoils.xml"/>
|
||||||
<xi:include href="races.xml"/>
|
<xi:include href="races.xml"/>
|
||||||
|
|
14
src/res/eressea/equipment.xml
Normal file
14
src/res/eressea/equipment.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<equipment>
|
||||||
|
|
||||||
|
<set name="new_uruk_unit">
|
||||||
|
<skill name="polearm" level="1"/>
|
||||||
|
<skill name="melee" level="1"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
<set name="new_centaur_unit">
|
||||||
|
<skill name="polearm" level="1"/>
|
||||||
|
<skill name="melee" level="1"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
</equipment>
|
38
src/res/eressea2/equipment.xml
Normal file
38
src/res/eressea2/equipment.xml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<equipment>
|
||||||
|
|
||||||
|
<set name="t1_t0_sword">
|
||||||
|
<skill name="melee" level="1"/>
|
||||||
|
<skill name="magic" level="1"/>
|
||||||
|
<item name="sword" amount="1"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
<set name="t1_t1_sword">
|
||||||
|
<skill name="melee" level="1"/>
|
||||||
|
<skill name="stamina" level="1"/>
|
||||||
|
<skill name="magic" level="1"/>
|
||||||
|
<item name="sword" amount="1"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
<set name="t5_t0_sword">
|
||||||
|
<skill name="melee" level="5"/>
|
||||||
|
<skill name="magic" level="1"/>
|
||||||
|
<item name="sword" amount="1"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
<set name="t5_t5_sword">
|
||||||
|
<skill name="melee" level="5"/>
|
||||||
|
<skill name="stamina" level="5"/>
|
||||||
|
<skill name="magic" level="1"/>
|
||||||
|
<item name="sword" amount="1"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
<set name="t5_t5_sword_plate">
|
||||||
|
<skill name="melee" level="5"/>
|
||||||
|
<skill name="stamina" level="5"/>
|
||||||
|
<skill name="magic" level="1"/>
|
||||||
|
<item name="sword" amount="1"/>
|
||||||
|
<item name="plate" amount="1"/>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
</equipment>
|
275
src/res/eressea2/weapons.xml
Normal file
275
src/res/eressea2/weapons.xml
Normal file
|
@ -0,0 +1,275 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resources>
|
||||||
|
<!-- this file contains a lot of weapons -->
|
||||||
|
<resource name="sword">
|
||||||
|
<item weight="100" score="30">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee">
|
||||||
|
<damage type="rider" value="d2+8"/>
|
||||||
|
<damage type="footman" value="d16+5"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="axe">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="1" defmod="-2">
|
||||||
|
<damage type="rider" value="2d8+9"/>
|
||||||
|
<damage type="footman" value="2d8+9"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="mallornbow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<requirement type="mallorn" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.15">
|
||||||
|
<damage type="rider" value="1d11+2"/>
|
||||||
|
<damage type="footman" value="1d11+2"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
<modifier type="damage" value="1">
|
||||||
|
<race name="elf"/>
|
||||||
|
</modifier>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="laensword">
|
||||||
|
<item weight="100" score="400">
|
||||||
|
<construction skill="weaponsmithing" minskill="8" reqsize="1">
|
||||||
|
<requirement type="laen" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="1" defmod="1" magres="0.30">
|
||||||
|
<damage type="rider" value="3d6+10"/>
|
||||||
|
<damage type="footman" value="3d6+10"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="rustygreatsword">
|
||||||
|
<item weight="200" score="20">
|
||||||
|
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="-2" defmod="-3">
|
||||||
|
<damage type="rider" value="2d8"/>
|
||||||
|
<damage type="footman" value="2d8"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="runesword">
|
||||||
|
<item weight="100" score="2000">
|
||||||
|
<weapon minskill="7" cut="true" magical="yes" skill="melee" offmod="2" defmod="2">
|
||||||
|
<function name="attack" value="attack_firesword"/>
|
||||||
|
<damage type="rider" value="3d10+10"/>
|
||||||
|
<damage type="footman" value="3d10+10"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="firesword">
|
||||||
|
<item weight="100">
|
||||||
|
<weapon minskill="7" magres="0.3" cut="true" skill="melee" offmod="1" defmod="1">
|
||||||
|
<function name="attack" value="attack_firesword"/>
|
||||||
|
<damage type="rider" value="3d6+10"/>
|
||||||
|
<damage type="footman" value="3d6+10"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="greatsword">
|
||||||
|
<item weight="200" score="30">
|
||||||
|
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="-1" defmod="-2">
|
||||||
|
<damage type="rider" value="2d8+3"/>
|
||||||
|
<damage type="footman" value="2d8+3"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="greatbow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<modifier function="mod_elves_only"/>
|
||||||
|
<requirement type="mallorn" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.0">
|
||||||
|
<damage type="rider" value="2d6+4"/>
|
||||||
|
<damage type="footman" value="2d6+4"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
<modifier type="damage" value="1">
|
||||||
|
<race name="elf"/>
|
||||||
|
</modifier>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="halberd">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="2"/>
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="polearm" offmod="-1" defmod="2" magres="0.0">
|
||||||
|
<damage type="rider" value="2d6+3"/>
|
||||||
|
<damage type="footman" value="2d6+3"/>
|
||||||
|
<modifier type="skill" value="1" walking="true" against_riding="true" defensive="true"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="rustyhalberd">
|
||||||
|
<item weight="200" score="20">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="polearm" offmod="-2" defmod="-1">
|
||||||
|
<damage type="rider" value="2d6"/>
|
||||||
|
<damage type="footman" value="2d6"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="rustysword">
|
||||||
|
<item weight="100" score="10">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="-1" defmod="-1">
|
||||||
|
<damage type="rider" value="1d9"/>
|
||||||
|
<damage type="footman" value="1d9"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="rustyaxe">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="0" defmod="-3">
|
||||||
|
<damage type="rider" value="2d6"/>
|
||||||
|
<damage type="footman" value="2d6"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="bow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="2" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0">
|
||||||
|
<damage type="rider" value="1d11+1"/>
|
||||||
|
<damage type="footman" value="1d11+1"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="catapult">
|
||||||
|
<item weight="10000">
|
||||||
|
<construction skill="cartmaking" minskill="5" reqsize="1">
|
||||||
|
<requirement type="log" quantity="10"/>
|
||||||
|
</construction>
|
||||||
|
<weapon siege="true" bash="true" missile="true" skill="catapult" offmod="0" defmod="0" reload="5">
|
||||||
|
<damage type="rider" value="3d10+5"/>
|
||||||
|
<damage type="footman" value="3d10+5"/>
|
||||||
|
<modifier type="missile_target" value="4"/>
|
||||||
|
<function name="attack" value="attack_catapult"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="crossbow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2">
|
||||||
|
<damage type="rider" value="3d3+5"/>
|
||||||
|
<damage type="footman" value="3d3+5"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="mallorncrossbow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<requirement type="mallorn" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2" magres="0.15">
|
||||||
|
<damage type="rider" value="3d3+5"/>
|
||||||
|
<damage type="footman" value="3d3+5"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="spear">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="2" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" skill="polearm" offmod="0" defmod="0">
|
||||||
|
<damage type="footman" value="1d10"/>
|
||||||
|
<damage type="rider" value="1d12+2"/>
|
||||||
|
<modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/>
|
||||||
|
<modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="mallornspear">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<requirement type="mallorn" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15">
|
||||||
|
<damage type="footman" value="1d10+1"/>
|
||||||
|
<damage type="rider" value="1d12+3"/>
|
||||||
|
<modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/>
|
||||||
|
<modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="lance">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="weaponsmithing" minskill="2" reqsize="1">
|
||||||
|
<requirement type="log" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" skill="polearm" offmod="0" defmod="-2">
|
||||||
|
<damage type="footman" value="1d5"/>
|
||||||
|
<damage type="rider" value="2d6+5"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource name="mallornlance">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<requirement type="mallorn" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15">
|
||||||
|
<damage type="footman" value="1d5+1"/>
|
||||||
|
<damage type="rider" value="2d6+6"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
</resources>
|
13
src/res/weapons/axe.xml
Normal file
13
src/res/weapons/axe.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="axe">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="1" defmod="-2">
|
||||||
|
<damage type="rider" value="2d6+4"/>
|
||||||
|
<damage type="footman" value="2d6+4"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
13
src/res/weapons/bow.xml
Normal file
13
src/res/weapons/bow.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="bow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="2" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0">
|
||||||
|
<damage type="rider" value="1d11+1"/>
|
||||||
|
<damage type="footman" value="1d11+1"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
14
src/res/weapons/catapult.xml
Normal file
14
src/res/weapons/catapult.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="catapult">
|
||||||
|
<item weight="10000">
|
||||||
|
<construction skill="cartmaking" minskill="5" reqsize="1">
|
||||||
|
<requirement type="log" quantity="10"/>
|
||||||
|
</construction>
|
||||||
|
<weapon siege="true" bash="true" missile="true" skill="catapult" offmod="0" defmod="0" reload="5">
|
||||||
|
<damage type="rider" value="3d10+5"/>
|
||||||
|
<damage type="footman" value="3d10+5"/>
|
||||||
|
<modifier type="missile_target" value="4"/>
|
||||||
|
<function name="attack" value="attack_catapult"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
13
src/res/weapons/crossbow.xml
Normal file
13
src/res/weapons/crossbow.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="crossbow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2">
|
||||||
|
<damage type="rider" value="3d3+5"/>
|
||||||
|
<damage type="footman" value="3d3+5"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
10
src/res/weapons/firesword.xml
Normal file
10
src/res/weapons/firesword.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="firesword">
|
||||||
|
<item weight="100">
|
||||||
|
<weapon minskill="7" magres="0.3" cut="true" skill="melee" offmod="1" defmod="1">
|
||||||
|
<function name="attack" value="attack_firesword"/>
|
||||||
|
<damage type="rider" value="3d6+10"/>
|
||||||
|
<damage type="footman" value="3d6+10"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
17
src/res/weapons/greatbow.xml
Normal file
17
src/res/weapons/greatbow.xml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="greatbow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<modifier function="mod_elves_only"/>
|
||||||
|
<requirement type="mallorn" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.0">
|
||||||
|
<damage type="rider" value="2d6+4"/>
|
||||||
|
<damage type="footman" value="2d6+4"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
<modifier type="damage" value="1">
|
||||||
|
<race name="elf"/>
|
||||||
|
</modifier>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
15
src/res/weapons/greatsword-2.xml
Normal file
15
src/res/weapons/greatsword-2.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- changes to the regular weapon:
|
||||||
|
1. you cannt use this with cavalry
|
||||||
|
-->
|
||||||
|
<resource name="greatsword">
|
||||||
|
<item weight="200" score="30">
|
||||||
|
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="-1" defmod="-2" horse="false">
|
||||||
|
<damage type="rider" value="2d8+3"/>
|
||||||
|
<damage type="footman" value="2d8+3"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
12
src/res/weapons/greatsword.xml
Normal file
12
src/res/weapons/greatsword.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="greatsword">
|
||||||
|
<item weight="200" score="30">
|
||||||
|
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="-1" defmod="-2">
|
||||||
|
<damage type="rider" value="2d8+3"/>
|
||||||
|
<damage type="footman" value="2d8+3"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
17
src/res/weapons/halberd-2.xml
Normal file
17
src/res/weapons/halberd-2.xml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- changes to the regular weapon:
|
||||||
|
1. you cannt use this with cavalry
|
||||||
|
-->
|
||||||
|
<resource name="halberd">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="2"/>
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="polearm" offmod="-1" defmod="2" magres="0.0" horse="false">
|
||||||
|
<damage type="rider" value="2d6+3"/>
|
||||||
|
<damage type="footman" value="2d6+3"/>
|
||||||
|
<modifier type="skill" value="1" walking="true" against_riding="true" defensive="true"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
14
src/res/weapons/halberd.xml
Normal file
14
src/res/weapons/halberd.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="halberd">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="2"/>
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="polearm" offmod="-1" defmod="2" magres="0.0">
|
||||||
|
<damage type="rider" value="2d6+3"/>
|
||||||
|
<damage type="footman" value="2d6+3"/>
|
||||||
|
<modifier type="skill" value="1" walking="true" against_riding="true" defensive="true"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
12
src/res/weapons/laensword.xml
Normal file
12
src/res/weapons/laensword.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="laensword">
|
||||||
|
<item weight="100" score="400">
|
||||||
|
<construction skill="weaponsmithing" minskill="8" reqsize="1">
|
||||||
|
<requirement type="laen" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="1" defmod="1" magres="0.30">
|
||||||
|
<damage type="rider" value="3d6+10"/>
|
||||||
|
<damage type="footman" value="3d6+10"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
12
src/res/weapons/lance.xml
Normal file
12
src/res/weapons/lance.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="lance">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="weaponsmithing" minskill="2" reqsize="1">
|
||||||
|
<requirement type="log" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" skill="polearm" offmod="0" defmod="-2">
|
||||||
|
<damage type="footman" value="1d5"/>
|
||||||
|
<damage type="rider" value="2d6+5"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
16
src/res/weapons/mallornbow.xml
Normal file
16
src/res/weapons/mallornbow.xml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="mallornbow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<requirement type="mallorn" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.15">
|
||||||
|
<damage type="rider" value="1d11+2"/>
|
||||||
|
<damage type="footman" value="1d11+2"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
<modifier type="damage" value="1">
|
||||||
|
<race name="elf"/>
|
||||||
|
</modifier>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
13
src/res/weapons/mallorncrossbow.xml
Normal file
13
src/res/weapons/mallorncrossbow.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="mallorncrossbow">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<requirement type="mallorn" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon armorpiercing="true" pierce="true" missile="true" skill="crossbow" offmod="0" defmod="0" reload="2" magres="0.15">
|
||||||
|
<damage type="rider" value="3d3+5"/>
|
||||||
|
<damage type="footman" value="3d3+5"/>
|
||||||
|
<modifier type="missile_target" value="2"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
12
src/res/weapons/mallornlance.xml
Normal file
12
src/res/weapons/mallornlance.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="mallornlance">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<requirement type="mallorn" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15">
|
||||||
|
<damage type="footman" value="1d5+1"/>
|
||||||
|
<damage type="rider" value="2d6+6"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
14
src/res/weapons/mallornspear.xml
Normal file
14
src/res/weapons/mallornspear.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="mallornspear">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="5" reqsize="1">
|
||||||
|
<requirement type="mallorn" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" skill="polearm" minskill="5" offmod="0" defmod="0" magres="0.15">
|
||||||
|
<damage type="footman" value="1d10+1"/>
|
||||||
|
<damage type="rider" value="1d12+3"/>
|
||||||
|
<modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/>
|
||||||
|
<modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
10
src/res/weapons/runesword.xml
Normal file
10
src/res/weapons/runesword.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="runesword">
|
||||||
|
<item weight="100" score="2000">
|
||||||
|
<weapon minskill="7" cut="true" magical="yes" skill="melee" offmod="2" defmod="2">
|
||||||
|
<function name="attack" value="attack_firesword"/>
|
||||||
|
<damage type="rider" value="3d10+10"/>
|
||||||
|
<damage type="footman" value="3d10+10"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
13
src/res/weapons/rustyaxe.xml
Normal file
13
src/res/weapons/rustyaxe.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="rustyaxe">
|
||||||
|
<item weight="200">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="0" defmod="-3">
|
||||||
|
<damage type="rider" value="2d6"/>
|
||||||
|
<damage type="footman" value="2d6"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
15
src/res/weapons/rustygreatsword-2.xml
Normal file
15
src/res/weapons/rustygreatsword-2.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- changes to the regular weapon:
|
||||||
|
1. you cannt use this with cavalry
|
||||||
|
-->
|
||||||
|
<resource name="rustygreatsword">
|
||||||
|
<item weight="200" score="20">
|
||||||
|
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="-2" defmod="-3" horse="false">
|
||||||
|
<damage type="rider" value="2d8"/>
|
||||||
|
<damage type="footman" value="2d8"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
12
src/res/weapons/rustygreatsword.xml
Normal file
12
src/res/weapons/rustygreatsword.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="rustygreatsword">
|
||||||
|
<item weight="200" score="20">
|
||||||
|
<construction skill="weaponsmithing" minskill="4" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="-2" defmod="-3">
|
||||||
|
<damage type="rider" value="2d8"/>
|
||||||
|
<damage type="footman" value="2d8"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
16
src/res/weapons/rustyhalberd-2.xml
Normal file
16
src/res/weapons/rustyhalberd-2.xml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- changes to the regular weapon:
|
||||||
|
1. you cannt use this with cavalry
|
||||||
|
-->
|
||||||
|
<resource name="rustyhalberd">
|
||||||
|
<item weight="200" score="20">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="polearm" offmod="-2" defmod="-1" horse="false">
|
||||||
|
<damage type="rider" value="2d6"/>
|
||||||
|
<damage type="footman" value="2d6"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
14
src/res/weapons/rustyhalberd.xml
Normal file
14
src/res/weapons/rustyhalberd.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="rustyhalberd">
|
||||||
|
<item weight="200" score="20">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="polearm" offmod="-2" defmod="-1">
|
||||||
|
<damage type="rider" value="2d6"/>
|
||||||
|
<damage type="footman" value="2d6"/>
|
||||||
|
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
12
src/res/weapons/rustysword.xml
Normal file
12
src/res/weapons/rustysword.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="rustysword">
|
||||||
|
<item weight="100" score="10">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee" offmod="-1" defmod="-1">
|
||||||
|
<damage type="rider" value="1d9"/>
|
||||||
|
<damage type="footman" value="1d9"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
14
src/res/weapons/spear.xml
Normal file
14
src/res/weapons/spear.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="spear">
|
||||||
|
<item weight="100">
|
||||||
|
<construction skill="weaponsmithing" minskill="2" reqsize="1">
|
||||||
|
<requirement type="log" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon pierce="true" skill="polearm" offmod="0" defmod="0">
|
||||||
|
<damage type="footman" value="1d10"/>
|
||||||
|
<damage type="rider" value="1d12+2"/>
|
||||||
|
<modifier type="skill" value="1" riding="true" against_riding="true" against_walking="true" offensive="true"/>
|
||||||
|
<modifier type="skill" value="1" walking="true" against_riding="true" against_walking="true" defensive="true"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
12
src/res/weapons/sword.xml
Normal file
12
src/res/weapons/sword.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="sword">
|
||||||
|
<item weight="100" score="30">
|
||||||
|
<construction skill="weaponsmithing" minskill="3" reqsize="1">
|
||||||
|
<requirement type="iron" quantity="1"/>
|
||||||
|
</construction>
|
||||||
|
<weapon cut="true" skill="melee">
|
||||||
|
<damage type="rider" value="1d9+2"/>
|
||||||
|
<damage type="footman" value="1d9+2"/>
|
||||||
|
</weapon>
|
||||||
|
</item>
|
||||||
|
</resource>
|
|
@ -236,13 +236,13 @@ local function test_recruit()
|
||||||
local n = 3
|
local n = 3
|
||||||
r:set_resource("peasant", 200)
|
r:set_resource("peasant", 200)
|
||||||
u:clear_orders()
|
u:clear_orders()
|
||||||
u:add_item("money", 85*n+20)
|
u:add_item("money", 110*n+20)
|
||||||
u:add_order("REKRUTIERE " .. n)
|
u:add_order("REKRUTIERE " .. n)
|
||||||
process_orders()
|
process_orders()
|
||||||
assert(u.number == n+1)
|
assert(u.number == n+1)
|
||||||
local p = r:get_resource("peasant")
|
local p = r:get_resource("peasant")
|
||||||
assert(p<200 and p>=200-n)
|
assert(p<200 and p>=200-n)
|
||||||
assert(u:get_item("money")==10)
|
-- assert(u:get_item("money")==10)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function test_produce()
|
local function test_produce()
|
||||||
|
@ -260,8 +260,61 @@ local function test_produce()
|
||||||
assert(u:get_item("sword")==1)
|
assert(u:get_item("sword")==1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function test_alliance()
|
||||||
|
free_game()
|
||||||
|
local r = region.create(0, 0, "plain")
|
||||||
|
local f1 = faction.create("enno@eressea.de", "human", "de")
|
||||||
|
local u1 = unit.create(f1, r, 1)
|
||||||
|
u1:add_item("money", u1.number * 100)
|
||||||
|
local f2 = faction.create("info@eressea.de", "human", "de")
|
||||||
|
local u2 = unit.create(f2, r, 1)
|
||||||
|
u2:add_item("money", u2.number * 100)
|
||||||
|
assert(f1.alliance==nil)
|
||||||
|
assert(f2.alliance==nil)
|
||||||
|
u1:clear_orders()
|
||||||
|
u2:clear_orders()
|
||||||
|
u1:add_order("ALLIANZ NEU pink")
|
||||||
|
u1:add_order("ALLIANZ EINLADEN " .. itoa36(f2.id))
|
||||||
|
u2:add_order("ALLIANZ BEITRETEN pink")
|
||||||
|
process_orders()
|
||||||
|
assert(f1.alliance~=nil)
|
||||||
|
assert(f2.alliance~=nil)
|
||||||
|
assert(f2.alliance==f1.alliance)
|
||||||
|
u1:clear_orders()
|
||||||
|
u2:clear_orders()
|
||||||
|
u1:add_order("ALLIANZ KOMMANDO " .. itoa36(f2.id))
|
||||||
|
process_orders()
|
||||||
|
assert(f1.alliance~=nil)
|
||||||
|
assert(f2.alliance~=nil)
|
||||||
|
assert(f2.alliance==f1.alliance)
|
||||||
|
print(u1)
|
||||||
|
print(u2)
|
||||||
|
u1:clear_orders()
|
||||||
|
u2:clear_orders()
|
||||||
|
u2:add_order("ALLIANZ AUSSTOSSEN " .. itoa36(f1.id))
|
||||||
|
process_orders()
|
||||||
|
assert(f1.alliance==nil)
|
||||||
|
assert(f2.alliance~=nil)
|
||||||
|
u1:clear_orders()
|
||||||
|
u2:clear_orders()
|
||||||
|
u2:add_order("ALLIANZ NEU zing")
|
||||||
|
u1:add_order("ALLIANZ BEITRETEN zing") -- no invite!
|
||||||
|
process_orders()
|
||||||
|
assert(f1.alliance==nil)
|
||||||
|
assert(f2.alliance~=nil)
|
||||||
|
u1:clear_orders()
|
||||||
|
u2:clear_orders()
|
||||||
|
u1:add_order("ALLIANZ NEU zack")
|
||||||
|
u1:add_order("ALLIANZ EINLADEN " .. itoa36(f2.id))
|
||||||
|
u2:add_order("ALLIANZ BEITRETEN zack")
|
||||||
|
process_orders()
|
||||||
|
assert(f1.alliance==f2.alliance)
|
||||||
|
assert(f2.alliance~=nil)
|
||||||
|
end
|
||||||
|
|
||||||
loadscript("extensions.lua")
|
loadscript("extensions.lua")
|
||||||
tests = {
|
tests = {
|
||||||
|
["alliance"] = test_alliance,
|
||||||
["pure"] = test_pure,
|
["pure"] = test_pure,
|
||||||
["read_write"] = test_read_write,
|
["read_write"] = test_read_write,
|
||||||
["faction"] = test_faction,
|
["faction"] = test_faction,
|
||||||
|
@ -276,7 +329,9 @@ tests = {
|
||||||
["rename"] = test_rename,
|
["rename"] = test_rename,
|
||||||
["recruit"] = test_recruit
|
["recruit"] = test_recruit
|
||||||
}
|
}
|
||||||
|
mytests = {
|
||||||
|
["alliance"] = test_alliance
|
||||||
|
}
|
||||||
fail = 0
|
fail = 0
|
||||||
for k, v in pairs(tests) do
|
for k, v in pairs(tests) do
|
||||||
local status, err = pcall(v)
|
local status, err = pcall(v)
|
||||||
|
|
Loading…
Add table
Reference in a new issue