-
Notifications
You must be signed in to change notification settings - Fork 27
Description
In MapUnitExtensions.cs's move method, we currently have a check to ensure that units can only move on land.
Unfortunately, that applies to naval units as well. Hence the infamous "Plains Galley" bug, where your galleys can sail across the prairies, but not across the coasts or seas. "Prairie Schooner" got more literal.
There has been some debate on how this should be done, notably the possibility of units that have aspects of more than one of the unit types (Air/Land/Sea) in Civ3. My thinking is that while those, along with the "wheeled" flag, should be indicators of what terrains are allowed, ultimately C7 should allow setting it per-terrain, and should store it that way. This would allow the creation of units that can travel e.g. on mountains but not in jungle, while also allowing units that can travel in the jungle but not on mountains, in the same scenario. Perhaps you want Tibet to have special mountain units and Kongo to have special jungle units, but you don't want the Kongolese using their special unit to scale Mt. Everest, or the Tibetan special units to conquer the equatorial area. It would also simplify any checks after loading the scenario - just check if the target terrain is on the list of valid types.
There's also the matter of the legacy Civ3 naval units having optional "Sinks in Sea" and "Sinks in Ocean" flags, and that those stop applying after a certain period of time. That is probably beyond the scope of this initial improvement, and could prove to provide some unwanted complexity. My first thought was, "set the unit prototype to only allow coast, and once safe sea travel is researched, modify the prototype to allow sea, etc.". But that has the problem that safe sea travel is researched per-civilization. It also ignores the fact that you can send Galleys on sea and even ocean tiles manually, and the AI will do that as well (but only if they end up on "safe" terrain); this is different than the hard restriction imposed by the "wheeled" flag. Yeah, we're probably going to need a compatibility layer for that, let's spin that out into a separate issue.
Related to #134 , as that may answer the question of where's the info going to be stored?