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 luxury_type * ltype;
|
||||
for (ltype = luxurytypes;ltype;ltype=ltype->next) {
|
||||
if (r_demand(r, ltype)<0) return ltype->itype;
|
||||
struct demand * dmd;
|
||||
for (dmd=r->land->demands;dmd;dmd=dmd->next) {
|
||||
if (dmd->value==0) return dmd->type->itype;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -1899,7 +1899,7 @@ hits(troop at, troop dt, weapon * awp)
|
|||
skdiff = skilldiff(at, dt, dist);
|
||||
/* Verteidiger bekommt eine Rüstung */
|
||||
armor = select_armor(dt, true);
|
||||
if (weapon->type->flags & WTF_USESHIELD) {
|
||||
if (dwp->type->flags & WTF_USESHIELD) {
|
||||
shield = select_armor(dt, false);
|
||||
}
|
||||
if (contest(skdiff, dt, armor, shield)) {
|
||||
|
|
|
@ -71,14 +71,16 @@ typedef struct region_owner {
|
|||
int since_turn;
|
||||
} region_owner;
|
||||
|
||||
typedef struct demand {
|
||||
struct demand * next;
|
||||
const struct luxury_type * type;
|
||||
int value;
|
||||
} demand;
|
||||
|
||||
typedef struct land_region {
|
||||
char *name;
|
||||
/* TODO: demand kann nach Konvertierung entfernt werden. */
|
||||
struct demand {
|
||||
struct demand * next;
|
||||
const struct luxury_type * type;
|
||||
int value;
|
||||
} * demands;
|
||||
demand * demands;
|
||||
const struct item_type * herbtype;
|
||||
short herbs;
|
||||
short morale;
|
||||
|
|
Loading…
Reference in a new issue