forked from github/server
- GUARD_DISABLES_PRODUCTION
- Bewache wirkt nur noch, wenn der Bewacher den Bewachten sieht
This commit is contained in:
parent
d81be270aa
commit
4e076dd4ae
File diff suppressed because it is too large
Load Diff
|
@ -688,7 +688,7 @@ horses(region * r)
|
|||
rsethorses(r, (int)(horses*0.9));
|
||||
} else if (maxhorses > 0) {
|
||||
int i;
|
||||
int growth = (HORSEGROWTH * 200 * (maxhorses-horses))/maxhorses;
|
||||
int growth = (RESOURCE_QUANTITY * HORSEGROWTH * 200 * (maxhorses-horses))/maxhorses;
|
||||
|
||||
if(a_find(r->attribs, &at_horseluck)) growth *= 2;
|
||||
/* printf("Horses: <%d> %d -> ", growth, horses); */
|
||||
|
@ -3029,6 +3029,7 @@ maxunits(faction *f)
|
|||
return (int) (global.maxunits * (1 + 0.4 * fspecial(f, FS_ADMINISTRATOR)));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
new_units (void)
|
||||
{
|
||||
|
|
|
@ -1866,15 +1866,14 @@ report(FILE *F, faction * f, const faction_list * addresses,
|
|||
}
|
||||
|
||||
if (f->age <= 2) {
|
||||
/* doppelt gemoppelt und funktioniert nicht. */
|
||||
if (f->age <= 1) {
|
||||
ADDMSG(&f->msgs, msg_message("changepasswd",
|
||||
"value", gc_add(strdup(f->passw))));
|
||||
}
|
||||
/* Was tut das? */
|
||||
RENDER(f, buf, sizeof(buf), ("newbie_password", "password", f->passw));
|
||||
rnl(F);
|
||||
centre(F, buf, true);
|
||||
rnl(F);
|
||||
centre(F, LOC(f->locale, "newbie_info_1"), true);
|
||||
rnl(F);
|
||||
centre(F, LOC(f->locale, "newbie_info_2"), true);
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "race.h"
|
||||
#include "unit.h"
|
||||
#include "skill.h"
|
||||
#include "movement.h"
|
||||
|
||||
/* util includes */
|
||||
#include <rand.h>
|
||||
|
@ -50,11 +51,17 @@ herbsearch(region * r, unit * u, int max)
|
|||
{
|
||||
int herbsfound;
|
||||
const herb_type * whichherb;
|
||||
|
||||
if (eff_skill(u, SK_HERBALISM, r) == 0) {
|
||||
cmistake(u, u->thisorder, 59, MSG_PRODUCE);
|
||||
return;
|
||||
}
|
||||
|
||||
if(is_guarded(r, u, GUARD_PRODUCE)) {
|
||||
cmistake(u, findorder(u, u->thisorder), 70, MSG_EVENT);
|
||||
return;
|
||||
}
|
||||
|
||||
whichherb = rherbtype(r);
|
||||
if (whichherb == NULL) {
|
||||
cmistake(u, u->thisorder, 108, MSG_PRODUCE);
|
||||
|
|
|
@ -796,31 +796,41 @@ cansee(const faction * f, const region * r, const unit * u, int modifier)
|
|||
int n;
|
||||
boolean cansee = false;
|
||||
unit *u2;
|
||||
if (u->faction == f || omniscient(f)) cansee = true;
|
||||
else if (old_race(u->race) == RC_SPELL || u->number == 0) return false;
|
||||
else {
|
||||
n = eff_stealth(u, r) - modifier;
|
||||
for (u2 = r->units; u2; u2 = u2->next) {
|
||||
if (u2->faction == f) {
|
||||
int o;
|
||||
|
||||
if (getguard(u) || usiege(u) || u->building || u->ship) {
|
||||
cansee = true;
|
||||
break;
|
||||
}
|
||||
if (get_item(u, I_RING_OF_INVISIBILITY) >= u->number
|
||||
&& !get_item(u2, I_AMULET_OF_TRUE_SEEING))
|
||||
continue;
|
||||
if (u->faction == f || omniscient(f)) {
|
||||
return true;
|
||||
} else if (old_race(u->race) == RC_SPELL) {
|
||||
return false;
|
||||
} else if (u->number == 0) {
|
||||
attrib *a = a_find(u->attribs, &at_creator);
|
||||
if(a) { /* u is an empty temporary unit. In this special case
|
||||
we look at the creating unit. */
|
||||
u = (unit *)a->data.v;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
n = eff_stealth(u, r) - modifier;
|
||||
for (u2 = r->units; u2; u2 = u2->next) {
|
||||
if (u2->faction == f) {
|
||||
int o;
|
||||
|
||||
o = eff_skill(u2, SK_OBSERVATION, r);
|
||||
if (getguard(u) || usiege(u) || u->building || u->ship) {
|
||||
cansee = true;
|
||||
break;
|
||||
}
|
||||
if (get_item(u, I_RING_OF_INVISIBILITY) >= u->number
|
||||
&& !get_item(u2, I_AMULET_OF_TRUE_SEEING))
|
||||
continue;
|
||||
|
||||
o = eff_skill(u2, SK_OBSERVATION, r);
|
||||
#if NIGHTEYES
|
||||
if (u2->enchanted == SP_NIGHT_EYES && o < NIGHT_EYE_TALENT)
|
||||
o = NIGHT_EYE_TALENT;
|
||||
if (u2->enchanted == SP_NIGHT_EYES && o < NIGHT_EYE_TALENT)
|
||||
o = NIGHT_EYE_TALENT;
|
||||
#endif
|
||||
if (o >= n) {
|
||||
cansee = true;
|
||||
break;
|
||||
}
|
||||
if (o >= n) {
|
||||
cansee = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1615,6 +1625,11 @@ createunit(region * r, faction * f, int number, const struct race * rc)
|
|||
return create_unit(r, f, number, rc, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
attrib_type at_creator = {
|
||||
"creator"
|
||||
/* Rest ist NULL; temporäres, nicht alterndes Attribut */
|
||||
};
|
||||
|
||||
unit *
|
||||
create_unit(region * r, faction * f, int number, const struct race *urace, int id, const char * dname, unit *creator)
|
||||
{
|
||||
|
@ -1686,6 +1701,9 @@ create_unit(region * r, faction * f, int number, const struct race *urace, int i
|
|||
if (a) {
|
||||
a_add(&u->attribs, make_otherfaction(get_otherfaction(a)));
|
||||
}
|
||||
|
||||
a = a_add(&u->attribs, a_new(&at_creator));
|
||||
a->data.v = creator;
|
||||
}
|
||||
/* Monster sind grundsätzlich parteigetarnt */
|
||||
if(f->no <= 0) fset(u, FL_PARTEITARNUNG);
|
||||
|
|
|
@ -1107,6 +1107,7 @@ void cmistake(const struct unit * u, const char *cmd, int mno, int mtype);
|
|||
|
||||
extern struct attrib_type at_guard;
|
||||
extern struct attrib_type at_lighthouse;
|
||||
extern struct attrib_type at_creator;
|
||||
|
||||
#define GUARD_NONE 0
|
||||
#define GUARD_TAX 1
|
||||
|
@ -1123,6 +1124,8 @@ extern struct attrib_type at_lighthouse;
|
|||
/* Verhindert Unterhaltung auf Schiffen */
|
||||
#define GUARD_RECRUIT 64
|
||||
/* Verhindert Rekrutieren */
|
||||
#define GUARD_PRODUCE 128
|
||||
/* Verhindert Abbau von Resourcen mit RTF_LIMITED */
|
||||
#define GUARD_ALL 0xFFFF
|
||||
|
||||
extern void setguard(struct unit * u, unsigned int flags);
|
||||
|
|
|
@ -695,14 +695,14 @@ boolean
|
|||
is_guardian(unit * u2, unit *u, unsigned int mask)
|
||||
{
|
||||
if (u2->faction != u->faction
|
||||
&& getguard(u2)&mask
|
||||
&& u2->number
|
||||
&& !ucontact(u2, u) && !besieged(u2)
|
||||
&& allied(u2, u->faction, HELP_GUARD)
|
||||
!= HELP_GUARD
|
||||
&& getguard(u2)&mask
|
||||
&& u2->number
|
||||
&& !ucontact(u2, u) && !besieged(u2)
|
||||
&& allied(u2, u->faction, HELP_GUARD) != HELP_GUARD
|
||||
#ifdef WACH_WAFF
|
||||
&& armedmen(u2)
|
||||
&& armedmen(u2)
|
||||
#endif
|
||||
&& cansee(u2->faction, u->region, u, 0)
|
||||
) return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
#define SKILLPOINTS 0
|
||||
#define NEW_MIGRATION 1
|
||||
#define PEASANTS_DO_NOT_STARVE 0
|
||||
#define GUARD_DISABLES_RECRUIT 0
|
||||
#define GUARD_DISABLES_RECRUIT 1
|
||||
#define GUARD_DISABLES_PRODUCTION 1
|
||||
|
||||
#define RESOURCE_QUANTITY 1.0
|
||||
|
||||
|
|
|
@ -103,8 +103,7 @@ nr_render(const struct message * msg, const struct locale * lang, char * buffer,
|
|||
if (m) {
|
||||
strcpy(buffer, m);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
log_error(("Couldn't render message %s\n", nrt->mtype->name));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -244,6 +244,6 @@ extern char * strdup(const char *s);
|
|||
#ifdef STRNCPY_HAS_ZEROTERMINATION
|
||||
# define strnzcpy(dst, src, len) strncpy(dst, src, len)
|
||||
#else
|
||||
# define strnzcpy(dst, src, len) (strncpy(dst, src, len), len?dst[len-1]=0:0, dst)
|
||||
# define strnzcpy(dst, src, len) (strncpy(dst, src, len), len?dst[len]=0:0, dst)
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -30,6 +30,11 @@
|
|||
<text locale="de">sehr wenige</text>
|
||||
<text locale="en">very few </text>
|
||||
</string>
|
||||
|
||||
<string name="sehr viele">
|
||||
<text locale="de">sehr viele</text>
|
||||
<text locale="en">a great many </text>
|
||||
</string>
|
||||
|
||||
<string name="prefix_Dunkel">
|
||||
<text locale="de">Dunkel</text>
|
||||
|
|
|
@ -955,13 +955,6 @@
|
|||
<text locale="en">Belts of Heroic Legends</text>
|
||||
</string>
|
||||
|
||||
<string name="viele">
|
||||
<text locale="en">many</text>
|
||||
</string>
|
||||
<string name="sehr viele">
|
||||
<text locale="en">a great many</text>
|
||||
</string>
|
||||
|
||||
<comment> intranslatables:</comment>
|
||||
<string name="h0">
|
||||
<text locale="en">Flachwurz</text>
|
||||
|
|
Loading…
Reference in New Issue