forked from github/server
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:
parent
6899c4aae8
commit
3449399eec
|
@ -245,13 +245,20 @@ print_curses(FILE * F, const faction * viewer, const void * obj, typ_t typ)
|
|||
if (fval(a->type, ATF_CURSE)) {
|
||||
|
||||
c = (curse *)a->data.v;
|
||||
if (c->type->curseinfo){
|
||||
if (c->type->cansee){
|
||||
if (c->type->curseinfo) {
|
||||
if (c->type->cansee) {
|
||||
self = c->type->cansee(viewer, obj, typ, c, self);
|
||||
}
|
||||
dh = c->type->curseinfo(viewer->locale, obj, typ, c, self);
|
||||
}
|
||||
if (dh == 1) {
|
||||
}
|
||||
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) {
|
||||
header = 1;
|
||||
fputs("EFFECTS\n", F);
|
||||
|
|
|
@ -2466,35 +2466,36 @@ 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 (eff_skill(u, SK_HERBALISM, r) < 7) {
|
||||
cmistake(u, ord, 227, MSG_EVENT);
|
||||
return;
|
||||
}
|
||||
if (findparam(s, u->faction->locale) == P_HERBS) { */
|
||||
|
||||
produceexp(u, SK_HERBALISM, u->number);
|
||||
if (eff_skill(u, SK_HERBALISM, r) < 7) {
|
||||
cmistake(u, ord, 227, MSG_EVENT);
|
||||
return;
|
||||
}
|
||||
|
||||
if (rherbs(r) > 0) {
|
||||
const herb_type *rht = rherbtype(r);
|
||||
produceexp(u, SK_HERBALISM, u->number);
|
||||
|
||||
if (rht != NULL) {
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"researchherb%u:unit%r:region%s:amount%X:herb", u, r,
|
||||
rough_amount(rherbs(r), 100), rht->itype->rtype));
|
||||
} else {
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"researchherb_none%u:unit%r:region", u, r));
|
||||
}
|
||||
} else {
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"researchherb_none%u:unit%r:region", u, r));
|
||||
}
|
||||
}
|
||||
if (rherbs(r) > 0) {
|
||||
const herb_type *rht = rherbtype(r);
|
||||
|
||||
if (rht != NULL) {
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"researchherb%u:unit%r:region%s:amount%X:herb", u, r,
|
||||
rough_amount(rherbs(r), 100), rht->itype->rtype));
|
||||
} else {
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"researchherb_none%u:unit%r:region", u, r));
|
||||
}
|
||||
} else {
|
||||
add_message(&u->faction->msgs, new_message(u->faction,
|
||||
"researchherb_none%u:unit%r:region", u, r));
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -50,8 +50,10 @@ 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;
|
||||
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);
|
||||
}
|
||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||
msg_release(msg);
|
||||
if (msg!=NULL) {
|
||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||
msg_release(msg);
|
||||
|
||||
return 1;
|
||||
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);
|
||||
}
|
||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||
msg_release(msg);
|
||||
|
||||
return 1;
|
||||
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);
|
||||
}
|
||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||
msg_release(msg);
|
||||
|
||||
return 1;
|
||||
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 = {
|
||||
|
|
|
@ -49,9 +49,12 @@ 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);
|
||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||
msg_release(msg);
|
||||
return 1;
|
||||
if (msg==NULL) {
|
||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||
msg_release(msg);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -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"/>
|
||||
|
|
Loading…
Reference in New Issue