URL: <http://gna.org/bugs/?23501>
Summary: Help claims city worked tiles cannot be stolen, but they can Project: Freeciv Submitted by: jtn Submitted on: Sun 19 Apr 2015 14:34:20 BST Category: None Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: 2.3.5, 2.4.4, 2.5.0 Discussion Lock: Any Operating System: Any Planned Release: _______________________________________________________ Details: The online help for national borders says: > Once claimed, a tile that can be directly worked by a city can > not change ownership unless the city does (or is destroyed). However, a wiki contributor claims <http://www.freeciv.org/wiki/Territory?diff=22885&oldid=22871> that this is not the case. I think I've seen cities steal each others' tiles too. I think there is a bug in map_claim_border(): if (is_valid_city_coords(city_map_radius_sq_get(ccity), CITY_ABS2REL(city_x), CITY_ABS2REL(city_y))) { /* Tile is within squared city radius */ continue; } I think the CITY_ABS2REL() should be CITY_REL2ABS(). is_valid_city_coords() wants numbers in the range 0..CITY_MAP_MAX_RADIUS*2 or thereabouts, whereas city_x/y are in -CITY_MAP_MAX_RADIUS..CITY_MAP_MAX_RADIUS. This means that a patch of land far to the south-east of the city is protected from changing ownership. In practice it is likely that no tile is ever affected. This bug is present in S2_3 onwards (it was probably introduced with variable city radii). S2_2 looks like it does what was originally intended. ---- This is now such a long-standing bug that I'm wary of changing it on stable branches. Should it become ruleset-configurable or even user-configurable? Perhaps as a signed delta from the city radius, so that immunity from transfer can be disabled for the city's outer worked tiles or all of them with a sufficiently negative value? _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?23501> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev