forked from github/server
NewbieImmunity über config-datei kontrolliert.
This commit is contained in:
parent
032466e908
commit
0a5c8c0293
|
@ -2580,10 +2580,10 @@ steal_cmd(unit * u, struct order * ord, request ** stealorders)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u2->faction->age < IMMUN_GEGEN_ANGRIFF) {
|
if (u2->faction->age < NewbieImmunity()) {
|
||||||
add_message(&u->faction->msgs,
|
add_message(&u->faction->msgs,
|
||||||
msg_feedback(u, ord, "newbie_immunity_error",
|
msg_feedback(u, ord, "newbie_immunity_error",
|
||||||
"turns", IMMUN_GEGEN_ANGRIFF));
|
"turns", NewbieImmunity()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2711,7 +2711,7 @@ remove_unequipped_guarded(void)
|
||||||
|
|
||||||
for (r = regions; r; r = r->next)
|
for (r = regions; r; r = r->next)
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
if (getguard(u) && (!armedmen(u) || u->faction->age < IMMUN_GEGEN_ANGRIFF))
|
if (getguard(u) && (!armedmen(u) || u->faction->age < NewbieImmunity()))
|
||||||
setguard(u, GUARD_NONE);
|
setguard(u, GUARD_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3609,9 +3609,9 @@ age_factions(void)
|
||||||
|
|
||||||
for (f = factions; f; f = f->next) {
|
for (f = factions; f; f = f->next) {
|
||||||
++f->age;
|
++f->age;
|
||||||
if (f->age < IMMUN_GEGEN_ANGRIFF) {
|
if (f->age < NewbieImmunity()) {
|
||||||
add_message(&f->msgs, new_message(f,
|
add_message(&f->msgs, new_message(f,
|
||||||
"newbieimmunity%i:turns", IMMUN_GEGEN_ANGRIFF - f->age));
|
"newbieimmunity%i:turns", NewbieImmunity() - f->age));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3577,9 +3577,9 @@ init_battle(region * r, battle **bp)
|
||||||
sprintf(buf, "%s ist böse gewesen...", unitname(u));
|
sprintf(buf, "%s ist böse gewesen...", unitname(u));
|
||||||
mistake(u, ord, buf, MSG_BATTLE);
|
mistake(u, ord, buf, MSG_BATTLE);
|
||||||
continue;
|
continue;
|
||||||
} if (u2->faction->age < IMMUN_GEGEN_ANGRIFF) {
|
} if (u2->faction->age < NewbieImmunity()) {
|
||||||
add_message(&u->faction->msgs,
|
add_message(&u->faction->msgs,
|
||||||
msg_feedback(u, u->thisorder, "newbie_immunity_error", "turns", IMMUN_GEGEN_ANGRIFF));
|
msg_feedback(u, u->thisorder, "newbie_immunity_error", "turns", NewbieImmunity()));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Fehler: "Die Einheit ist mit uns alliert" */
|
/* Fehler: "Die Einheit ist mit uns alliert" */
|
||||||
|
|
|
@ -107,6 +107,16 @@ static attrib_type at_creator = {
|
||||||
/* Rest ist NULL; temporäres, nicht alterndes Attribut */
|
/* Rest ist NULL; temporäres, nicht alterndes Attribut */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int
|
||||||
|
NewbieImmunity(void) {
|
||||||
|
static int value = -1;
|
||||||
|
if (value<0) {
|
||||||
|
const char * str = get_param(global.parameters, "NewbieImmunity");
|
||||||
|
value = str?atoi(str):IMMUN_GEGEN_ANGRIFF;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
MaxAge(void) {
|
MaxAge(void) {
|
||||||
static int value = -1;
|
static int value = -1;
|
||||||
|
|
|
@ -1181,6 +1181,7 @@ extern int NMRTimeout(void);
|
||||||
extern int LongHunger(const struct unit * u);
|
extern int LongHunger(const struct unit * u);
|
||||||
extern boolean TradeDisabled(void);
|
extern boolean TradeDisabled(void);
|
||||||
extern int SkillCap(skill_t sk);
|
extern int SkillCap(skill_t sk);
|
||||||
|
extern int NewbieImmunity();
|
||||||
extern int AllianceAuto(void); /* flags that allied factions get automatically */
|
extern int AllianceAuto(void); /* flags that allied factions get automatically */
|
||||||
extern int AllianceRestricted(void); /* flags restricted to allied factions */
|
extern int AllianceRestricted(void); /* flags restricted to allied factions */
|
||||||
extern struct order * default_order(const struct locale * lang);
|
extern struct order * default_order(const struct locale * lang);
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
<param name="nmr.timeout" value="9999"/>
|
<param name="nmr.timeout" value="9999"/>
|
||||||
<param name="nmr.removenewbie" value="0"/>
|
<param name="nmr.removenewbie" value="0"/>
|
||||||
<param name="GiveRestriction" value="3"/>
|
<param name="GiveRestriction" value="3"/>
|
||||||
|
<param name="NewbieImmunity" value="4"/>
|
||||||
<param name="hunger.long" value="1"/>
|
<param name="hunger.long" value="1"/>
|
||||||
<param name="database.gameid" value="3"/>
|
<param name="database.gameid" value="3"/>
|
||||||
<param name="globalreport" value="world"/>
|
<param name="globalreport" value="world"/>
|
||||||
|
|
Loading…
Reference in New Issue