forked from github/server
just fixes
This commit is contained in:
parent
a5a0b6d46c
commit
4b5882b450
3 changed files with 11 additions and 9 deletions
|
@ -61,9 +61,9 @@ free_market(attrib * a)
|
||||||
|
|
||||||
const item_type * r_luxury(region * r)
|
const item_type * r_luxury(region * r)
|
||||||
{
|
{
|
||||||
const luxury_type * ltype;
|
struct demand * dmd;
|
||||||
for (ltype = luxurytypes;ltype;ltype=ltype->next) {
|
for (dmd=r->land->demands;dmd;dmd=dmd->next) {
|
||||||
if (r_demand(r, ltype)<0) return ltype->itype;
|
if (dmd->value==0) return dmd->type->itype;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1899,7 +1899,7 @@ hits(troop at, troop dt, weapon * awp)
|
||||||
skdiff = skilldiff(at, dt, dist);
|
skdiff = skilldiff(at, dt, dist);
|
||||||
/* Verteidiger bekommt eine Rüstung */
|
/* Verteidiger bekommt eine Rüstung */
|
||||||
armor = select_armor(dt, true);
|
armor = select_armor(dt, true);
|
||||||
if (weapon->type->flags & WTF_USESHIELD) {
|
if (dwp->type->flags & WTF_USESHIELD) {
|
||||||
shield = select_armor(dt, false);
|
shield = select_armor(dt, false);
|
||||||
}
|
}
|
||||||
if (contest(skdiff, dt, armor, shield)) {
|
if (contest(skdiff, dt, armor, shield)) {
|
||||||
|
|
|
@ -71,14 +71,16 @@ typedef struct region_owner {
|
||||||
int since_turn;
|
int since_turn;
|
||||||
} region_owner;
|
} region_owner;
|
||||||
|
|
||||||
|
typedef struct demand {
|
||||||
|
struct demand * next;
|
||||||
|
const struct luxury_type * type;
|
||||||
|
int value;
|
||||||
|
} demand;
|
||||||
|
|
||||||
typedef struct land_region {
|
typedef struct land_region {
|
||||||
char *name;
|
char *name;
|
||||||
/* TODO: demand kann nach Konvertierung entfernt werden. */
|
/* TODO: demand kann nach Konvertierung entfernt werden. */
|
||||||
struct demand {
|
demand * demands;
|
||||||
struct demand * next;
|
|
||||||
const struct luxury_type * type;
|
|
||||||
int value;
|
|
||||||
} * demands;
|
|
||||||
const struct item_type * herbtype;
|
const struct item_type * herbtype;
|
||||||
short herbs;
|
short herbs;
|
||||||
short morale;
|
short morale;
|
||||||
|
|
Loading…
Reference in a new issue