fix illusioncastle reporting.

This commit is contained in:
Enno Rehling 2017-05-01 14:49:06 +02:00
parent 79de2ba2ed
commit 22c05963fd
3 changed files with 2 additions and 9 deletions

View File

@ -60,13 +60,7 @@ extern "C" {
} extra; } extra;
struct construction *improvement; struct construction *improvement;
/* next level, if upgradable. if more than one of these items /* next level, if upgradable. */
* can be built (weapons, armour) per turn, must not be NULL,
* but point to the same type again:
* const_sword.improvement = &const_sword
* last level of a building points to NULL, as do objects of
* an unlimited size.
*/
} construction; } construction;
void free_construction(struct construction *cons); void free_construction(struct construction *cons);

View File

@ -192,7 +192,6 @@ const char *buildingtype(const building_type * btype, const building * b, int bs
} }
if (btype->construction && btype->construction->extra.name) { if (btype->construction && btype->construction->extra.name) {
if (b) { if (b) {
assert(b->type == btype);
bsize = adjust_size(b, bsize); bsize = adjust_size(b, bsize);
} }
for (con = btype->construction; con; con = con->improvement) { for (con = btype->construction; con; con = con->improvement) {

View File

@ -386,7 +386,7 @@ const char **illusion)
if (illusion) { if (illusion) {
*illusion = NULL; *illusion = NULL;
if (is_building_type(b->type, "illusioncastle")) { if (b->attribs && is_building_type(b->type, "illusioncastle")) {
const attrib *a = a_find(b->attribs, &at_icastle); const attrib *a = a_find(b->attribs, &at_icastle);
if (a != NULL) { if (a != NULL) {
*illusion = buildingtype(icastle_type(a), b, b->size); *illusion = buildingtype(icastle_type(a), b, b->size);