From: Erik V. <eri...@xs...> - 2011-12-01 11:49:03
|
I have committed the first bunch of code to fix problems with laying tiles using private special properties. There problems have been reported by John David Galt. The bugs so far fixed relate to offering, and in some cases even accepting invalid tile lays by using special properties, such as: - replacing a yellow tile by another one, e.g. 18AL Lumber Terminal, - upgrading a yellow tile to a green one, e.g. 1830 F16 (D&H) or B20 (D&H). The three cases mentioned above now work correctly. I still have to test other cases in 1835 and 1889. So far only the game engine has been affected. The changes include: 1) The already existing but unused option to restrict special tile lays to a certain colour is now used and enforced. This applies to 1830 in hex B20 (C&StL). 2) Laying tiles of which the colour is specified explicitly (C&StL) or implicitly by prescribing a specific tile (D&H, Lumber Terminal) are now checked against: 2a. The colours allowed in the current phase. This has no effect in the above cases, but it will have effect for the green special upgrade in 1846 (Lake Shore Line). 2b. The colour of tile(s) already present in any explicitly specified hexes. See the rules under 3). Blocked hexes are no longer offered (except in the static help text, unfortunately). If no hex(es) remain, the special tile lay will not be offered at all. 3) Any tile to be laid must be either: 3a. A regular upgrade (blank to yellow, yellow to green etc.), following normal upgrade rules, or 3b. An explicitly specified "irregular" upgrade of the old to the new tile (in TileSet.xml). I don't know any cases yet where this applies for special tile lays, but 1856 has regular yellow-to-yellow upgrades, so I think we must include this case. 4) I have removed the additional inclusion of such special tile lays as options in the "Special" menu. This was accomplished by a different mechanism and would not follow the above new rules. I'm not entirely sure why this menu option had been included, and if it is really needed. I'll check my old emails later, but I can think now of two reasons: - special tiles lays exist that are permitted outside the normal tile laying step, - increasing user-friendliness by adding an alternative procedure, with the usual "special action" highlight. In any case, if this feature must be retained, it will have to be provided by the UI rather than by the game engine, as it was previously. Erik. |