forked from github/server
Merge branch 'develop' of https://github.com/ennorehling/eressea.git
This commit is contained in:
commit
23b9774495
5 changed files with 6 additions and 28 deletions
|
@ -7512,7 +7512,7 @@
|
||||||
<arg name="mage" type="unit"/>
|
<arg name="mage" type="unit"/>
|
||||||
<arg name="building" type="building"/>
|
<arg name="building" type="building"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($mage) weight $building($building)."</text>
|
<text locale="de">"$unit($mage) weiht $building($building)."</text>
|
||||||
<text locale="en">"$unit($mage) blesses $building($building)."</text>
|
<text locale="en">"$unit($mage) blesses $building($building)."</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
|
|
@ -1172,7 +1172,6 @@ void u_setfaction(unit * u, faction * f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vorsicht Sprueche koennen u->number == RS_FARVISION haben! */
|
|
||||||
void set_number(unit * u, int count)
|
void set_number(unit * u, int count)
|
||||||
{
|
{
|
||||||
assert(count >= 0);
|
assert(count >= 0);
|
||||||
|
|
|
@ -184,12 +184,6 @@ extern "C" {
|
||||||
SPC_LINEAR /* Komponenten pro Level und müssen vorhanden sein */
|
SPC_LINEAR /* Komponenten pro Level und müssen vorhanden sein */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
|
||||||
RS_DUMMY,
|
|
||||||
RS_FARVISION,
|
|
||||||
MAX_REGIONSPELLS
|
|
||||||
};
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
/* Prototypen */
|
/* Prototypen */
|
||||||
|
|
||||||
|
|
|
@ -1308,17 +1308,6 @@ static void cb_add_seen(region *r, unit *u, void *cbdata) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool unit_cansee(const unit *u)
|
|
||||||
{
|
|
||||||
const race *rc = u_race(u);
|
|
||||||
static const race *rc_spell;
|
|
||||||
static int rc_cache;
|
|
||||||
if (rc_changed(&rc_cache)) {
|
|
||||||
rc_spell = get_race(RC_SPELL);
|
|
||||||
}
|
|
||||||
return (rc!=rc_spell || u->number == RS_FARVISION);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** set region.seen based on visibility by one faction.
|
/** set region.seen based on visibility by one faction.
|
||||||
*
|
*
|
||||||
* this function may also update ctx->last and ctx->first for potential
|
* this function may also update ctx->last and ctx->first for potential
|
||||||
|
@ -1355,9 +1344,7 @@ void prepare_report(report_context *ctx, faction *f)
|
||||||
u = building_owner(b);
|
u = building_owner(b);
|
||||||
if (u && u->faction==f) {
|
if (u && u->faction==f) {
|
||||||
prepare_lighthouse(b, ctx);
|
prepare_lighthouse(b, ctx);
|
||||||
if (unit_cansee(u)) {
|
add_seen_nb(f, r, seen_unit);
|
||||||
add_seen_nb(f, r, seen_unit);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1366,9 +1353,7 @@ void prepare_report(report_context *ctx, faction *f)
|
||||||
}
|
}
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
if (u->faction==f) {
|
if (u->faction==f) {
|
||||||
if (unit_cansee(u)) {
|
add_seen_nb(f, r, seen_unit);
|
||||||
add_seen_nb(f, r, seen_unit);
|
|
||||||
}
|
|
||||||
if (fval(r, RF_LIGHTHOUSE)) {
|
if (fval(r, RF_LIGHTHOUSE)) {
|
||||||
if (u->building && u->building->type == bt_lighthouse && inside_building(u)) {
|
if (u->building && u->building->type == bt_lighthouse && inside_building(u)) {
|
||||||
/* we are in a lighthouse. add the regions we can see from here! */
|
/* we are in a lighthouse. add the regions we can see from here! */
|
||||||
|
|
|
@ -4168,7 +4168,7 @@ static int sp_pump(castorder * co)
|
||||||
}
|
}
|
||||||
|
|
||||||
u =
|
u =
|
||||||
create_unit(rt, mage->faction, RS_FARVISION, get_race(RC_SPELL), 0,
|
create_unit(rt, mage->faction, 1, get_race(RC_SPELL), 0,
|
||||||
"spell/pump", NULL);
|
"spell/pump", NULL);
|
||||||
u->age = 2;
|
u->age = 2;
|
||||||
set_level(u, SK_PERCEPTION, effskill(target, SK_PERCEPTION, 0));
|
set_level(u, SK_PERCEPTION, effskill(target, SK_PERCEPTION, 0));
|
||||||
|
@ -4812,7 +4812,7 @@ int sp_dreamreading(castorder * co)
|
||||||
}
|
}
|
||||||
|
|
||||||
u2 =
|
u2 =
|
||||||
create_unit(u->region, mage->faction, RS_FARVISION, get_race(RC_SPELL), 0,
|
create_unit(u->region, mage->faction, 1, get_race(RC_SPELL), 0,
|
||||||
"spell/dreamreading", NULL);
|
"spell/dreamreading", NULL);
|
||||||
set_number(u2, 1);
|
set_number(u2, 1);
|
||||||
u2->age = 2; /* Nur fuer diese Runde. */
|
u2->age = 2; /* Nur fuer diese Runde. */
|
||||||
|
@ -5691,7 +5691,7 @@ int sp_viewreality(castorder * co)
|
||||||
region *rt = rl2->data;
|
region *rt = rl2->data;
|
||||||
if (!is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
|
if (!is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
|
||||||
u =
|
u =
|
||||||
create_unit(rt, mage->faction, RS_FARVISION, get_race(RC_SPELL), 0,
|
create_unit(rt, mage->faction, 1, get_race(RC_SPELL), 0,
|
||||||
"spell/viewreality", NULL);
|
"spell/viewreality", NULL);
|
||||||
set_level(u, SK_PERCEPTION, co->level / 2);
|
set_level(u, SK_PERCEPTION, co->level / 2);
|
||||||
u->age = 2;
|
u->age = 2;
|
||||||
|
|
Loading…
Reference in a new issue