Forsche Kräuter Meldung steht nur in Regionsmeldung

- http://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000165
  Regionsmeldung "LERNEN Hiebwaffen"
This commit is contained in:
Enno Rehling 2004-07-07 22:02:42 +00:00
parent 6899c4aae8
commit 3449399eec
7 changed files with 83 additions and 46 deletions

View File

@ -250,6 +250,13 @@ print_curses(FILE * F, const faction * viewer, const void * obj, typ_t typ)
self = c->type->cansee(viewer, obj, typ, c, self);
}
dh = c->type->curseinfo(viewer->locale, obj, typ, c, self);
}
if (dh==0) {
if (c->type->info_str!=NULL) {
strcpy(buf, c->type->info_str);
} else {
sprintf(buf, "an unknown curse lies on the region. (%s)", itoa36(c->no));
}
}
if (dh==1) {
if (!header) {

View File

@ -2466,11 +2466,13 @@ static void
research_cmd(unit *u, struct order * ord)
{
region *r = u->region;
const char *s = getstrtoken();
init_tokens(ord);
skip_token();
if (findparam(s, u->faction->locale) == P_HERBS) {
/*
const char *s = getstrtoken();
if (findparam(s, u->faction->locale) == P_HERBS) { */
if (eff_skill(u, SK_HERBALISM, r) < 7) {
cmistake(u, ord, 227, MSG_EVENT);
@ -2495,7 +2497,6 @@ research_cmd(unit *u, struct order * ord)
"researchherb_none%u:unit%r:region", u, r));
}
}
}
static int
wahrnehmung(region * r, faction * f)

View File

@ -33,10 +33,15 @@
#include "skill.h"
#include "unit.h"
/* triggers includes */
#include <triggers/changerace.h>
#include <triggers/timeout.h>
/* util includes */
#include <message.h>
#include <functions.h>
#include <goodies.h>
#include <util/event.h>
#include <util/functions.h>
#include <util/goodies.h>
#include <util/message.h>
/* libc includes */
#include <assert.h>

View File

@ -1290,6 +1290,7 @@ travel(unit * u, region * next, int flucht, region_list ** routep)
if (can_survive(ut, current)) {
travel_route(ut, ut->region, route);
move_unit(ut, current, NULL);
// FOLGE!
} else {
cmistake(u, u->thisorder, 287, MSG_MOVE);
cmistake(ut, ut->thisorder, 230, MSG_MOVE);

View File

@ -50,9 +50,11 @@ cinfo_region(const struct locale * lang, const void * obj, typ_t typ, struct cur
if (msg) {
nr_render(msg, lang, buf, sizeof(buf), NULL);
msg_release(msg);
}
return 1;
}
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
return 0;
}
/* --------------------------------------------------------------------- */
@ -78,11 +80,15 @@ cinfo_cursed_by_the_gods(const struct locale * lang, const void * obj, typ_t typ
} else {
msg = msg_message("curseinfo::godcurseocean", "id", c->no);
}
if (msg!=NULL) {
nr_render(msg, lang, buf, sizeof(buf), NULL);
msg_release(msg);
return 1;
}
return 0;
}
static struct curse_type ct_godcursezone = {
"godcursezone",
CURSETYP_NORM, 0, (NO_MERGE),
@ -113,11 +119,14 @@ cinfo_dreamcurse(const struct locale * lang, const void * obj, typ_t typ, curse
} else {
msg = msg_message("curseinfo::baddream", "id", c->no);
}
if (msg!=NULL) {
nr_render(msg, lang, buf, sizeof(buf), NULL);
msg_release(msg);
return 1;
}
return 0;
}
static struct curse_type ct_gbdream = {
"gbdream",
CURSETYP_NORM, 0, (NO_MERGE),
@ -147,11 +156,14 @@ cinfo_magicstreet(const struct locale * lang, const void * obj, typ_t typ, curse
} else {
msg = msg_message("curseinfo::magicstreetwarn", "id", c->no);
}
if (msg!=NULL) {
nr_render(msg, lang, buf, sizeof(buf), NULL);
msg_release(msg);
return 1;
}
return 0;
}
static struct curse_type ct_magicstreet = {
"magicstreet",
CURSETYP_NORM, 0, (M_DURATION | M_VIGOUR),
@ -351,7 +363,7 @@ static struct curse_type ct_goodmagicresistancezone = {
static struct curse_type ct_riotzone = {
"riotzone",
CURSETYP_NORM, 0, (M_DURATION),
"Eine Wolke negativer Energie liegt über der Region.",
NULL,
cinfo_region
};
static struct curse_type ct_holyground = {

View File

@ -49,10 +49,13 @@ cinfo_unit(const struct locale * lang, const void * obj, typ_t typ, struct curse
assert(typ == TYP_UNIT);
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
if (msg==NULL) {
nr_render(msg, lang, buf, sizeof(buf), NULL);
msg_release(msg);
return 1;
}
return 0;
}
static int
cinfo_unit_onlyowner(const struct locale * lang, const void * obj, typ_t typ, struct curse *c, int self)

View File

@ -17,6 +17,14 @@
<text locale="fr">"The power of $unit($mage) flows into the region and the trees which survived the spell appear stronger now."</text>
<text locale="en">"The power of $unit($mage) flows into the region and the trees which survived the spell appear stronger now."</text>
</message>
<message name="curseinfo::riotzone" section="events">
<type>
<arg name="id" type="int"/>
</type>
<text locale="de">"Eine Wolke negativer Energie liegt über der Region. ($int36($id))"</text>
<text locale="fr">"A fog of negative energy enshrouds the region. ($int36($id))"</text>
<text locale="en">"A fog of negative energy enshrouds the region. ($int36($id))"</text>
</message>
<message name="curseinfo::orcish" section="events">
<type>
<arg name="unit" type="unit"/>