forked from github/server
SIMPLE_ESCAPE and SIMPLE_COMBAT no longer needed.
This commit is contained in:
parent
3fbf8ffbfc
commit
3e475d63ad
5 changed files with 8 additions and 31 deletions
|
@ -2426,9 +2426,7 @@ enum { E_GUARD_OK, E_GUARD_UNARMED, E_GUARD_NEWBIE, E_GUARD_FLEEING };
|
|||
static int
|
||||
can_start_guarding(const unit * u)
|
||||
{
|
||||
#ifdef SIMPLE_ESCAPE
|
||||
if (u->status>=ST_FLEE) return E_GUARD_FLEEING;
|
||||
#endif
|
||||
if (fval(u->race, RCF_UNARMEDGUARD)) return E_GUARD_OK;
|
||||
if (!armedmen(u)) return E_GUARD_UNARMED;
|
||||
if (u->faction->age < NewbieImmunity()) return E_GUARD_NEWBIE;
|
||||
|
|
|
@ -2146,11 +2146,9 @@ setstatus(struct unit * u, int status)
|
|||
assert(status>=ST_AGGRO && status<=ST_FLEE);
|
||||
if (u->status!=status) {
|
||||
u->status = (status_t)status;
|
||||
#ifdef SIMPLE_ESCAPE
|
||||
if (u->status==ST_FLEE) {
|
||||
setguard(u, GUARD_NONE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2160,9 +2158,7 @@ setguard(unit * u, unsigned int flags)
|
|||
/* setzt die guard-flags der Einheit */
|
||||
attrib * a = NULL;
|
||||
assert(flags==0 || !fval(u, UFL_MOVED));
|
||||
#ifdef SIMPLE_ESCAPE
|
||||
assert(flags==0 || u->status<ST_FLEE);
|
||||
#endif
|
||||
if (fval(u, UFL_GUARD)) {
|
||||
a = a_find(u->attribs, &at_guard);
|
||||
}
|
||||
|
|
|
@ -1785,7 +1785,7 @@ eval_resources(struct opstack ** stack, const void * userdata) /* order -> strin
|
|||
{
|
||||
const faction * report = (const faction*)userdata;
|
||||
const struct resource * res = (const struct resource *)opop(stack).v;
|
||||
static char buf[512];
|
||||
static char buf[1024]; /* but we only use about half of this */
|
||||
size_t size = sizeof(buf) - 1;
|
||||
variant var;
|
||||
|
||||
|
@ -1793,7 +1793,10 @@ eval_resources(struct opstack ** stack, const void * userdata) /* order -> strin
|
|||
while (res!=NULL && size > 4) {
|
||||
const char * rname = resourcename(res->type, (res->number!=1)?NMF_PLURAL:0);
|
||||
int bytes = snprintf(bufp, size, "%d %s", res->number, LOC(report->locale, rname));
|
||||
if (bytes<0 || wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
|
||||
if (bytes<0 || wrptr(&bufp, &size, bytes)!=0 || size<sizeof(buf)/2) {
|
||||
WARN_STATIC_BUFFER();
|
||||
break;
|
||||
}
|
||||
|
||||
res = res->next;
|
||||
if (res!=NULL && size>2) {
|
||||
|
|
|
@ -283,8 +283,8 @@ sp_combatrosthauch(fighter * fi, int level, double power, spell * sp)
|
|||
for (fig = fgs->begin; fig != fgs->end; ++fig) {
|
||||
fighter *df = *fig;
|
||||
|
||||
if (df->alive==0) continue;
|
||||
if (force<=0) break;
|
||||
if (df->alive==0) continue;
|
||||
if (force<=0) break;
|
||||
|
||||
/* da n min(force, x), sollte force maximal auf 0 sinken */
|
||||
assert(force >= 0);
|
||||
|
@ -1238,26 +1238,6 @@ sp_denyattack(fighter * fi, int level, double power, spell * sp)
|
|||
/* irgendwie den langen befehl sperren */
|
||||
/* fset(fi, FIG_ATTACKED); */
|
||||
|
||||
#ifndef SIMPLE_ESCAPE
|
||||
/* Hat der Magier ein NACH, wird die angegebene Richtung bevorzugt */
|
||||
switch (get_keyword(mage->thisorder)) {
|
||||
case K_MOVE:
|
||||
case K_ROUTE:
|
||||
init_tokens(mage->thisorder);
|
||||
skip_token();
|
||||
if (movewhere(mage, getstrtoken(), mage->region, &fi->run.region)!=E_MOVE_OK) {
|
||||
fi->run.region = fleeregion(mage);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
fi->run.region = fleeregion(mage);
|
||||
}
|
||||
/* bewegung erst am Ende des Kampfes, zusammen mit den normalen
|
||||
* Flüchtlingen */
|
||||
|
||||
if (!fi->run.region) return level;
|
||||
#endif /* SIMPLE_ESCAPE */
|
||||
|
||||
/* wir tun so, als wäre die Person geflohen */
|
||||
fset(fi, FIG_NOLOOT);
|
||||
fi->run.hp = mage->hp;
|
||||
|
|
|
@ -3519,7 +3519,7 @@
|
|||
<arg name="target" type="unit"/>
|
||||
<arg name="items" type="items"/>
|
||||
</type>
|
||||
<text locale="de">"In Gepäck von $unit($target) sind $resources($items)."</text>
|
||||
<text locale="de">"Im Gepäck von $unit($target) sind $resources($items)."</text>
|
||||
<text locale="en">"$unit($target) carries $resources($items)"</text>
|
||||
</message>
|
||||
<message name="spyreport_faction" section="events">
|
||||
|
|
Loading…
Reference in a new issue