diff --git a/src/combined/gamecode.c b/src/combined/gamecode.c index 614ba9002..64252598c 100644 --- a/src/combined/gamecode.c +++ b/src/combined/gamecode.c @@ -27,6 +27,7 @@ #include "common/gamecode/items.c" #include "common/gamecode/laws.c" #include "common/gamecode/luck.c" +#include "common/gamecode/market.c" #include "common/gamecode/monster.c" #include "common/gamecode/randenc.c" #include "common/gamecode/report.c" diff --git a/src/common/gamecode.vcproj b/src/common/gamecode.vcproj index 9c3ad2b70..fcc9f7dc2 100644 --- a/src/common/gamecode.vcproj +++ b/src/common/gamecode.vcproj @@ -288,6 +288,14 @@ RelativePath=".\gamecode\luck.h" > + + + + diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 52935dba1..334c00d77 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -615,18 +615,13 @@ recruit(unit * u, struct order * ord, request ** recruitorders) addlist(recruitorders, o); } -#define GIVE_SELF 1 -#define GIVE_PEASANTS 2 -#define GIVE_OTHERS 4 -#define GIVE_ANY (GIVE_SELF|GIVE_PEASANTS|GIVE_OTHERS) - static void give_cmd(unit * u, order * ord) { region * r = u->region; unit *u2; const char *s; - int i, n, rule; + int i, n, rule = rule_give(); const item_type * itype; param_t p; @@ -639,7 +634,6 @@ give_cmd(unit * u, order * ord) return; } - rule = get_param_int(global.parameters, "rules.give", 7); if (getunitpeasants && (rule & GIVE_PEASANTS)==0) { ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "feedback_give_forbidden", "")); return; @@ -1508,7 +1502,7 @@ allocate_resource(unit * u, const resource_type * rtype, int want) /* nun ist amount die Gesamtproduktion der Einheit (in punkten) */ /* mit Flinkfingerring verzehnfacht sich die Produktion */ - amount += skill * MIN(u->number, get_item(u,I_RING_OF_NIMBLEFINGER)) * 9; + amount += skill * MIN(u->number, get_item(u, I_RING_OF_NIMBLEFINGER)) * (roqf_factor()-1); /* Schaffenstrunk: */ if ((dm = get_effect(u, oldpotiontype[P_DOMORE])) != 0) { @@ -2918,9 +2912,9 @@ steal_cmd(unit * u, struct order * ord, request ** stealorders) } } - i = MIN(u->number, get_item(u,I_RING_OF_NIMBLEFINGER)); + i = MIN(u->number, get_item(u, I_RING_OF_NIMBLEFINGER)); if (i > 0) { - n *= STEALINCOME * (u->number + i * 9); + n *= STEALINCOME * (u->number + i * (roqf_factor()-1)); } else { n *= u->number * STEALINCOME; } diff --git a/src/common/gamecode/give.h b/src/common/gamecode/give.h index 929dcbcaf..9f4e16a64 100644 --- a/src/common/gamecode/give.h +++ b/src/common/gamecode/give.h @@ -10,8 +10,8 @@ without prior permission by the authors of Eressea. */ -#ifndef H_KRNL_GIVE -#define H_KRNL_GIVE +#ifndef H_GC_GIVE +#define H_GC_GIVE #ifdef __cplusplus extern "C" { #endif diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index fb27ca925..4f7541c45 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -35,6 +35,7 @@ #include "randenc.h" #include "spy.h" #include "study.h" +#include "market.h" /* kernel includes */ #include @@ -997,7 +998,7 @@ quit_cmd(unit * u, struct order * ord) } else { variant var; var.i = f2_id; - object_create("quit", TINTEGER, var); + a_add(&f->attribs, object_create("quit", TINTEGER, var)); } } } @@ -1018,6 +1019,7 @@ quit(void) faction * f = *fptr; if (f->flags & FFL_QUIT) { if (EnhancedQuit()) { + /* this doesn't work well (use object_name()) */ attrib * a = a_find(f->attribs, &at_object); if (a) { variant var; @@ -2916,6 +2918,10 @@ age_building(building * b) a_age(&b->attribs); handle_event(b->attribs, "timer", b); + if (b->type->age) { + b->type->age(b); + } + return b; } @@ -3005,7 +3011,8 @@ ageing(void) /* Gebäude */ for (bp=&r->buildings;*bp;) { building * b = *bp; - b = age_building(b); + age_building(b); + if (b==*bp) bp = &b->next; } blargest = largestbuilding(r, &is_tax_building, false); @@ -3922,6 +3929,10 @@ processorders (void) create_wormholes(); } + if (get_param_int(global.parameters, "modules.markets", 0)) { + do_markets(); + } + /* immer ausführen, wenn neue Sprüche dazugekommen sind, oder sich * Beschreibungen geändert haben */ update_spells(); diff --git a/src/common/gamecode/market.c b/src/common/gamecode/market.c new file mode 100644 index 000000000..ed021ccea --- /dev/null +++ b/src/common/gamecode/market.c @@ -0,0 +1,160 @@ +/* vi: set ts=2: ++-------------------+ Christian Schlittchen +| | Enno Rehling +| Eressea PBEM host | Katja Zedel +| (c) 1998 - 2003 | Henning Peters +| | Ingo Wilken ++-------------------+ Stefan Reich + +This program may not be used, modified or distributed +without prior permission by the authors of Eressea. + +*/ +#include +#include +#include "market.h" + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +static unsigned int +get_markets(region * r, unit ** results, size_t size) +{ + unsigned int n = 0; + building * b; + static building_type * btype; + if (!btype) btype = bt_find("market"); + if (!btype) return 0; + for (b=r->buildings;nnext) { + if (b->type==btype && (b->flags&BLD_WORKING)) { + unit * u = buildingowner(r, b); + unsigned int i; + for (i=0;u && i!=n;++i) { + /* only one market per faction */ + if (results[i]->faction==u->faction) u = NULL; + } + if (u) { + results[n++] = u; + } + } + } + return n; +} + + +static void +free_market(attrib * a) +{ + item * items = (item *)a->data.v; + i_freeall(&items); + a->data.v = 0; +} + +const item_type * r_luxury(region * r) +{ + const luxury_type * ltype; + for (ltype = luxurytypes;ltype;ltype=ltype->next) { + if (r_demand(r, ltype)<0) return ltype->itype; + } + return NULL; +} + +attrib_type at_market = { + "script", + NULL, free_market, NULL, + NULL, NULL, ATF_UNIQUE +}; + +#define MAX_MARKETS 128 +void do_markets(void) +{ + unit_list * traders = 0; + unit * markets[MAX_MARKETS]; + region * r; + for (r=regions;r;r=r->next) { + if (r->land) { + int p = rpeasants(r); + int numlux = p/1000; + int numherbs = p/500; + if (numlux>0 || numherbs>0) { + int d, nmarkets = 0; + const item_type * lux = r_luxury(r); + const item_type * herb = r->land->herbtype; + + nmarkets += get_markets(r, markets+nmarkets, MAX_MARKETS-nmarkets); + for (d=0;d!=MAXDIRECTIONS;++d) { + region * r2 = rconnect(r, d); + if (r2 && r2->buildings) { + nmarkets += get_markets(r, markets+nmarkets, MAX_MARKETS-nmarkets); + } + } + while (lux && numlux--) { + int n = rng_int() % nmarkets; + unit * u = markets[n]; + item * items; + attrib * a = a_find(u->attribs, &at_market); + if (a==NULL) { + unit_list * ulist = malloc(sizeof(unit_list)); + a = a_add(&u->attribs, a_new(&at_market)); + ulist->next = traders; + ulist->data = u; + traders = ulist; + } + items = (item *)a->data.v; + i_change(&items, lux, 1); + a->data.v = items; + /* give 1 luxury */ + } + while (herb && numherbs--) { + int n = rng_int() % nmarkets; + unit * u = markets[n]; + item * items; + attrib * a = a_find(u->attribs, &at_market); + if (a==NULL) { + unit_list * ulist = malloc(sizeof(unit_list)); + a = a_add(&u->attribs, a_new(&at_market)); + ulist->next = traders; + ulist->data = u; + traders = ulist; + } + items = (item *)a->data.v; + i_change(&items, herb, 1); + a->data.v = items; + /* give 1 luxury */ + } + } + } + } + + while (traders) { + unit_list * trade = traders; + unit * u = trade->data; + attrib * a = a_find(u->attribs, &at_market); + item * items = a->data.v; + + while (items) { + item * itm = items; + items = itm->next; + + if (itm->number) { + ADDMSG(&u->faction->msgs, msg_message("buyamount", + "unit amount resource", u, itm->number, itm->type->rtype)); + i_add(&u->items, itm); + } + } + + traders = trade->next; + + a_remove(&u->attribs, a); + free(trade); + } +} diff --git a/src/common/gamecode/market.h b/src/common/gamecode/market.h new file mode 100644 index 000000000..e45fbb7a1 --- /dev/null +++ b/src/common/gamecode/market.h @@ -0,0 +1,25 @@ +/* vi: set ts=2: ++-------------------+ Christian Schlittchen +| | Enno Rehling +| Eressea PBEM host | Katja Zedel +| (c) 1998 - 2003 | Henning Peters +| | Ingo Wilken ++-------------------+ Stefan Reich + +This program may not be used, modified or distributed +without prior permission by the authors of Eressea. + +*/ +#ifndef H_GC_MARKET +#define H_GC_MARKET +#ifdef __cplusplus +extern "C" { +#endif + struct building; + + extern void do_markets(void); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/common/kernel/build.c b/src/common/kernel/build.c index 756b0a5fc..51a85e0ca 100644 --- a/src/common/kernel/build.c +++ b/src/common/kernel/build.c @@ -524,7 +524,7 @@ build_road(region * r, unit * u, int size, direction_t d) item * itm = *i_find(&u->items, olditemtype[I_RING_OF_NIMBLEFINGER]); if (itm!=NULL && itm->number>0) { int rings = MIN(u->number, itm->number); - n = n * (9*rings+u->number) / u->number; + n = n * ((roqf_factor()-1)*rings+u->number) / u->number; } } if (n < left) { @@ -591,6 +591,15 @@ matmod(const attrib * a, const unit * u, const resource_type * material, int val return value; } +int roqf_factor(void) +{ + int value = -1; + if (value<0) { + value = get_param_int(global.parameters, "rules.economy.roqf", 10); + } + return value; +} + /** Use up resources for building an object. * Build up to 'size' points of 'type', where 'completed' * of the first object have already been finished. return the @@ -699,7 +708,7 @@ build(unit * u, const construction * ctype, int completed, int want) if (itm!=NULL) i = itm->number; if (i>0) { int rings = MIN(u->number, i); - n = n * (9*rings+u->number) / u->number; + n = n * ((roqf_factor()-1)*rings+u->number) / u->number; } } diff --git a/src/common/kernel/build.h b/src/common/kernel/build.h index 4468a00c7..a727d47ac 100644 --- a/src/common/kernel/build.h +++ b/src/common/kernel/build.h @@ -82,6 +82,7 @@ void reportevent(struct region * r, char *s); void shash(struct ship * sh); void sunhash(struct ship * sh); +extern int roqf_factor(void); extern int build(struct unit * u, const construction * ctype, int completed, int want); extern int maxbuild(const struct unit *u, const construction *cons); diff --git a/src/common/kernel/building.h b/src/common/kernel/building.h index f0125733f..10da91bbc 100644 --- a/src/common/kernel/building.h +++ b/src/common/kernel/building.h @@ -61,6 +61,7 @@ typedef struct building_type { const char * (*name)(const struct building_type*, int size); void (*init)(struct building_type*); + void (*age)(struct building *); struct attrib * attribs; } building_type; diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index 158d15b84..c9ce8c7df 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -3043,6 +3043,15 @@ entertainmoney(const region *r) return n; } +int rule_give(void) +{ + static int value = -1; + if (value<0) { + value = get_param_int(global.parameters, "rules.give", 7); + } + return value; +} + /** releases all memory associated with the game state. * call this function before calling read_game() to load a new game * if you have a previously loaded state in memory. diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h index 762e672eb..fc3944a86 100644 --- a/src/common/kernel/eressea.h +++ b/src/common/kernel/eressea.h @@ -415,6 +415,14 @@ typedef struct helpmode { extern struct helpmode helpmodes[]; +extern int rule_give(void); + +#define GIVE_SELF 1 +#define GIVE_PEASANTS 2 +#define GIVE_OTHERS 4 +#define GIVE_ONDEATH 8 +#define GIVE_ANY (GIVE_SELF|GIVE_PEASANTS|GIVE_OTHERS) + extern struct attrib_type at_guard; extern void free_gamedata(void); #if 1 /* disable to count all units */ diff --git a/src/common/kernel/faction.c b/src/common/kernel/faction.c index bc0171b99..4b72715a0 100644 --- a/src/common/kernel/faction.c +++ b/src/common/kernel/faction.c @@ -263,6 +263,7 @@ destroyfaction(faction * f) faction *ff; if (!f->alive) return; + fset(f, FFL_QUIT); freelist(f->spellbook); diff --git a/src/common/kernel/item.c b/src/common/kernel/item.c index 3ad2185fc..23a0c9a77 100644 --- a/src/common/kernel/item.c +++ b/src/common/kernel/item.c @@ -386,6 +386,7 @@ static const char * it_aliases[][2] = { { "Runenschwert", "runesword" }, { "p12", "truthpotion" }, { "p1", "goliathwater" }, + { "p4", "ointment" }, { "p5", "peasantblood" }, { "p8", "nestwarmth" }, { "diamond", "adamantium" }, @@ -927,7 +928,7 @@ static void init_oldpotions(void) { const char * potionnames[MAX_POTIONS] = { - "p0", "goliathwater", "p2", "p3", "p4", "peasantblood", "p6", + "p0", "goliathwater", "p2", "p3", "ointment", "peasantblood", "p6", "p7", "nestwarmth", "p9", "p10", "p11", "truthpotion", "p13", "p14" }; int p; diff --git a/src/common/kernel/region.h b/src/common/kernel/region.h index 097f128c8..3cf61d525 100644 --- a/src/common/kernel/region.h +++ b/src/common/kernel/region.h @@ -239,9 +239,9 @@ struct faction * region_get_owner(const struct region * r); struct region * r_connect(const struct region *, direction_t dir); #ifdef FAST_CONNECT -# define rconnect(r, dir) ((r)->connect[dir]?(r)->connect[dir]:r_connect(r, dir)) +# define rconnect(r, dir) ((r)->connect[dir]?(r)->connect[dir]:r_connect(r, (direction_t)dir)) #else -# define rconnect(r, dir) r_connect(r, dir) +# define rconnect(r, dir) r_connect(r, (direction_t)dir) #endif void free_regions(void); diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index f0d209a67..ef51d0be4 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -214,6 +214,13 @@ gift_items(unit * u, int flags) region * r = u->region; item ** itm_p = &u->items; int retval = 0; + int rule = rule_give(); + + if ((u->faction->flags&FFL_QUIT)==0 || (rule&GIVE_ONDEATH)==0) { + if ((rule&GIVE_OTHERS)==0 && (flags&GIFT_FRIENDS)) flags-=GIFT_FRIENDS; + if ((rule&GIVE_PEASANTS)==0 && (flags&GIFT_PEASANTS)) flags-=GIFT_PEASANTS; + if ((rule&GIVE_SELF)==0 && (flags&GIFT_SELF)) flags-=GIFT_SELF; + } if (u->items==NULL || fval(u->race, RCF_ILLUSIONARY)) return 0; if ((u->race->ec_flags & GIVEITEM) == 0) return 0; diff --git a/src/common/kernel/xmlreader.c b/src/common/kernel/xmlreader.c index 498e16d64..ef5dd5126 100644 --- a/src/common/kernel/xmlreader.c +++ b/src/common/kernel/xmlreader.c @@ -313,6 +313,8 @@ parse_buildings(xmlDocPtr doc) btype->name = (const char * (*)(const struct building_type*, int))fun; } else if (strcmp((const char*)propValue, "init")==0) { btype->init = (void (*)(struct building_type*))fun; + } else if (strcmp((const char*)propValue, "age")==0) { + btype->age = (void (*)(struct building*))fun; } else { log_error(("unknown function type '%s' for building %s\n", (const char*)propValue, btype->_name)); diff --git a/src/eressea/tolua/helpers.c b/src/eressea/tolua/helpers.c index 107a17989..5e5df8d88 100644 --- a/src/eressea/tolua/helpers.c +++ b/src/eressea/tolua/helpers.c @@ -345,6 +345,32 @@ lua_wage(const region * r, const faction * f, const race * rc) return result; } +static void +lua_agebuilding(building * b) +{ + lua_State * L = (lua_State *)global.vm_state; + char fname[64]; + + snprintf(fname, sizeof(fname), "age_%s", b->type->_name); + + lua_pushstring(L, fname); + lua_rawget(L, LUA_GLOBALSINDEX); + if (lua_isfunction(L, 1)) { + tolua_pushusertype(L, (void *)b, "building"); + + if (lua_pcall(L, 1, 0, 0)!=0) { + const char* error = lua_tostring(L, -1); + log_error(("agebuilding(%s) calling '%s': %s.\n", + buildingname(b), fname, error)); + lua_pop(L, 1); + } + } else { + log_error(("agebuilding(%s) calling '%s': not a function.\n", + buildingname(b), fname)); + lua_pop(L, 1); + } +} + static int lua_maintenance(const unit * u) { @@ -473,6 +499,7 @@ register_tolua_helpers(void) { at_building_action.age = lc_age; + register_function((pf_generic)&lua_agebuilding, "lua_agebuilding"); register_function((pf_generic)&lua_recruit, "lua_recruit"); register_function((pf_generic)&lua_callspell, "lua_castspell"); register_function((pf_generic)&lua_initfamiliar, "lua_initfamiliar"); diff --git a/src/res/de/strings.xml b/src/res/de/strings.xml index 2a9b21e33..6016d01d3 100644 --- a/src/res/de/strings.xml +++ b/src/res/de/strings.xml @@ -1772,7 +1772,7 @@ Schaffenstrunk - + Wundsalbe @@ -1818,7 +1818,7 @@ Schaffenstrünke - + Wundsalben @@ -3803,7 +3803,7 @@ Allow a Tangy Temerity to simmer for three hours in a litre of water, then add a grated Mandrake, and sprinkle in a Gapgrowth harvested at full moon. The whole brew should then be allowed to stew for three days in a warm place. This potion increases the strength and endurance of ten men so that they can achieve twice as much in a week. Man lasse einen Würzigen Wagemut drei Stunden lang in einem Liter Wasser köcheln. Dann gebe man eine geriebene Alraune dazu und bestreue das ganze mit bei Vollmond geerntetem Spaltwachs. Nun lasse man den Sud drei Tage an einem dunklen und warmen Ort ziehen und seie dann die Flüssigkeit ab. Dieser Schaffenstrunk erhöht die Kraft und Ausdauer von zehn Männern, so daß sie doppelt soviel schaffen können wie sonst. - + When one is severely wounded after a hard battle it is advisable to have some Ointment to hand. Applied to wounds, this magical paste closes them in the blink of an eye. For the preparation the alchemist requires a cobalt fungus, tangy temerity, and white hemlock. A dose of the potion heals up to 400 hitpoints. Ist man nach einem einem harten Kampf schwer verwundet, ist es ratsam, etwas Wundsalbe parat zu haben. Streicht man diese magische Paste auf die Wunden, schließen sich diese augenblicklich. Für die Herstellung benötigt der Alchemist nebst einem Blauen Baumringel einen Würzigen Wagemut und einen Weißen Wüterich. Eine solche Portion heilt bis zu 400 Lebenspunkte. diff --git a/src/res/e2k9.xml b/src/res/e2k9.xml index c62f56bd7..e99d29ac5 100644 --- a/src/res/e2k9.xml +++ b/src/res/e2k9.xml @@ -55,6 +55,7 @@ + @@ -106,6 +107,7 @@ + @@ -129,7 +131,8 @@ - + + diff --git a/src/res/e2k9/buildings.xml b/src/res/e2k9/buildings.xml index 4b38e10fa..ca51a0841 100644 --- a/src/res/e2k9/buildings.xml +++ b/src/res/e2k9/buildings.xml @@ -10,5 +10,13 @@ + + + + + + + + diff --git a/src/res/e2k9/races.xml b/src/res/e2k9/races.xml index aeb95f895..0053611ec 100644 --- a/src/res/e2k9/races.xml +++ b/src/res/e2k9/races.xml @@ -3,7 +3,7 @@ - + @@ -24,7 +24,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -92,7 +92,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -135,7 +135,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -213,7 +213,7 @@ - + @@ -259,7 +259,7 @@ - + @@ -284,7 +284,7 @@ - + @@ -309,7 +309,7 @@ - + @@ -333,7 +333,7 @@ - + @@ -361,7 +361,7 @@ - + @@ -385,7 +385,7 @@ - + @@ -411,7 +411,7 @@ - + @@ -438,7 +438,7 @@ - + @@ -489,7 +489,7 @@ - + @@ -513,7 +513,7 @@ - + @@ -542,7 +542,7 @@ - + @@ -591,7 +591,7 @@ - + @@ -617,7 +617,7 @@ - + @@ -641,16 +641,16 @@ - + - + - + @@ -658,7 +658,7 @@ - + @@ -683,7 +683,7 @@ - + @@ -708,43 +708,43 @@ - + - + - + - + - + - + - + @@ -752,27 +752,27 @@ - + - + - + - + @@ -783,7 +783,7 @@ - + @@ -795,7 +795,7 @@ - + @@ -807,13 +807,13 @@ - + - + @@ -821,7 +821,7 @@ - + @@ -847,18 +847,18 @@ - + - + - + @@ -871,7 +871,7 @@ - + @@ -889,7 +889,7 @@ - + @@ -908,7 +908,7 @@ - + @@ -925,7 +925,7 @@ - + @@ -941,7 +941,7 @@ - + @@ -957,7 +957,7 @@ - + @@ -973,13 +973,13 @@ - + - + @@ -991,7 +991,7 @@ - + @@ -1005,14 +1005,14 @@ - + - + @@ -1022,7 +1022,7 @@ - + diff --git a/src/res/e2k9/spells.xml b/src/res/e2k9/spells.xml index 84ab3f5c3..24bc6f4ca 100644 --- a/src/res/e2k9/spells.xml +++ b/src/res/e2k9/spells.xml @@ -364,6 +364,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/res/e2k9/strings.xml b/src/res/e2k9/strings.xml index e3d6a00e3..866e305e5 100644 --- a/src/res/e2k9/strings.xml +++ b/src/res/e2k9/strings.xml @@ -19,6 +19,10 @@ Wache watch + + Marktplatz + marketplace + Streitross @@ -28,4 +32,49 @@ Streitrösser chargers + + + Siebenmeilentee + seven mile tea + + + Wasser des Lebens + water of life + + + + + For Seven Mile Tea, boil up a Cobalt Fungus and pour the resulting brew into a Windbag. Catch and filter the liquid that drips out and administer it. This tea allows up to ten men to move as fast as a horse. + Für den Siebenmeilentee koche man einen Blauen Baumringel auf und gieße dieses Gebräu in einen Windbeutel. Das heraustropfende Wasser fange man auf, filtere es und verabreiche es alsdann. Durch diesen Tee können bis zu zehn Menschen schnell wie ein Pferd laufen. + + + The "Water of Life" allows living trees to be created from logs. A Knotroot and Elvendear are heated until one can just still keep one's finger in. This is then poured into a jar and allowed to cool slowly. The extract is sufficient for 10 pieces of wood. + Das 'Wasser des Lebens' ist in der Lage, aus gefällten Baumstämmen wieder lebende Bäume zu machen. Dazu wird ein knotiger Saugwurz zusammen mit einem Elfenlieb erwärmt, so daß man gerade noch den Finger reinhalten kann. Dies gieße man in ein Gefäß und lasse es langsam abkühlen. Der Extrakt reicht für 10 Holzstämme. + + + Allow a Tangy Temerity to simmer for three hours in a litre of water, then add a grated Mandrake, and sprinkle in a Gapgrowth harvested at full moon. The whole brew should then be allowed to stew for three days in a warm place. This potion increases the strength and endurance of ten men so that they can achieve twice as much in a week. + Man lasse einen Würzigen Wagemut drei Stunden lang in einem Liter Wasser köcheln. Dann gebe man eine geriebene Alraune dazu und bestreue das ganze mit bei Vollmond geerntetem Spaltwachs. Nun lasse man den Sud drei Tage an einem dunklen und warmen Ort ziehen und seie dann die Flüssigkeit ab. Dieser Schaffenstrunk erhöht die Kraft und Ausdauer von zehn Männern, so daß sie doppelt soviel schaffen können wie sonst. + + + When one is severely wounded after a hard battle it is advisable to have some Ointment to hand. Applied to wounds, this magical paste closes them in the blink of an eye. For the preparation the alchemist requires a cobalt fungus, tangy temerity, and white hemlock. A dose of the potion heals up to 400 hitpoints. + Ist man nach einem einem harten Kampf schwer verwundet, ist es ratsam, etwas Wundsalbe parat zu haben. Streicht man diese magische Paste auf die Wunden, schließen sich diese augenblicklich. Für die Herstellung benötigt der Alchemist nebst einem Blauen Baumringel einen Würzigen Wagemut und einen Weißen Wüterich. Eine solche Portion heilt bis zu 400 Lebenspunkte. + + + Knowledge of this potion is amongst the most dangerous and secret wisdom of the alchemist. Snatched from the darkest hells, the knowledge of this formula enables the production of an elixer which serves Demons as nourishment. If used by normal beings it leads to a swift death and eternal undeath. The creation requires Fjord Fungus together with some Cave Lichen and Cobalt Fungus, and an unfortunate peasant from the region, who is killed in the bloody days-long ritual. One vial of the potion satisfies the hunger of 100 Demons for a week. + Zu den gefährlichsten und geheimsten Wissen der Alchemisten zählt die Kenntnis um diesen Trank. Den finstersten Höllen entrissen, ermöglicht die Kenntnis dieser Formel die Herstellung eines Elixiers, welches Dämonen als Nahrung dient. Von normalen Lebewesen eingenommen, führt es zu schnellem Tod und ewigen Nichtleben. Die Herstellung benötigt nebst Fjordwuchs, etwas Höhlenglimm und einem Blauen Baumringel auch einen Bauern aus der Region, welcher in einem tagelangen blutigen Ritual getötet wird. Ein Fläschchen des Tranks kann den Hunger von 100 Dämonen für eine Woche stillen. + + + To make a horsepower potion, chop a peyote, a cobalt fungus and some knotroot, and boil it in a bucketful of water. Then add some sand reeker and let the mixture steep for three days. Finally one gives this to the horses to drink, to double their procreation. + Für das Pferdeglück zerhacke man einen Kakteenschwitz, einen blauen Baumringel und etwas knotigen Saugwurz und koche das ganze mit einem Eimer Wasser auf. Dann füge man etwas Sandfäule dazu und lasse diesen Sud drei Tage lang ziehen. Letztlich gebe man es den Pferden zu trinken, auf daß sie sich doppelt so schnell vermehren. + + + One of the most rare and prized of all alchemist elixers, this potion grants the user a dragon's power for a few weeks. The potion increases the life-energy of a maximum of ten people fivefold. The effect is strongest right after drinking and slowly decreases over time. To brew this potion the alchemist needs an elvendear, a windbag, a piece of waterfinder and a spider ivy. Finally he dusts it with some minced bubblemorel and stirrs the powder into some dragon's blood. + Eines der seltensten und wertvollsten alchemistischen Elixiere, verleiht dieser Trank dem Anwender für einige Wochen die Kraft eines Drachen. Der Trank erhöht die Lebensenergie von maximal zehn Personen auf das fünffache. Die Wirkung ist direkt nach der Einnahme am stärksten und klingt danach langsam ab. Zur Herstellung benötigt der Alchemist ein Elfenlieb, einen Windbeutel, ein Stück Wasserfinder und einen Grünen Spinnerich. Über dieses Mischung streue er schließlich einen zerriebenen Blasenmorchel und rühre dieses Pulver unter etwas Drachenblut. + + + For a healing potion one takes the peel of a windbag and some bugleweed, stirr in some chopped elvendear and sprinkle it with the blossoms of an ice begonia. This has to cook through for four days, while a gapgrowth has to be added on the second day. Then one carefully scoops off the top layer of liquid. One such potion gives four men (or one man four times) a 50% chance to survive otherwise lethal wounds. The potion is automatically used in case of injury. + Für einen Heiltrank nehme man die Schale eines Windbeutels und etwas Gurgelkraut, rühre eine kleingehacktes Elfenlieb dazu und bestreue alles mit den Blüten einer Eisblume. Dies muß vier Tage lang gären, wobei man am zweiten Tag einen Spaltwachs dazutun muß. Dann ziehe man vorsichtig den oben schwimmenden Saft ab. Ein solcher Trank gibt vier Männern (oder einem Mann vier mal) im Kampf eine Chance von 50%, sonst tödliche Wunden zu überleben. Der Trank wird von ihnen automatisch bei Verletzung angewandt. + + + diff --git a/src/res/en/strings.xml b/src/res/en/strings.xml index 37d80e02d..a2297f6cf 100644 --- a/src/res/en/strings.xml +++ b/src/res/en/strings.xml @@ -1086,10 +1086,10 @@ busybeers - + ointment - + ointments diff --git a/src/scripts/spells.lua b/src/scripts/spells.lua index e6db19a75..9c3bd022d 100644 --- a/src/scripts/spells.lua +++ b/src/scripts/spells.lua @@ -6,14 +6,57 @@ function creation_message(mage, type) return msg end --- Erschaffe ein Flammenschwert -local function create_item(mage, level, name) +local function create_item(mage, level, name, count) local msg = creation_message(mage, name) msg:send_faction(mage.faction) - mage:add_item(name, 1); + if count==nil then + mage:add_item(name, 1); + else + mage:add_item(name, count); + end return level end +-- Wasser des Lebens +function create_potion_p2(r, mage, level, force) + return create_item(mage, level, "p2", level/2) +end + +-- Siebenmeilentee +function create_potion_p0(r, mage, level, force) + return create_item(mage, level, "p0", level/2) +end + +-- Wundsalbe +function create_potion_ointment(r, mage, level, force) + return create_item(mage, level, "ointment", level/2) +end + +-- Bauernblut +function create_potion_peasantblood(r, mage, level, force) + return create_item(mage, level, "peasantblood", level/2) +end + +-- Pferdeglück +function create_potion_p9(r, mage, level, force) + return create_item(mage, level, "p9", level/2) +end + +-- Schaffenstrunk +function create_potion_p3(r, mage, level, force) + return create_item(mage, level, "p3", level/2) +end + +-- Heiltrank +function create_potion_p14(r, mage, level, force) + return create_item(mage, level, "p14", level/2) +end + +-- Elixier der Macht +function create_potion_p13(r, mage, level, force) + return create_item(mage, level, "p13", level/2) +end + -- Erschaffe ein Flammenschwert function create_firesword(r, mage, level, force) return create_item(mage, level, "firesword")