forked from github/server
magicskillboost
-- implementiert. Kann nur einmal pro Partei verwendet werden, und nur von einem Magier. Müssen wir erklären. Amulett des wahren Sehens und Ring der Unsichtbarkeit geben lediglich einen Bonus auf Wahrnehmung (+2) und Tarnung (+4). -- das define war nicht aktiviert Halblinge haben Armbrustschiessen +0 (statt +1). -- spearates Rassenfile für WDW Es gibt spezielle Regeln für Allianzen, und der HELFE und KONTAKTIERE Befehl sind eingeschränkt. Konkret kann kein HELP_FIGHT HELP_GUARD HELP_FSTEALTH HELP_MONEY gegeben werden (die anderen sind erlaubt). -- mit #defeine ALLIES_ONLY definiert Jede Allianz kann bis zu 15 Magier und 15 Alchemisten haben. Jede einzelne Partei der Allianz kann dabei nicht mehr als 15/Anzahl_Parteien (aufgerundet) Magier bzw. Alchemisten haben, und die Gesamtsumme darf 15 nicht übersteigen. -- mit #define ALLIANCE_LIMITS gemacht. Die Startgeschenke (Personen, Silber, ...) werden pro Allianz, nicht pro Spieler verteilt. Größere Allianzen bekommen also weniger pro Spieler. -- Nochmal geändert: Die Allianzen kriegen jede 168 Personen zum Start, weil sich das gut aufteilen lässt. Das wird auf 28 Einheiten pro Partei gesplittet, jede Einheit hat eines der Talente, außer der Starteinheit, die hat den magicskillboost. Einige Skills kommen öfter vor als andere, das ist nicht einfach vermeidbar. Sollte aber auch wurscht sein, es geht primär darum, lehren zu können. Es gibt ein Einheitenlimit von 1000 Einheiten pro Allianz. -- die Regel sparen wir uns einfach mal.
This commit is contained in:
parent
1a8e1acf74
commit
5a37c65498
|
@ -2871,11 +2871,7 @@ wahrnehmung(region * r, faction * f)
|
||||||
int w = 0;
|
int w = 0;
|
||||||
|
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
if (u->faction == f
|
if (u->faction == f) {
|
||||||
#ifdef HELFE_WAHRNEHMUNG
|
|
||||||
|| alliedunit(u, f, HELP_OBSERVE)
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
if (eff_skill(u, SK_OBSERVATION, r) > w) {
|
if (eff_skill(u, SK_OBSERVATION, r) > w) {
|
||||||
w = eff_skill(u, SK_OBSERVATION, r);
|
w = eff_skill(u, SK_OBSERVATION, r);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1086,7 +1086,7 @@ quit(void)
|
||||||
} else if(u->faction->alliance != f2->alliance) {
|
} else if(u->faction->alliance != f2->alliance) {
|
||||||
cmistake(u, S->s, 315, MSG_EVENT);
|
cmistake(u, S->s, 315, MSG_EVENT);
|
||||||
#else
|
#else
|
||||||
#warning ENHANCED_QUIT defined without ALLIANCES
|
#error ENHANCED_QUIT defined without ALLIANCES
|
||||||
#endif
|
#endif
|
||||||
} else if(!alliedfaction(NULL, f, f2, HELP_MONEY)) {
|
} else if(!alliedfaction(NULL, f, f2, HELP_MONEY)) {
|
||||||
cmistake(u, S->s, 316, MSG_EVENT);
|
cmistake(u, S->s, 316, MSG_EVENT);
|
||||||
|
@ -1311,15 +1311,6 @@ set_ally(unit * u, strlist * S)
|
||||||
sf->status = sf->status | HELP_FIGHT;
|
sf->status = sf->status | HELP_FIGHT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef HELFE_WAHRNEHMUNG
|
|
||||||
case P_OBSERVE:
|
|
||||||
if (not_kw == P_NOT)
|
|
||||||
sf->status = sf->status & (HELP_ALL - HELP_OBSERVE);
|
|
||||||
else
|
|
||||||
sf->status = sf->status | HELP_OBSERVE;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case P_FACTIONSTEALTH:
|
case P_FACTIONSTEALTH:
|
||||||
if (not_kw == P_NOT)
|
if (not_kw == P_NOT)
|
||||||
sf->status = sf->status & (HELP_ALL - HELP_FSTEALTH);
|
sf->status = sf->status & (HELP_ALL - HELP_FSTEALTH);
|
||||||
|
|
|
@ -62,6 +62,9 @@
|
||||||
#include <xml.h>
|
#include <xml.h>
|
||||||
|
|
||||||
#include <modules/xecmd.h>
|
#include <modules/xecmd.h>
|
||||||
|
#ifdef ALLIANCES
|
||||||
|
# include <modules/alliance.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -352,11 +355,43 @@ const char *options[MAXOPTIONS] =
|
||||||
"SHOWSKCHANGE"
|
"SHOWSKCHANGE"
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
#ifdef ALLIANCE_LIMITS
|
||||||
max_skill(const faction * f, skill_t sk)
|
int
|
||||||
|
allied_skillcount(const faction * f, skill_t sk)
|
||||||
{
|
{
|
||||||
int m = INT_MAX;
|
int num = 0;
|
||||||
|
alliance * a = f->alliance;
|
||||||
|
faction_list * members = a->members;
|
||||||
|
while (members!=NULL) {
|
||||||
|
num += count_skill(members->data, sk);
|
||||||
|
members=members->next;
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
allied_skilllimit(const faction * f, skill_t sk)
|
||||||
|
{
|
||||||
|
return atoi(get_param(global.parameters, "allied.skilllimit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
max_skill(faction * f, skill_t sk)
|
||||||
|
{
|
||||||
|
int m = INT_MAX;
|
||||||
|
#ifdef ALLIANCE_LIMITS
|
||||||
|
if (sk!=SK_ALCHEMY && sk!=SK_MAGIC) return INT_MAX;
|
||||||
|
if (f->alliance!=NULL) {
|
||||||
|
int ac = listlen(f->alliance->members); /* number of factions */
|
||||||
|
int al = allied_skilllimit(f, sk); /* limit per alliance */
|
||||||
|
int fl = (al+ac-1)/ac; /* faction limit */
|
||||||
|
int sc = al - allied_skillcount(f, sk);
|
||||||
|
if (sc==0) return count_skill(f, sk);
|
||||||
|
return fl;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
switch (sk) {
|
switch (sk) {
|
||||||
case SK_MAGIC:
|
case SK_MAGIC:
|
||||||
m = MAXMAGICIANS;
|
m = MAXMAGICIANS;
|
||||||
|
@ -367,8 +402,7 @@ max_skill(const faction * f, skill_t sk)
|
||||||
m = MAXALCHEMISTS;
|
m = MAXALCHEMISTS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return m;
|
||||||
return m;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char * g_basedir;
|
char * g_basedir;
|
||||||
|
@ -791,7 +825,7 @@ autoalliance(const plane * pl, const faction * sf, const faction * f2)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
alliance(const ally * sf, int mode)
|
ally_mode(const ally * sf, int mode)
|
||||||
{
|
{
|
||||||
if (sf==NULL) return 0;
|
if (sf==NULL) return 0;
|
||||||
return sf->status & mode;
|
return sf->status & mode;
|
||||||
|
@ -801,14 +835,21 @@ int
|
||||||
alliedgroup(const struct plane * pl, const struct faction * f,
|
alliedgroup(const struct plane * pl, const struct faction * f,
|
||||||
const struct faction * f2, const struct ally * sf, int mode)
|
const struct faction * f2, const struct ally * sf, int mode)
|
||||||
{
|
{
|
||||||
#ifdef ALLIANCES
|
|
||||||
if (f->alliance!=f2->alliance) return 0;
|
|
||||||
#endif
|
|
||||||
while (sf && sf->faction!=f2) sf=sf->next;
|
while (sf && sf->faction!=f2) sf=sf->next;
|
||||||
if (sf==NULL) {
|
if (sf==NULL) {
|
||||||
return mode & autoalliance(pl, f, f2);
|
mode = mode & autoalliance(pl, f, f2);
|
||||||
}
|
}
|
||||||
return alliance(sf, mode) | (mode & autoalliance(pl, f, f2));
|
mode = ally_mode(sf, mode) | (mode & autoalliance(pl, f, f2));
|
||||||
|
#ifdef ALLIANCES
|
||||||
|
if (f->alliance!=f2->alliance) {
|
||||||
|
# ifdef ALLIES_ONLY
|
||||||
|
mode &= ~ALLIES_ONLY;
|
||||||
|
# else
|
||||||
|
mode = 0;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -104,7 +104,6 @@ struct xml_stack;
|
||||||
#define NEW_RECEIPIES /* Vereinfachte, besser verteilte Kräuterzutaten für Tränke */
|
#define NEW_RECEIPIES /* Vereinfachte, besser verteilte Kräuterzutaten für Tränke */
|
||||||
#define NEW_TAVERN
|
#define NEW_TAVERN
|
||||||
#define GOBLINKILL
|
#define GOBLINKILL
|
||||||
#undef HELFE_WAHRNEHMUNG
|
|
||||||
|
|
||||||
#define USE_FIREWALL 1
|
#define USE_FIREWALL 1
|
||||||
#undef COMPATIBILITY
|
#undef COMPATIBILITY
|
||||||
|
@ -900,7 +899,7 @@ extern boolean check_leuchtturm(struct region * r, struct faction * f);
|
||||||
extern void update_lighthouse(struct building * lh);
|
extern void update_lighthouse(struct building * lh);
|
||||||
|
|
||||||
/* skills */
|
/* skills */
|
||||||
extern int max_skill(const struct faction * f, skill_t sk);
|
extern int max_skill(struct faction * f, skill_t sk);
|
||||||
extern int count_skill(struct faction * f, skill_t sk);
|
extern int count_skill(struct faction * f, skill_t sk);
|
||||||
extern int count_all_money(const struct region * r);
|
extern int count_all_money(const struct region * r);
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#include "eressea.h"
|
#include "eressea.h"
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
|
|
||||||
|
#include <attributes/key.h>
|
||||||
|
|
||||||
#include "alchemy.h"
|
#include "alchemy.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "faction.h"
|
#include "faction.h"
|
||||||
|
@ -2037,6 +2039,31 @@ use_mistletoe(struct unit * user, const struct item_type * itype, int amount, co
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
use_magicboost(struct unit * user, const struct item_type * itype, int amount, const char * cmd)
|
||||||
|
{
|
||||||
|
int mtoes = new_get_pooled(user, itype->rtype, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK);
|
||||||
|
faction * f = user->faction;
|
||||||
|
if (user->number>mtoes) {
|
||||||
|
ADDMSG(&user->faction->msgs, msg_message("use_singleperson",
|
||||||
|
"unit item region command", user, itype->rtype, user->region, cmd));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (!is_mage(user) || find_key(f->attribs, atoi36("mbst"))!=NULL) {
|
||||||
|
cmistake(user, user->thisorder, 214, MSG_EVENT);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
new_use_pooled(user, itype->rtype, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, user->number);
|
||||||
|
|
||||||
|
a_add(&f->attribs, make_key(atoi36("mbst")));
|
||||||
|
set_level(user, sk_find("sk_magic"), 3);
|
||||||
|
|
||||||
|
ADDMSG(&user->faction->msgs, msg_message("use_item",
|
||||||
|
"unit item", user, itype->rtype));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
use_snowball(struct unit * user, const struct item_type * itype, int amount, const char * cmd)
|
use_snowball(struct unit * user, const struct item_type * itype, int amount, const char * cmd)
|
||||||
{
|
{
|
||||||
|
@ -2666,7 +2693,8 @@ register_resources(void)
|
||||||
register_function((pf_generic)use_warmthpotion, "usewarmthpotion");
|
register_function((pf_generic)use_warmthpotion, "usewarmthpotion");
|
||||||
register_function((pf_generic)use_bloodpotion, "usebloodpotion");
|
register_function((pf_generic)use_bloodpotion, "usebloodpotion");
|
||||||
register_function((pf_generic)use_foolpotion, "usefoolpotion");
|
register_function((pf_generic)use_foolpotion, "usefoolpotion");
|
||||||
register_function((pf_generic)use_mistletoe, "usemistletoe");
|
register_function((pf_generic)use_mistletoe, "usemistletoe");
|
||||||
|
register_function((pf_generic)use_magicboost, "usemagicboost");
|
||||||
register_function((pf_generic)use_snowball, "usesnowball");
|
register_function((pf_generic)use_snowball, "usesnowball");
|
||||||
|
|
||||||
register_function((pf_generic)give_horses, "givehorses");
|
register_function((pf_generic)give_horses, "givehorses");
|
||||||
|
|
|
@ -742,18 +742,21 @@ tagbegin(struct xml_stack * stack)
|
||||||
const char * zName = xml_value(tag, "name");
|
const char * zName = xml_value(tag, "name");
|
||||||
race * rc;
|
race * rc;
|
||||||
|
|
||||||
state->nextattack = 0;
|
|
||||||
state->nextfamiliar = 0;
|
|
||||||
|
|
||||||
if (zName) {
|
if (zName) {
|
||||||
rc = rc_find(zName);
|
rc = rc_find(zName);
|
||||||
if (rc==NULL) {
|
if (rc!=NULL) {
|
||||||
rc = rc_add(rc_new(zName));
|
/* not reading the same race twice, first race counts */
|
||||||
}
|
return XML_OK;
|
||||||
|
}
|
||||||
|
state->race = rc = rc_add(rc_new(zName));
|
||||||
} else {
|
} else {
|
||||||
log_error(("missing required tag 'name'\n"));
|
log_error(("missing required tag 'name'\n"));
|
||||||
return XML_USERERROR;
|
return XML_USERERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state->nextattack = 0;
|
||||||
|
state->nextfamiliar = 0;
|
||||||
|
|
||||||
rc->magres = xml_fvalue(tag, "magres");
|
rc->magres = xml_fvalue(tag, "magres");
|
||||||
rc->maxaura = xml_fvalue(tag, "maxaura");
|
rc->maxaura = xml_fvalue(tag, "maxaura");
|
||||||
rc->regaura = xml_fvalue(tag, "regaura");
|
rc->regaura = xml_fvalue(tag, "regaura");
|
||||||
|
@ -810,87 +813,89 @@ tagbegin(struct xml_stack * stack)
|
||||||
if (xml_bvalue(tag, "resistpierce")) rc->battle_flags |= BF_RES_PIERCE;
|
if (xml_bvalue(tag, "resistpierce")) rc->battle_flags |= BF_RES_PIERCE;
|
||||||
|
|
||||||
state->race = rc;
|
state->race = rc;
|
||||||
} else if (strcmp(tag->name, "ai")==0) {
|
} else if (state->race!=NULL) {
|
||||||
race * rc = state->race;
|
if (strcmp(tag->name, "ai")==0) {
|
||||||
rc->splitsize = xml_ivalue(tag, "splitsize");
|
race * rc = state->race;
|
||||||
|
rc->splitsize = xml_ivalue(tag, "splitsize");
|
||||||
|
|
||||||
if (xml_bvalue(tag, "killpeasants")) rc->flags |= RCF_KILLPEASANTS;
|
if (xml_bvalue(tag, "killpeasants")) rc->flags |= RCF_KILLPEASANTS;
|
||||||
if (xml_bvalue(tag, "attackrandom")) rc->flags |= RCF_ATTACKRANDOM;
|
if (xml_bvalue(tag, "attackrandom")) rc->flags |= RCF_ATTACKRANDOM;
|
||||||
if (xml_bvalue(tag, "moverandom")) rc->flags |= RCF_MOVERANDOM;
|
if (xml_bvalue(tag, "moverandom")) rc->flags |= RCF_MOVERANDOM;
|
||||||
if (xml_bvalue(tag, "learn")) rc->flags |= RCF_LEARN;
|
if (xml_bvalue(tag, "learn")) rc->flags |= RCF_LEARN;
|
||||||
|
|
||||||
} else if (strcmp(tag->name, "skill")==0) {
|
} else if (strcmp(tag->name, "skill")==0) {
|
||||||
race * rc = state->race;
|
race * rc = state->race;
|
||||||
const char * name = xml_value(tag, "name");
|
const char * name = xml_value(tag, "name");
|
||||||
if (name) {
|
if (name) {
|
||||||
int mod = xml_ivalue(tag, "modifier");
|
int mod = xml_ivalue(tag, "modifier");
|
||||||
if (mod!=0) {
|
if (mod!=0) {
|
||||||
skill_t sk = sk_find(name);
|
skill_t sk = sk_find(name);
|
||||||
if (sk!=NOSKILL) {
|
if (sk!=NOSKILL) {
|
||||||
rc->bonus[sk] = (char)mod;
|
rc->bonus[sk] = (char)mod;
|
||||||
} else {
|
} else {
|
||||||
log_error(("unknown skill '%s'\n", name));
|
log_error(("unknown skill '%s'\n", name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log_error(("missing required tag 'name'\n"));
|
log_error(("missing required tag 'name'\n"));
|
||||||
return XML_USERERROR;
|
return XML_USERERROR;
|
||||||
}
|
}
|
||||||
} else if (strcmp(tag->name, "attack")==0) {
|
} else if (strcmp(tag->name, "attack")==0) {
|
||||||
race * rc = state->race;
|
race * rc = state->race;
|
||||||
const char * damage = xml_value(tag, "damage");
|
const char * damage = xml_value(tag, "damage");
|
||||||
struct att * a = &rc->attack[state->nextattack++];
|
struct att * a = &rc->attack[state->nextattack++];
|
||||||
if (damage) {
|
if (damage) {
|
||||||
a->data.dice = strdup(damage);
|
a->data.dice = strdup(damage);
|
||||||
} else {
|
} else {
|
||||||
a->data.iparam = xml_ivalue(tag, "spell");
|
a->data.iparam = xml_ivalue(tag, "spell");
|
||||||
}
|
}
|
||||||
a->type = xml_ivalue(tag, "type");
|
a->type = xml_ivalue(tag, "type");
|
||||||
a->flags = xml_ivalue(tag, "flags");
|
a->flags = xml_ivalue(tag, "flags");
|
||||||
} else if (strcmp(tag->name, "precombatspell") == 0) {
|
} else if (strcmp(tag->name, "precombatspell") == 0) {
|
||||||
race * rc = state->race;
|
race * rc = state->race;
|
||||||
rc->precombatspell = xml_ivalue(tag, "spell");
|
rc->precombatspell = xml_ivalue(tag, "spell");
|
||||||
} else if (strcmp(tag->name, "function")==0) {
|
} else if (strcmp(tag->name, "function")==0) {
|
||||||
race * rc = state->race;
|
race * rc = state->race;
|
||||||
const char * name = xml_value(tag, "name");
|
const char * name = xml_value(tag, "name");
|
||||||
const char * value = xml_value(tag, "value");
|
const char * value = xml_value(tag, "value");
|
||||||
if (name && value) {
|
if (name && value) {
|
||||||
pf_generic fun = get_function(value);
|
pf_generic fun = get_function(value);
|
||||||
if (fun==NULL) {
|
if (fun==NULL) {
|
||||||
log_error(("unknown function value '%s=%s' for race %s\n", name, value, rc->_name[0]));
|
log_error(("unknown function value '%s=%s' for race %s\n", name, value, rc->_name[0]));
|
||||||
} else {
|
} else {
|
||||||
if (strcmp(name, "name")==0) {
|
if (strcmp(name, "name")==0) {
|
||||||
rc->generate_name = (const char* (*)(const struct unit*))fun;
|
rc->generate_name = (const char* (*)(const struct unit*))fun;
|
||||||
} else if (strcmp(name, "age")==0) {
|
} else if (strcmp(name, "age")==0) {
|
||||||
rc->age = (void(*)(struct unit*))fun;
|
rc->age = (void(*)(struct unit*))fun;
|
||||||
} else if (strcmp(name, "move")==0) {
|
} else if (strcmp(name, "move")==0) {
|
||||||
rc->move_allowed = (boolean(*)(const struct region *, const struct region *))fun;
|
rc->move_allowed = (boolean(*)(const struct region *, const struct region *))fun;
|
||||||
} else if (strcmp(name, "itemdrop")==0) {
|
} else if (strcmp(name, "itemdrop")==0) {
|
||||||
rc->itemdrop = (struct item *(*)(const struct race *, int))fun;
|
rc->itemdrop = (struct item *(*)(const struct race *, int))fun;
|
||||||
} else if (strcmp(name, "initfamiliar")==0) {
|
} else if (strcmp(name, "initfamiliar")==0) {
|
||||||
rc->init_familiar = (void(*)(struct unit *))fun;
|
rc->init_familiar = (void(*)(struct unit *))fun;
|
||||||
} else {
|
} else {
|
||||||
log_error(("unknown function type '%s=%s' for race %s\n", name, value, rc->_name[0]));
|
log_error(("unknown function type '%s=%s' for race %s\n", name, value, rc->_name[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (strcmp(tag->name, "familiar")==0) {
|
} else if (strcmp(tag->name, "familiar")==0) {
|
||||||
race * rc = state->race;
|
race * rc = state->race;
|
||||||
const char * zRace = xml_value(tag, "race");
|
const char * zRace = xml_value(tag, "race");
|
||||||
if (zRace && rc) {
|
if (zRace && rc) {
|
||||||
race * frc = rc_find(zRace);
|
race * frc = rc_find(zRace);
|
||||||
if (frc == NULL) {
|
if (frc == NULL) {
|
||||||
frc = rc_add(rc_new(zRace));
|
frc = rc_add(rc_new(zRace));
|
||||||
}
|
}
|
||||||
if (xml_bvalue(tag, "default")) {
|
if (xml_bvalue(tag, "default")) {
|
||||||
rc->familiars[0] = frc;
|
rc->familiars[0] = frc;
|
||||||
} else {
|
} else {
|
||||||
rc->familiars[++state->nextfamiliar] = frc;
|
rc->familiars[++state->nextfamiliar] = frc;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log_error(("missing required tag 'race'\n"));
|
log_error(("missing required tag 'race'\n"));
|
||||||
return XML_USERERROR;
|
return XML_USERERROR;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return XML_OK;
|
return XML_OK;
|
||||||
|
|
|
@ -1994,13 +1994,20 @@ addally(const faction * f, ally ** sfp, int aid, int state)
|
||||||
{
|
{
|
||||||
struct faction * af = findfaction(aid);
|
struct faction * af = findfaction(aid);
|
||||||
ally * sf;
|
ally * sf;
|
||||||
#ifndef HELFE_WAHRNEHMUNG
|
|
||||||
state &= ~HELP_OBSERVE;
|
state &= ~HELP_OBSERVE;
|
||||||
|
#ifndef REGIONOWNERS
|
||||||
|
state &= ~HELP_TRAVEL;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ALLIANCES
|
#ifdef ALLIANCES
|
||||||
|
# ifdef ALLIES_ONLY
|
||||||
|
if (af!=NULL && af->alliance!=f->alliance) state &= ~ALLIES_ONLY;;
|
||||||
|
# else
|
||||||
|
# endif
|
||||||
if (af!=NULL && af->alliance!=f->alliance) return;
|
if (af!=NULL && af->alliance!=f->alliance) return;
|
||||||
#endif
|
#endif
|
||||||
sf = calloc(1, sizeof(ally));
|
if (state==0) return;
|
||||||
|
|
||||||
|
sf = calloc(1, sizeof(ally));
|
||||||
sf->faction = af;
|
sf->faction = af;
|
||||||
if (!sf->faction) ur_add((void*)aid, (void**)&sf->faction, resolve_faction);
|
if (!sf->faction) ur_add((void*)aid, (void**)&sf->faction, resolve_faction);
|
||||||
sf->status = state;
|
sf->status = state;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#define RECRUITFRACTION 40 /* 100/RECRUITFRACTION% */
|
#define RECRUITFRACTION 40 /* 100/RECRUITFRACTION% */
|
||||||
#define CATAPULT_AMMUNITION 1 /* Gebaut werden kann sie auch mit 0! */
|
#define CATAPULT_AMMUNITION 1 /* Gebaut werden kann sie auch mit 0! */
|
||||||
#define CHANGED_CROSSBOWS 1
|
#define CHANGED_CROSSBOWS 1
|
||||||
#define NEWATSROI 0
|
#define NEWATSROI 1
|
||||||
#define COMBAT_TURNS 5
|
#define COMBAT_TURNS 5
|
||||||
#define PEASANTS_DO_NOT_STARVE 0
|
#define PEASANTS_DO_NOT_STARVE 0
|
||||||
#define NEW_MIGRATION 1
|
#define NEW_MIGRATION 1
|
||||||
|
@ -45,7 +45,9 @@
|
||||||
|
|
||||||
#define ENHANCED_QUIT
|
#define ENHANCED_QUIT
|
||||||
#define ALLIANCES
|
#define ALLIANCES
|
||||||
|
#define ALLIES_ONLY (HELP_FIGHT|HELP_GUARD|HELP_FSTEALTH|HELP_MONEY)
|
||||||
#undef ALLIANCEJOIN
|
#undef ALLIANCEJOIN
|
||||||
|
#define ALLIANCE_LIMITS
|
||||||
#define AUTOALLIANCE (HELP_FIGHT)
|
#define AUTOALLIANCE (HELP_FIGHT)
|
||||||
|
|
||||||
#define WDW_PHOENIX
|
#define WDW_PHOENIX
|
||||||
|
|
|
@ -386,6 +386,9 @@
|
||||||
<File
|
<File
|
||||||
RelativePath="..\common\settings-vinyambar.h">
|
RelativePath="..\common\settings-vinyambar.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\common\settings-wdw.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\common\settings.h">
|
RelativePath="..\common\settings.h">
|
||||||
</File>
|
</File>
|
||||||
|
|
|
@ -42,8 +42,6 @@ read_game(const char * filename)
|
||||||
static int
|
static int
|
||||||
write_game(const char *filename)
|
write_game(const char *filename)
|
||||||
{
|
{
|
||||||
char ztext[64];
|
|
||||||
|
|
||||||
free_units();
|
free_units();
|
||||||
remove_empty_factions(true);
|
remove_empty_factions(true);
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,7 @@ struct settings global = {
|
||||||
1000, /* maxunits */
|
1000, /* maxunits */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
static int
|
static int
|
||||||
crwritemap(void)
|
crwritemap(void)
|
||||||
{
|
{
|
||||||
|
@ -157,6 +158,7 @@ crwritemap(void)
|
||||||
fclose(F);
|
fclose(F);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
game_init(void)
|
game_init(void)
|
||||||
|
@ -319,6 +321,9 @@ lua_init(void)
|
||||||
{
|
{
|
||||||
lua_State * luaState = lua_open();
|
lua_State * luaState = lua_open();
|
||||||
luaopen_base(luaState);
|
luaopen_base(luaState);
|
||||||
|
luaopen_math(luaState);
|
||||||
|
luaopen_string(luaState);
|
||||||
|
luaopen_io(luaState);
|
||||||
luabind::open(luaState);
|
luabind::open(luaState);
|
||||||
bind_eressea(luaState);
|
bind_eressea(luaState);
|
||||||
bind_alliance(luaState);
|
bind_alliance(luaState);
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<eressea>
|
<eressea>
|
||||||
<include file="messages.xml"></include>
|
<include file="messages.xml"></include>
|
||||||
|
|
||||||
|
<include file="vinyambar/de/strings.xml"></include>
|
||||||
|
<include file="vinyambar/wdw-races.xml"></include>
|
||||||
|
<include file="vinyambar/wdw-resources.xml"></include>
|
||||||
|
|
||||||
<comment>Localization</comment>
|
<comment>Localization</comment>
|
||||||
<include file="de/strings.xml"></include>
|
<include file="de/strings.xml"></include>
|
||||||
<include file="en/strings.xml"></include>
|
<include file="en/strings.xml"></include>
|
||||||
|
@ -22,8 +26,8 @@
|
||||||
<param name="GiveRestriction" value="0"></param>
|
<param name="GiveRestriction" value="0"></param>
|
||||||
<param name="database.gameid" value="3"></param>
|
<param name="database.gameid" value="3"></param>
|
||||||
<param name="hunger.long" value="0"></param>
|
<param name="hunger.long" value="0"></param>
|
||||||
|
<param name="alliance.skilllimit" value="15"></param>
|
||||||
</game>
|
</game>
|
||||||
<include file="vinyambar/de/strings.xml"></include>
|
|
||||||
<strings>
|
<strings>
|
||||||
<string name="mailto">
|
<string name="mailto">
|
||||||
<text>vinyambar@eressea.amber.kn-bremen.de</text>
|
<text>vinyambar@eressea.amber.kn-bremen.de</text>
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
<races>
|
||||||
|
<race name="halfling" magres="0.050000" maxaura="1.000000" regaura="1.000000" recruitcost="80" maintenance="10" weight="1000" capacity="540" speed="1.000000" hp="18" ac="0" damage="1d5" unarmedattack="-2" unarmeddefense="-2" attackmodifier="0" defensemodifier="0" playerrace walk giveitem giveperson giveunit getitem equipment>
|
||||||
|
<ai splitsize="10000" attackrandom moverandom learn></ai>
|
||||||
|
<function name="itemdrop" value="halflingspoil"></function>
|
||||||
|
<skill name="sk_crossbow" modifier="0"></skill>
|
||||||
|
<skill name="sk_mining" modifier="1"></skill>
|
||||||
|
<skill name="sk_bow" modifier="-1"></skill>
|
||||||
|
<skill name="sk_building" modifier="1"></skill>
|
||||||
|
<skill name="sk_trade" modifier="2"></skill>
|
||||||
|
<skill name="sk_catapult" modifier="-1"></skill>
|
||||||
|
<skill name="sk_herbalism" modifier="2"></skill>
|
||||||
|
<skill name="sk_training" modifier="-1"></skill>
|
||||||
|
<skill name="sk_riding" modifier="-1"></skill>
|
||||||
|
<skill name="sk_shipcraft" modifier="-1"></skill>
|
||||||
|
<skill name="sk_melee" modifier="-1"></skill>
|
||||||
|
<skill name="sk_sailing" modifier="-2"></skill>
|
||||||
|
<skill name="sk_polearm" modifier="-1"></skill>
|
||||||
|
<skill name="sk_espionage" modifier="1"></skill>
|
||||||
|
<skill name="sk_roadwork" modifier="1"></skill>
|
||||||
|
<skill name="sk_stealth" modifier="1"></skill>
|
||||||
|
<skill name="sk_entertainment" modifier="1"></skill>
|
||||||
|
<skill name="sk_cartmaking" modifier="2"></skill>
|
||||||
|
<skill name="sk_perception" modifier="1"></skill>
|
||||||
|
<skill name="sk_taxation" modifier="-1"></skill>
|
||||||
|
<skill name="sk_unarmed" modifier="-99"></skill>
|
||||||
|
<attack type="1" damage="1d5"></attack>
|
||||||
|
<familiar race="owl" default></familiar>
|
||||||
|
<familiar race="rat"></familiar>
|
||||||
|
<familiar race="eagle"></familiar>
|
||||||
|
<familiar race="songdragon"></familiar>
|
||||||
|
<familiar race="eagle"></familiar>
|
||||||
|
<familiar race="rat"></familiar>
|
||||||
|
</race>
|
||||||
|
</races>
|
|
@ -0,0 +1,16 @@
|
||||||
|
<resource name="magicskillboost">
|
||||||
|
<comment>Boost a magician's skill to level 3</comment>
|
||||||
|
<item notlost weight="0">
|
||||||
|
<function name="use" value="usemagicboost"></function>
|
||||||
|
</item>
|
||||||
|
</resource>
|
||||||
|
<strings>
|
||||||
|
<string name="magicskillboost">
|
||||||
|
<text locale="de">Schriftrolle</text>
|
||||||
|
<text locale="en">scroll</text>
|
||||||
|
</string>
|
||||||
|
<string name="magicskillboost_p">
|
||||||
|
<text locale="de">Schriftrollen</text>
|
||||||
|
<text locale="en">scrolls</text>
|
||||||
|
</string>
|
||||||
|
</strings>
|
Loading…
Reference in New Issue