Implement Coronado revealed colonies size==1.

This commit is contained in:
Mike Pope 2015-09-04 09:29:35 +09:30
parent 22fbbbbb96
commit f04c011745
2 changed files with 17 additions and 1 deletions

View File

@ -189,6 +189,10 @@ The following differences between the ``Classic'' rule set and the
first. FreeCol optionally allows you to select the unit to be
trained yourself. This feature is off by default in the Classic
rule set and on by default in the FreeCol rule set.
\item In the FreeCol ruleset, Francisco de Coronado grants full
ongoing visibility of foreign colonies and their surroundings. Classic
rules do not grant ongoing or surroundings visibility, and show
revealed colonies as having size of one.
\end{itemize}

View File

@ -2163,7 +2163,19 @@ public class ServerPlayer extends Player implements ServerModelObject {
Colony colony = t.getColony();
Set<Tile> tiles = new HashSet<>();
if (colony != null && !this.owns(colony)) {
tiles.addAll(exploreForSettlement(colony));
// FreeCol ruleset adds this ability, allowing
// full visibility of colony and surroundings.
if (hasAbility(Ability.SEE_ALL_COLONIES)) {
tiles.addAll(exploreForSettlement(colony));
} else {
// Col1 showed Coronado-revealed colonies as size 1
if (exploreTile(t)) {
Tile c = t.copy(game, Tile.class);
c.getColony().setDisplayUnitCount(1);
t.setCachedTile(this, c);
tiles.add(t);
}
}
}
cs.add(See.only(this), tiles);
}