mirror of https://github.com/FreeCol/freecol.git
Move UnitChange to UnitTypeChange as FCSOT, so they need an identifier field.
This commit is contained in:
parent
ea53d18e3d
commit
a5b4de3da6
|
@ -18,7 +18,7 @@
|
|||
* along with FreeCol. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
-->
|
||||
<freecol-specification id="unitChangeTypesCompat" version="0.110">
|
||||
<freecol-specification id="unitChangeTypesCompat" version="0.117">
|
||||
<!--
|
||||
A copy of the latest unit-change-types section of
|
||||
classic/specification.xml to be loaded into the specification of
|
||||
|
@ -26,303 +26,424 @@
|
|||
-->
|
||||
<unit-change-types>
|
||||
<unit-change-type id="model.unitChange.capture" owner-change="true">
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.capture.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.colonialRegular"
|
||||
<unit-type-change id="model.unitChange.capture.colonialRegular"
|
||||
from="model.unit.colonialRegular"
|
||||
to="model.unit.veteranSoldier" probability="100"/>
|
||||
<unit-type-change from="model.unit.jesuitMissionary"
|
||||
<unit-type-change id="model.unitChange.capture.jesuitMissionary"
|
||||
from="model.unit.jesuitMissionary"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.clearSkill">
|
||||
<unit-type-change from="model.unit.expertFarmer"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertFarmer"
|
||||
from="model.unit.expertFarmer"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFisherman"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertFisherman"
|
||||
from="model.unit.expertFisherman"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFurTrapper"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertFurTrapper"
|
||||
from="model.unit.expertFurTrapper"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertSilverMiner"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertSilverMiner"
|
||||
from="model.unit.expertSilverMiner"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertLumberJack"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertLumberJack"
|
||||
from="model.unit.expertLumberJack"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertOreMiner"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertOreMiner"
|
||||
from="model.unit.expertOreMiner"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterSugarPlanter"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterSugarPlanter"
|
||||
from="model.unit.masterSugarPlanter"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterCottonPlanter"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterCottonPlanter"
|
||||
from="model.unit.masterCottonPlanter"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterTobaccoPlanter"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterTobaccoPlanter"
|
||||
from="model.unit.masterTobaccoPlanter"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.firebrandPreacher"
|
||||
<unit-type-change id="model.unitChange.clearSkill.firebrandPreacher"
|
||||
from="model.unit.firebrandPreacher"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.elderStatesman"
|
||||
<unit-type-change id="model.unitChange.clearSkill.elderStatesman"
|
||||
from="model.unit.elderStatesman"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterCarpenter"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterCarpenter"
|
||||
from="model.unit.masterCarpenter"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterDistiller"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterDistiller"
|
||||
from="model.unit.masterDistiller"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterWeaver"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterWeaver"
|
||||
from="model.unit.masterWeaver"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterTobacconist"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterTobacconist"
|
||||
from="model.unit.masterTobacconist"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterFurTrader"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterFurTrader"
|
||||
from="model.unit.masterFurTrader"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterBlacksmith"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterBlacksmith"
|
||||
from="model.unit.masterBlacksmith"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterGunsmith"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterGunsmith"
|
||||
from="model.unit.masterGunsmith"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.seasonedScout"
|
||||
<unit-type-change id="model.unitChange.clearSkill.seasonedScout"
|
||||
from="model.unit.seasonedScout"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.hardyPioneer"
|
||||
<unit-type-change id="model.unitChange.clearSkill.hardyPioneer"
|
||||
from="model.unit.hardyPioneer"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.clearSkill.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.jesuitMissionary"
|
||||
<unit-type-change id="model.unitChange.clearSkill.jesuitMissionary"
|
||||
from="model.unit.jesuitMissionary"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.colonialRegular"
|
||||
<unit-type-change id="model.unitChange.clearSkill.colonialRegular"
|
||||
from="model.unit.colonialRegular"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.conversion" owner-change="true">
|
||||
<unit-type-change from="model.unit.brave"
|
||||
<unit-type-change id="model.unitChange.conversion.brave"
|
||||
from="model.unit.brave"
|
||||
to="model.unit.indianConvert" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.creation"/>
|
||||
<unit-change-type id="model.unitChange.demotion">
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.demotion.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.colonialRegular"
|
||||
<unit-type-change id="model.unitChange.demotion.colonialRegular"
|
||||
from="model.unit.colonialRegular"
|
||||
to="model.unit.veteranSoldier" probability="100"/>
|
||||
<unit-type-change from="model.unit.artillery"
|
||||
<unit-type-change id="model.unitChange.demotion.artillery"
|
||||
from="model.unit.artillery"
|
||||
to="model.unit.damagedArtillery" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.education">
|
||||
<unit-type-change from="model.unit.pettyCriminal"
|
||||
<unit-type-change id="model.unitChange.education.indenturedServant"
|
||||
from="model.unit.pettyCriminal"
|
||||
to="model.unit.indenturedServant"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.education.freeColonist"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.freeColonist"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertFarmer"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFarmer"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertFisherman"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFisherman"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertFurTrapper"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFurTrapper"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertSilverMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertSilverMiner"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertLumberJack"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertLumberJack"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertOreMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertOreMiner"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
to="model.unit.masterSugarPlanter"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterCottonPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterCottonPlanter"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterSugarPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterSugarPlanter"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change id="model.unitChange.education.masterTobaccoPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterTobaccoPlanter"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.firebrandPreacher"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.firebrandPreacher"
|
||||
probability="100" turns="8"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.elderStatesman"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.elderStatesman"
|
||||
probability="100" turns="8"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterCarpenter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterCarpenter"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterDistiller"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterDistiller"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterWeaver"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterWeaver"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterTobacconist"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterTobacconist"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterFurTrader"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterFurTrader"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterBlacksmith"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterBlacksmith"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterGunsmith"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterGunsmith"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.seasonedScout"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.seasonedScout"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.hardyPioneer"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.hardyPioneer"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.veteranSoldier"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.veteranSoldier"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.jesuitMissionary"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.jesuitMissionary"
|
||||
probability="100" turns="8"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.experience">
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertFarmer"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFarmer" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertFisherman"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFisherman" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertFurTrapper"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFurTrapper" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertSilverMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertSilverMiner" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertLumberJack"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertLumberJack" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertOreMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertOreMiner" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.masterSugarPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterSugarPlanter" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.masterCottonPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterCottonPlanter" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.masterTobaccoPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterTobaccoPlanter" probability="4"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.foundingFather">
|
||||
<scope ability-id="model.ability.upgradeConvert" ability-value="true"/>
|
||||
<unit-type-change from="model.unit.indianConvert"
|
||||
<unit-type-change id="model.unitChange.foundingFather.indianConvert"
|
||||
from="model.unit.indianConvert"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.independence">
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.independence.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.colonialRegular" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.lostCity">
|
||||
<unit-type-change from="model.unit.pettyCriminal"
|
||||
<unit-type-change id="model.unitChange.lostCity.pettyCriminal"
|
||||
from="model.unit.pettyCriminal"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.lostCity.indenturedServant"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.lostCity.freeColonist"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.natives">
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertFarmer"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertFarmer" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertFarmer"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFarmer" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertFisherman"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertFisherman" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertFisherman"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFisherman" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertFurTrapper"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertFurTrapper" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertFurTrapper"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFurTrapper" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertSilverMiner"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertSilverMiner" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertSilverMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertSilverMiner" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertLumberJack"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertLumberJack" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertLumberJack"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertLumberJack" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertOreMiner"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertOreMiner" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertOreMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertOreMiner" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterCottonPlanter"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterCottonPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterCottonPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterCottonPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterFurTrader"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterFurTrader" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterFurTrader"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterFurTrader" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterSugarPlanter"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterSugarPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterSugarPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterSugarPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterTobaccoPlanter"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterTobaccoPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterTobaccoPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterTobaccoPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterWeaver"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterWeaver" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterWeaver"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterWeaver" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-seasonedScout"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-seasonedScout"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.promotion">
|
||||
<unit-type-change from="model.unit.pettyCriminal"
|
||||
<unit-type-change id="model.unitChange.promotion.pettyCriminal"
|
||||
from="model.unit.pettyCriminal"
|
||||
to="model.unit.indenturedServant" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.promotion.indenturedServant"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.promotion.freeColonist"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.veteranSoldier" probability="100"/>
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.promotion.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.colonialRegular" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.undead" owner-change="true">
|
||||
<unit-type-change from="model.unit.pettyCriminal"
|
||||
<unit-type-change id="model.unitChange.undead.pettyCriminal"
|
||||
from="model.unit.pettyCriminal"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.undead.indenturedServant"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.undead.freeColonist"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.undead.expertFarmer"
|
||||
from="model.unit.expertFarmer"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFarmer"
|
||||
<unit-type-change id="model.unitChange.undead.expertFisherman"
|
||||
from="model.unit.expertFisherman"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFisherman"
|
||||
<unit-type-change id="model.unitChange.undead.expertFurTrapper"
|
||||
from="model.unit.expertFurTrapper"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFurTrapper"
|
||||
<unit-type-change id="model.unitChange.undead.expertSilverMiner"
|
||||
from="model.unit.expertSilverMiner"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertSilverMiner"
|
||||
<unit-type-change id="model.unitChange.undead.expertLumberJack"
|
||||
from="model.unit.expertLumberJack"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertLumberJack"
|
||||
<unit-type-change id="model.unitChange.undead.expertOreMiner"
|
||||
from="model.unit.expertOreMiner"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertOreMiner"
|
||||
<unit-type-change id="model.unitChange.undead.masterSugarPlanter"
|
||||
from="model.unit.masterSugarPlanter"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterSugarPlanter"
|
||||
<unit-type-change id="model.unitChange.undead.masterCottonPlanter"
|
||||
from="model.unit.masterCottonPlanter"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterCottonPlanter"
|
||||
<unit-type-change id="model.unitChange.undead.masterTobaccoPlanter"
|
||||
from="model.unit.masterTobaccoPlanter"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterTobaccoPlanter"
|
||||
<unit-type-change id="model.unitChange.undead.firebrandPreacher"
|
||||
from="model.unit.firebrandPreacher"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.firebrandPreacher"
|
||||
<unit-type-change id="model.unitChange.undead.elderStatesman"
|
||||
from="model.unit.elderStatesman"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.elderStatesman"
|
||||
<unit-type-change id="model.unitChange.undead.masterCarpenter"
|
||||
from="model.unit.masterCarpenter"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterCarpenter"
|
||||
<unit-type-change id="model.unitChange.undead.masterDistiller"
|
||||
from="model.unit.masterDistiller"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterDistiller"
|
||||
<unit-type-change id="model.unitChange.undead.masterWeaver"
|
||||
from="model.unit.masterWeaver"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterWeaver"
|
||||
<unit-type-change id="model.unitChange.undead.masterTobacconist"
|
||||
from="model.unit.masterTobacconist"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterTobacconist"
|
||||
<unit-type-change id="model.unitChange.undead.masterFurTrader"
|
||||
from="model.unit.masterFurTrader"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterFurTrader"
|
||||
<unit-type-change id="model.unitChange.undead.masterBlacksmith"
|
||||
from="model.unit.masterBlacksmith"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterBlacksmith"
|
||||
<unit-type-change id="model.unitChange.undead.masterGunsmith"
|
||||
from="model.unit.masterGunsmith"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterGunsmith"
|
||||
<unit-type-change id="model.unitChange.undead.seasonedScout"
|
||||
from="model.unit.seasonedScout"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.seasonedScout"
|
||||
<unit-type-change id="model.unitChange.undead.hardyPioneer"
|
||||
from="model.unit.hardyPioneer"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.hardyPioneer"
|
||||
<unit-type-change id="model.unitChange.undead.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.undead.jesuitMissionary"
|
||||
from="model.unit.jesuitMissionary"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.jesuitMissionary"
|
||||
<unit-type-change id="model.unitChange.undead.kingsRegular"
|
||||
from="model.unit.kingsRegular"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.kingsRegular"
|
||||
<unit-type-change id="model.unitChange.undead.indianConvert"
|
||||
from="model.unit.indianConvert"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.indianConvert"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.brave"
|
||||
<unit-type-change id="model.unitChange.undead.brave"
|
||||
from="model.unit.brave"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
</unit-change-type>
|
||||
</unit-change-types>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
In case of incompatible changes, please update version number and
|
||||
XSD schema for validation.
|
||||
-->
|
||||
<freecol-specification id="classic" version="0.116">
|
||||
<freecol-specification id="classic" version="0.117">
|
||||
|
||||
<!-- Modifiers that are not attached to other game object
|
||||
types. They may be modified, but MUST NOT be removed. -->
|
||||
|
@ -1366,303 +1366,424 @@
|
|||
|
||||
<unit-change-types>
|
||||
<unit-change-type id="model.unitChange.capture" owner-change="true">
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.capture.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.colonialRegular"
|
||||
<unit-type-change id="model.unitChange.capture.colonialRegular"
|
||||
from="model.unit.colonialRegular"
|
||||
to="model.unit.veteranSoldier" probability="100"/>
|
||||
<unit-type-change from="model.unit.jesuitMissionary"
|
||||
<unit-type-change id="model.unitChange.capture.jesuitMissionary"
|
||||
from="model.unit.jesuitMissionary"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.clearSkill">
|
||||
<unit-type-change from="model.unit.expertFarmer"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertFarmer"
|
||||
from="model.unit.expertFarmer"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFisherman"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertFisherman"
|
||||
from="model.unit.expertFisherman"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFurTrapper"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertFurTrapper"
|
||||
from="model.unit.expertFurTrapper"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertSilverMiner"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertSilverMiner"
|
||||
from="model.unit.expertSilverMiner"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertLumberJack"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertLumberJack"
|
||||
from="model.unit.expertLumberJack"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertOreMiner"
|
||||
<unit-type-change id="model.unitChange.clearSkill.expertOreMiner"
|
||||
from="model.unit.expertOreMiner"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterSugarPlanter"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterSugarPlanter"
|
||||
from="model.unit.masterSugarPlanter"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterCottonPlanter"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterCottonPlanter"
|
||||
from="model.unit.masterCottonPlanter"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterTobaccoPlanter"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterTobaccoPlanter"
|
||||
from="model.unit.masterTobaccoPlanter"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.firebrandPreacher"
|
||||
<unit-type-change id="model.unitChange.clearSkill.firebrandPreacher"
|
||||
from="model.unit.firebrandPreacher"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.elderStatesman"
|
||||
<unit-type-change id="model.unitChange.clearSkill.elderStatesman"
|
||||
from="model.unit.elderStatesman"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterCarpenter"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterCarpenter"
|
||||
from="model.unit.masterCarpenter"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterDistiller"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterDistiller"
|
||||
from="model.unit.masterDistiller"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterWeaver"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterWeaver"
|
||||
from="model.unit.masterWeaver"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterTobacconist"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterTobacconist"
|
||||
from="model.unit.masterTobacconist"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterFurTrader"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterFurTrader"
|
||||
from="model.unit.masterFurTrader"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterBlacksmith"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterBlacksmith"
|
||||
from="model.unit.masterBlacksmith"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterGunsmith"
|
||||
<unit-type-change id="model.unitChange.clearSkill.masterGunsmith"
|
||||
from="model.unit.masterGunsmith"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.seasonedScout"
|
||||
<unit-type-change id="model.unitChange.clearSkill.seasonedScout"
|
||||
from="model.unit.seasonedScout"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.hardyPioneer"
|
||||
<unit-type-change id="model.unitChange.clearSkill.hardyPioneer"
|
||||
from="model.unit.hardyPioneer"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.clearSkill.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.jesuitMissionary"
|
||||
<unit-type-change id="model.unitChange.clearSkill.jesuitMissionary"
|
||||
from="model.unit.jesuitMissionary"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.colonialRegular"
|
||||
<unit-type-change id="model.unitChange.clearSkill.colonialRegular"
|
||||
from="model.unit.colonialRegular"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.conversion" owner-change="true">
|
||||
<unit-type-change from="model.unit.brave"
|
||||
<unit-type-change id="model.unitChange.conversion.brave"
|
||||
from="model.unit.brave"
|
||||
to="model.unit.indianConvert" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.creation"/>
|
||||
<unit-change-type id="model.unitChange.demotion">
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.demotion.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.colonialRegular"
|
||||
<unit-type-change id="model.unitChange.demotion.colonialRegular"
|
||||
from="model.unit.colonialRegular"
|
||||
to="model.unit.veteranSoldier" probability="100"/>
|
||||
<unit-type-change from="model.unit.artillery"
|
||||
<unit-type-change id="model.unitChange.demotion.artillery"
|
||||
from="model.unit.artillery"
|
||||
to="model.unit.damagedArtillery" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.education">
|
||||
<unit-type-change from="model.unit.pettyCriminal"
|
||||
<unit-type-change id="model.unitChange.education.indenturedServant"
|
||||
from="model.unit.pettyCriminal"
|
||||
to="model.unit.indenturedServant"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.education.freeColonist"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.freeColonist"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertFarmer"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFarmer"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertFisherman"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFisherman"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertFurTrapper"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFurTrapper"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertSilverMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertSilverMiner"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertLumberJack"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertLumberJack"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.expertOreMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertOreMiner"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
to="model.unit.masterSugarPlanter"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterCottonPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterCottonPlanter"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterSugarPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterSugarPlanter"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change id="model.unitChange.education.masterTobaccoPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterTobaccoPlanter"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.firebrandPreacher"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.firebrandPreacher"
|
||||
probability="100" turns="8"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.elderStatesman"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.elderStatesman"
|
||||
probability="100" turns="8"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterCarpenter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterCarpenter"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterDistiller"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterDistiller"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterWeaver"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterWeaver"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterTobacconist"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterTobacconist"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterFurTrader"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterFurTrader"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterBlacksmith"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterBlacksmith"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.masterGunsmith"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterGunsmith"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.seasonedScout"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.seasonedScout"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.hardyPioneer"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.hardyPioneer"
|
||||
probability="100" turns="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.veteranSoldier"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.veteranSoldier"
|
||||
probability="100" turns="6"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.education.jesuitMissionary"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.jesuitMissionary"
|
||||
probability="100" turns="8"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.experience">
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertFarmer"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFarmer" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertFisherman"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFisherman" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertFurTrapper"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFurTrapper" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertSilverMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertSilverMiner" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertLumberJack"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertLumberJack" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.expertOreMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertOreMiner" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.masterSugarPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterSugarPlanter" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.masterCottonPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterCottonPlanter" probability="4"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.experience.masterTobaccoPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterTobaccoPlanter" probability="4"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.foundingFather">
|
||||
<scope ability-id="model.ability.upgradeConvert" ability-value="true"/>
|
||||
<unit-type-change from="model.unit.indianConvert"
|
||||
<unit-type-change id="model.unitChange.foundingFather.indianConvert"
|
||||
from="model.unit.indianConvert"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.independence">
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.independence.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.colonialRegular" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.lostCity">
|
||||
<unit-type-change from="model.unit.pettyCriminal"
|
||||
<unit-type-change id="model.unitChange.lostCity.pettyCriminal"
|
||||
from="model.unit.pettyCriminal"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.lostCity.indenturedServant"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.lostCity.freeColonist"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.natives">
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertFarmer"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertFarmer" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertFarmer"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFarmer" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertFisherman"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertFisherman" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertFisherman"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFisherman" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertFurTrapper"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertFurTrapper" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertFurTrapper"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertFurTrapper" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertSilverMiner"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertSilverMiner" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertSilverMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertSilverMiner" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertLumberJack"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertLumberJack" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertLumberJack"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertLumberJack" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-expertOreMiner"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.expertOreMiner" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-expertOreMiner"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.expertOreMiner" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterCottonPlanter"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterCottonPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterCottonPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterCottonPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterFurTrader"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterFurTrader" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterFurTrader"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterFurTrader" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterSugarPlanter"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterSugarPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterSugarPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterSugarPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterTobaccoPlanter"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterTobaccoPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterTobaccoPlanter"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterTobaccoPlanter" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-masterWeaver"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.masterWeaver" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-masterWeaver"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.masterWeaver" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.natives.indenturedServant-seasonedScout"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.natives.freeColonist-seasonedScout"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.seasonedScout" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.promotion">
|
||||
<unit-type-change from="model.unit.pettyCriminal"
|
||||
<unit-type-change id="model.unitChange.promotion.pettyCriminal"
|
||||
from="model.unit.pettyCriminal"
|
||||
to="model.unit.indenturedServant" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.promotion.indenturedServant"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.freeColonist" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.promotion.freeColonist"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.veteranSoldier" probability="100"/>
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.promotion.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.colonialRegular" probability="100"/>
|
||||
</unit-change-type>
|
||||
<unit-change-type id="model.unitChange.undead" owner-change="true">
|
||||
<unit-type-change from="model.unit.pettyCriminal"
|
||||
<unit-type-change id="model.unitChange.undead.pettyCriminal"
|
||||
from="model.unit.pettyCriminal"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.indenturedServant"
|
||||
<unit-type-change id="model.unitChange.undead.indenturedServant"
|
||||
from="model.unit.indenturedServant"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.undead.freeColonist"
|
||||
from="model.unit.freeColonist"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.freeColonist"
|
||||
<unit-type-change id="model.unitChange.undead.expertFarmer"
|
||||
from="model.unit.expertFarmer"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFarmer"
|
||||
<unit-type-change id="model.unitChange.undead.expertFisherman"
|
||||
from="model.unit.expertFisherman"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFisherman"
|
||||
<unit-type-change id="model.unitChange.undead.expertFurTrapper"
|
||||
from="model.unit.expertFurTrapper"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertFurTrapper"
|
||||
<unit-type-change id="model.unitChange.undead.expertSilverMiner"
|
||||
from="model.unit.expertSilverMiner"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertSilverMiner"
|
||||
<unit-type-change id="model.unitChange.undead.expertLumberJack"
|
||||
from="model.unit.expertLumberJack"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertLumberJack"
|
||||
<unit-type-change id="model.unitChange.undead.expertOreMiner"
|
||||
from="model.unit.expertOreMiner"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.expertOreMiner"
|
||||
<unit-type-change id="model.unitChange.undead.masterSugarPlanter"
|
||||
from="model.unit.masterSugarPlanter"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterSugarPlanter"
|
||||
<unit-type-change id="model.unitChange.undead.masterCottonPlanter"
|
||||
from="model.unit.masterCottonPlanter"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterCottonPlanter"
|
||||
<unit-type-change id="model.unitChange.undead.masterTobaccoPlanter"
|
||||
from="model.unit.masterTobaccoPlanter"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterTobaccoPlanter"
|
||||
<unit-type-change id="model.unitChange.undead.firebrandPreacher"
|
||||
from="model.unit.firebrandPreacher"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.firebrandPreacher"
|
||||
<unit-type-change id="model.unitChange.undead.elderStatesman"
|
||||
from="model.unit.elderStatesman"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.elderStatesman"
|
||||
<unit-type-change id="model.unitChange.undead.masterCarpenter"
|
||||
from="model.unit.masterCarpenter"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterCarpenter"
|
||||
<unit-type-change id="model.unitChange.undead.masterDistiller"
|
||||
from="model.unit.masterDistiller"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterDistiller"
|
||||
<unit-type-change id="model.unitChange.undead.masterWeaver"
|
||||
from="model.unit.masterWeaver"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterWeaver"
|
||||
<unit-type-change id="model.unitChange.undead.masterTobacconist"
|
||||
from="model.unit.masterTobacconist"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterTobacconist"
|
||||
<unit-type-change id="model.unitChange.undead.masterFurTrader"
|
||||
from="model.unit.masterFurTrader"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterFurTrader"
|
||||
<unit-type-change id="model.unitChange.undead.masterBlacksmith"
|
||||
from="model.unit.masterBlacksmith"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterBlacksmith"
|
||||
<unit-type-change id="model.unitChange.undead.masterGunsmith"
|
||||
from="model.unit.masterGunsmith"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.masterGunsmith"
|
||||
<unit-type-change id="model.unitChange.undead.seasonedScout"
|
||||
from="model.unit.seasonedScout"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.seasonedScout"
|
||||
<unit-type-change id="model.unitChange.undead.hardyPioneer"
|
||||
from="model.unit.hardyPioneer"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.hardyPioneer"
|
||||
<unit-type-change id="model.unitChange.undead.veteranSoldier"
|
||||
from="model.unit.veteranSoldier"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.veteranSoldier"
|
||||
<unit-type-change id="model.unitChange.undead.jesuitMissionary"
|
||||
from="model.unit.jesuitMissionary"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.jesuitMissionary"
|
||||
<unit-type-change id="model.unitChange.undead.kingsRegular"
|
||||
from="model.unit.kingsRegular"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.kingsRegular"
|
||||
<unit-type-change id="model.unitChange.undead.indianConvert"
|
||||
from="model.unit.indianConvert"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.indianConvert"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
<unit-type-change from="model.unit.brave"
|
||||
<unit-type-change id="model.unitChange.undead.brave"
|
||||
from="model.unit.brave"
|
||||
to="model.unit.undead" probability="100"/>
|
||||
</unit-change-type>
|
||||
</unit-change-types>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
In case of incompatible changes, please update version number and
|
||||
XSD schema for validation.
|
||||
-->
|
||||
<freecol-specification id="freecol" version="0.116" extends="classic">
|
||||
<freecol-specification id="freecol" version="0.117" extends="classic">
|
||||
|
||||
<goods-types>
|
||||
<goods-type id="model.goods.horses" is-farmed="false"
|
||||
|
|
|
@ -122,6 +122,12 @@
|
|||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="UnitTypeChangeId">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="model\.unitChange\.([a-zA-Z]+)\.([-a-zA-Z]+)" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:simpleType name="UnitTypeId">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="model\.unit\.([a-zA-Z])+" />
|
||||
|
|
|
@ -49,6 +49,10 @@
|
|||
|
||||
<xs:element name="unit-type-change">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element ref="scope"/>
|
||||
</xs:choice>
|
||||
<xs:attribute name="id" use="required" type="UnitTypeChangeId"/>
|
||||
<xs:attribute name="from" use="required" type="UnitTypeId"/>
|
||||
<xs:attribute name="probability" use="required" type="PercentageType"/>
|
||||
<xs:attribute name="to" use="required" type="UnitTypeId"/>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with FreeCol. If not, see http://www.gnu.org/licenses
|
||||
|
||||
XSD for specification version 0.116
|
||||
XSD for specification version 0.117
|
||||
CHANGELOG:
|
||||
0.26: add capture-equipment
|
||||
0.27: add limits
|
||||
|
@ -114,6 +114,7 @@
|
|||
0.114: Drop upgrade element from founding-father.
|
||||
0.115: Drop equipment.
|
||||
0.116: Mass update to fix neglect of saved game format.
|
||||
0.117: Update unit-type-change to include identifier.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ import net.sf.freecol.common.model.TradeRouteStop;
|
|||
import net.sf.freecol.common.model.Turn;
|
||||
import net.sf.freecol.common.model.Unit;
|
||||
import net.sf.freecol.common.model.UnitChangeType;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import net.sf.freecol.common.model.Unit.UnitState;
|
||||
import net.sf.freecol.common.model.UnitType;
|
||||
import net.sf.freecol.common.model.UnitWas;
|
||||
|
@ -2858,7 +2858,7 @@ public final class InGameController extends FreeColClientHolder {
|
|||
if (!requireOurTurn() || unit == null) return false;
|
||||
|
||||
UnitType oldType = unit.getType();
|
||||
UnitChange uc = unit.getUnitChange(UnitChangeType.CLEAR_SKILL);
|
||||
UnitTypeChange uc = unit.getUnitChange(UnitChangeType.CLEAR_SKILL);
|
||||
UnitType newType = (uc == null) ? null : uc.to;
|
||||
if (newType == null) {
|
||||
getGUI().showInformationMessage(unit, StringTemplate
|
||||
|
|
|
@ -62,7 +62,7 @@ import net.sf.freecol.common.model.Tile;
|
|||
import net.sf.freecol.common.model.Role;
|
||||
import net.sf.freecol.common.model.Unit;
|
||||
import net.sf.freecol.common.model.UnitChangeType;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import net.sf.freecol.common.model.Unit.UnitState;
|
||||
import net.sf.freecol.common.model.UnitLocation;
|
||||
import net.sf.freecol.common.model.UnitType;
|
||||
|
@ -460,8 +460,8 @@ public final class QuickActionMenu extends JPopupMenu {
|
|||
GoodsType goods = unit.getExperienceType();
|
||||
if (experience > 0 && goods != null) {
|
||||
UnitType expertType = spec.getExpertForProducing(goods);
|
||||
UnitChange uc = unit.getUnitChange(UnitChangeType.EXPERIENCE,
|
||||
expertType);
|
||||
UnitTypeChange uc = unit.getUnitChange(UnitChangeType.EXPERIENCE,
|
||||
expertType);
|
||||
if (uc != null) {
|
||||
int maxExperience = unit.getType().getMaximumExperience();
|
||||
double probability = uc.probability * experience
|
||||
|
@ -684,7 +684,7 @@ public final class QuickActionMenu extends JPopupMenu {
|
|||
}
|
||||
}
|
||||
|
||||
UnitChange uc = unit.getUnitChange(UnitChangeType.CLEAR_SKILL);
|
||||
UnitTypeChange uc = unit.getUnitChange(UnitChangeType.CLEAR_SKILL);
|
||||
if (uc != null) {
|
||||
if (separatorNeeded) this.addSeparator();
|
||||
JMenuItem menuItem = Utility.localizedMenuItem("quickActionMenu.clearSpeciality",
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.logging.Level;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
import net.sf.freecol.common.model.Modifier.ModifierType;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import static net.sf.freecol.common.util.CollectionUtils.*;
|
||||
import net.sf.freecol.common.util.LogBuilder;
|
||||
import static net.sf.freecol.common.util.RandomUtils.*;
|
||||
|
@ -699,7 +699,7 @@ public class SimpleCombatModel extends CombatModel {
|
|||
Player winnerPlayer = winner.getOwner();
|
||||
boolean attackerWon = crs.get(0) == CombatResult.WIN;
|
||||
boolean loserMustDie = loser.hasAbility(Ability.DISPOSE_ON_COMBAT_LOSS);
|
||||
UnitChange uc;
|
||||
UnitTypeChange uc;
|
||||
|
||||
if (loser.isNaval()) {
|
||||
// Naval victors get to loot the defenders hold. Sink the
|
||||
|
|
|
@ -48,7 +48,7 @@ import net.sf.freecol.common.io.FreeColTcFile;
|
|||
import net.sf.freecol.common.io.FreeColXMLReader;
|
||||
import net.sf.freecol.common.io.FreeColXMLWriter;
|
||||
import net.sf.freecol.common.model.NationOptions.Advantages;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitChangeType;
|
||||
import net.sf.freecol.common.option.AbstractOption;
|
||||
import net.sf.freecol.common.option.AbstractUnitOption;
|
||||
import net.sf.freecol.common.option.BooleanOption;
|
||||
|
@ -1322,9 +1322,9 @@ public final class Specification {
|
|||
* @param fromType The {@code UnitType} to change.
|
||||
* @return A list of {@code UnitChange}s.
|
||||
*/
|
||||
public List<UnitChange> getUnitChanges(String id, UnitType fromType) {
|
||||
public List<UnitTypeChange> getUnitChanges(String id, UnitType fromType) {
|
||||
UnitChangeType uct = getUnitChangeType(id);
|
||||
return (uct == null) ? Collections.<UnitChange>emptyList()
|
||||
return (uct == null) ? Collections.<UnitTypeChange>emptyList()
|
||||
: uct.getUnitChanges(fromType);
|
||||
}
|
||||
|
||||
|
@ -1339,7 +1339,7 @@ public final class Specification {
|
|||
* @return The {@code UnitChange} found, or null if the
|
||||
* change is impossible.
|
||||
*/
|
||||
public UnitChange getUnitChange(String id, UnitType fromType) {
|
||||
public UnitTypeChange getUnitChange(String id, UnitType fromType) {
|
||||
return getUnitChange(id, fromType, null);
|
||||
}
|
||||
|
||||
|
@ -1355,8 +1355,8 @@ public final class Specification {
|
|||
* @return The {@code UnitChange} found, or null if the
|
||||
* change is impossible.
|
||||
*/
|
||||
public UnitChange getUnitChange(String id, UnitType fromType,
|
||||
UnitType toType) {
|
||||
public UnitTypeChange getUnitChange(String id, UnitType fromType,
|
||||
UnitType toType) {
|
||||
UnitChangeType uct = getUnitChangeType(id);
|
||||
return (uct == null) ? null
|
||||
: uct.getUnitChange(fromType, toType);
|
||||
|
@ -1380,28 +1380,7 @@ public final class Specification {
|
|||
return getUnitChange(UnitChangeType.EDUCATION, typeStudent, learn).turns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a unit change.
|
||||
*
|
||||
* Needed by the test suite.
|
||||
*
|
||||
* @param id The id of the {@link UnitType} that can change.
|
||||
* @param from The {@code UnitType} that can change.
|
||||
* @param to The {@code UnitType} to change to.
|
||||
* @param prob The percentage chance of the change occurring.
|
||||
* @param turns The number of turns the change will take, if not
|
||||
* immediate.
|
||||
*/
|
||||
public void addUnitChange(String id, UnitType from, UnitType to,
|
||||
int prob, int turns) {
|
||||
UnitChangeType uct = getUnitChangeType(id);
|
||||
if (uct == null) {
|
||||
uct = new UnitChangeType(id, this);
|
||||
unitChangeTypeList.add(uct);
|
||||
}
|
||||
if (uct != null) uct.addUnitChange(from, to, prob, turns);
|
||||
}
|
||||
|
||||
|
||||
// -- Units --
|
||||
|
||||
public List<UnitType> getUnitTypeList() {
|
||||
|
|
|
@ -42,7 +42,7 @@ import net.sf.freecol.common.model.pathfinding.CostDecider;
|
|||
import net.sf.freecol.common.model.pathfinding.CostDeciders;
|
||||
import net.sf.freecol.common.model.pathfinding.GoalDecider;
|
||||
import net.sf.freecol.common.model.pathfinding.GoalDeciders;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import net.sf.freecol.common.option.GameOptions;
|
||||
import net.sf.freecol.common.networking.DOMMessage;
|
||||
import static net.sf.freecol.common.util.CollectionUtils.*;
|
||||
|
@ -1340,7 +1340,7 @@ public class Unit extends GoodsLocation
|
|||
* @return The {@code UnitChange} found, or null if the
|
||||
* change is impossible.
|
||||
*/
|
||||
public UnitChange getUnitChange(String change) {
|
||||
public UnitTypeChange getUnitChange(String change) {
|
||||
return getUnitChange(change, null);
|
||||
}
|
||||
|
||||
|
@ -1352,7 +1352,7 @@ public class Unit extends GoodsLocation
|
|||
* @return The {@code UnitChange} found, or null if the
|
||||
* change is impossible.
|
||||
*/
|
||||
public UnitChange getUnitChange(String change, UnitType toType) {
|
||||
public UnitTypeChange getUnitChange(String change, UnitType toType) {
|
||||
UnitChangeType uct = getSpecification().getUnitChangeType(change);
|
||||
if (uct != null && uct.getOwnerChange()) {
|
||||
throw new RuntimeException("2-arg getUnitChange of " + this
|
||||
|
@ -1370,8 +1370,8 @@ public class Unit extends GoodsLocation
|
|||
* @return The {@code UnitChange} found, or null if the
|
||||
* change is impossible.
|
||||
*/
|
||||
public UnitChange getUnitChange(String change, UnitType toType,
|
||||
Player player) {
|
||||
public UnitTypeChange getUnitChange(String change, UnitType toType,
|
||||
Player player) {
|
||||
if (player == null) {
|
||||
throw new RuntimeException("getUnitChange null player");
|
||||
}
|
||||
|
@ -1384,7 +1384,7 @@ public class Unit extends GoodsLocation
|
|||
+ " player=" + player.getSuffix()
|
||||
+ " owner=" + getOwner().getSuffix());
|
||||
}
|
||||
UnitChange uc = (uct == null || !uct.appliesTo(this)) ? null
|
||||
UnitTypeChange uc = (uct == null || !uct.appliesTo(this)) ? null
|
||||
: uct.getUnitChange(getType(), toType);
|
||||
return (uc == null || !uc.isAvailableTo(player)) ? null : uc;
|
||||
}
|
||||
|
|
|
@ -98,68 +98,8 @@ public class UnitChangeType extends FreeColSpecObjectType {
|
|||
public static final String UNDEAD
|
||||
= "model.unitChange.undead";
|
||||
|
||||
|
||||
/** Simple container for the individual changes. */
|
||||
public static class UnitChange {
|
||||
|
||||
/** The unit type to change from. */
|
||||
public UnitType from;
|
||||
|
||||
/** The unit type to change to. */
|
||||
public UnitType to;
|
||||
|
||||
/** The percentage chance of the change occurring. */
|
||||
public int probability;
|
||||
|
||||
/** The number of turns for the change to take, if not immediate. */
|
||||
public int turns;
|
||||
|
||||
|
||||
/**
|
||||
* Simple constructor for a unit change.
|
||||
*
|
||||
* @param from The {@code UnitType} to change from.
|
||||
* @param to The {@code UnitType} to change to.
|
||||
* @param probability The percentage chance of the change occuring.
|
||||
* @param turns The number of turns the change takes if not immediate.
|
||||
*/
|
||||
public UnitChange(UnitType from, UnitType to, int probability, int turns) {
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
this.probability = probability;
|
||||
this.turns = turns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to check if a change is available to a player.
|
||||
* This is useful when the change involves a transfer of ownership.
|
||||
*
|
||||
* @param player The {@code Player} to test.
|
||||
* @return True if the player can use the to-unit-type.
|
||||
*/
|
||||
public boolean isAvailableTo(Player player) {
|
||||
return this.to.isAvailableTo(player);
|
||||
}
|
||||
|
||||
|
||||
// Override Object
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder(32);
|
||||
sb.append(this.from.getSuffix())
|
||||
.append("->").append(this.to.getSuffix())
|
||||
.append('/').append(this.probability);
|
||||
if (this.turns > 0) sb.append('/').append(this.turns);
|
||||
return sb.toString();
|
||||
}
|
||||
};
|
||||
|
||||
/** The individual unit changes valid for this change type. */
|
||||
public final Map<UnitType, List<UnitChange>> changes = new HashMap<>();
|
||||
public final Map<UnitType, List<UnitTypeChange>> changes = new HashMap<>();
|
||||
|
||||
/** True if this type of change always implies a change of owner. */
|
||||
private boolean ownerChange = false;
|
||||
|
@ -187,19 +127,12 @@ public class UnitChangeType extends FreeColSpecObjectType {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add a new change for the given parameters.
|
||||
* Add a new change.
|
||||
*
|
||||
* @param from The {@code UnitType} that can change.
|
||||
* @param to The {@code UnitType} to change to.
|
||||
* @param prob The percentage chance of the change occurring.
|
||||
* @param turns The number of turns the change will take, if not
|
||||
* immediate.
|
||||
* @param uc The {@code UnitTypeChange} to add.
|
||||
*/
|
||||
public void addUnitChange(UnitType from, UnitType to, int prob, int turns) {
|
||||
if (from != null && to != null && prob > 0) {
|
||||
appendToMapList(this.changes, from,
|
||||
new UnitChange(from, to, prob, turns));
|
||||
}
|
||||
public void addUnitTypeChange(UnitTypeChange uc) {
|
||||
appendToMapList(this.changes, uc.from, uc);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -208,9 +141,9 @@ public class UnitChangeType extends FreeColSpecObjectType {
|
|||
* @param from The source {@code UnitType}.
|
||||
* @return A list of {@code UnitChange}s.
|
||||
*/
|
||||
public List<UnitChange> getUnitChanges(UnitType from) {
|
||||
List<UnitChange> ret = this.changes.get(from);
|
||||
return (ret == null) ? Collections.<UnitChange>emptyList() : ret;
|
||||
public List<UnitTypeChange> getUnitChanges(UnitType from) {
|
||||
List<UnitTypeChange> ret = this.changes.get(from);
|
||||
return (ret == null) ? Collections.<UnitTypeChange>emptyList() : ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -222,7 +155,8 @@ public class UnitChangeType extends FreeColSpecObjectType {
|
|||
* @return The {@code UnitChange} found, or null if the
|
||||
* change is impossible.
|
||||
*/
|
||||
public UnitChange getUnitChange(UnitType fromType, final UnitType toType) {
|
||||
public UnitTypeChange getUnitChange(UnitType fromType,
|
||||
final UnitType toType) {
|
||||
return find(getUnitChanges(fromType),
|
||||
((toType == null) ? alwaysTrue() : uc -> uc.to == toType));
|
||||
}
|
||||
|
@ -236,12 +170,7 @@ public class UnitChangeType extends FreeColSpecObjectType {
|
|||
|
||||
// Serialization
|
||||
|
||||
private static final String FROM_TAG = "from";
|
||||
private static final String OWNER_CHANGE_TAG = "owner-change";
|
||||
private static final String PROBABILITY_TAG = "probability";
|
||||
private static final String TO_TAG = "to";
|
||||
private static final String TURNS_TAG = "turns";
|
||||
private static final String UNIT_TYPE_CHANGE_TAG = "unit-type-change";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -261,22 +190,8 @@ public class UnitChangeType extends FreeColSpecObjectType {
|
|||
protected void writeChildren(FreeColXMLWriter xw) throws XMLStreamException {
|
||||
super.writeChildren(xw);
|
||||
|
||||
for (Map.Entry<UnitType, List<UnitChange>> entry
|
||||
: this.changes.entrySet()) {
|
||||
for (UnitChange uc : entry.getValue()) {
|
||||
|
||||
xw.writeStartElement(UNIT_TYPE_CHANGE_TAG);
|
||||
|
||||
xw.writeAttribute(FROM_TAG, entry.getKey());
|
||||
|
||||
xw.writeAttribute(TO_TAG, uc.to);
|
||||
|
||||
xw.writeAttribute(PROBABILITY_TAG, uc.probability);
|
||||
|
||||
if (uc.turns > 0) xw.writeAttribute(TURNS_TAG, uc.turns);
|
||||
|
||||
xw.writeEndElement();
|
||||
}
|
||||
for (List<UnitTypeChange> utcs : this.changes.values()) {
|
||||
for (UnitTypeChange uc : utcs) uc.toXML(xw);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -310,14 +225,10 @@ public class UnitChangeType extends FreeColSpecObjectType {
|
|||
protected void readChild(FreeColXMLReader xr) throws XMLStreamException {
|
||||
final Specification spec = getSpecification();
|
||||
final String tag = xr.getLocalName();
|
||||
if (UNIT_TYPE_CHANGE_TAG.equals(tag)) {
|
||||
addUnitChange(xr.getType(spec, FROM_TAG,
|
||||
UnitType.class, (UnitType)null),
|
||||
xr.getType(spec, TO_TAG,
|
||||
UnitType.class, (UnitType)null),
|
||||
xr.getAttribute(PROBABILITY_TAG, 0),
|
||||
xr.getAttribute(TURNS_TAG, -1));
|
||||
xr.closeTag(tag);
|
||||
|
||||
if (UnitTypeChange.TAG.equals(tag)) {
|
||||
UnitTypeChange utc = new UnitTypeChange(xr, spec);
|
||||
if (utc != null) addUnitTypeChange(utc);
|
||||
|
||||
} else {
|
||||
super.readChild(xr);
|
||||
|
@ -340,10 +251,10 @@ public class UnitChangeType extends FreeColSpecObjectType {
|
|||
StringBuilder sb = new StringBuilder(64);
|
||||
sb.append('[').append(getId()).append(' ').append(getSuffix())
|
||||
.append(" ownerChange=").append(this.ownerChange);
|
||||
for (Map.Entry<UnitType, List<UnitChange>> entry
|
||||
for (Map.Entry<UnitType, List<UnitTypeChange>> entry
|
||||
: this.changes.entrySet()) {
|
||||
sb.append(' ').append(entry.getKey().getSuffix()).append('[');
|
||||
for (UnitChange uc : entry.getValue()) {
|
||||
for (UnitTypeChange uc : entry.getValue()) {
|
||||
sb.append(' ').append(uc);
|
||||
}
|
||||
sb.append(" ]");
|
||||
|
|
|
@ -31,7 +31,7 @@ import javax.xml.stream.XMLStreamException;
|
|||
import net.sf.freecol.common.io.FreeColXMLReader;
|
||||
import net.sf.freecol.common.io.FreeColXMLWriter;
|
||||
import net.sf.freecol.common.model.Colony.NoBuildReason;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import static net.sf.freecol.common.util.CollectionUtils.*;
|
||||
|
||||
|
||||
|
@ -444,7 +444,7 @@ public final class UnitType extends BuildableType implements Consumer {
|
|||
// and should be returned at once. Accumulate other intermediate
|
||||
// changes that do not reach the taught type level.
|
||||
List<UnitType> todo = new ArrayList<>();
|
||||
for (UnitChange uc : spec.getUnitChanges(UnitChangeType.EDUCATION, this)) {
|
||||
for (UnitTypeChange uc : spec.getUnitChanges(UnitChangeType.EDUCATION, this)) {
|
||||
if (uc.to == taught) return taught;
|
||||
if (uc.to.getSkill() < taughtLevel) todo.add(uc.to);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,149 @@
|
|||
/**
|
||||
* Copyright (C) 2002-2017 The FreeCol Team
|
||||
*
|
||||
* This file is part of FreeCol.
|
||||
*
|
||||
* FreeCol is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FreeCol is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with FreeCol. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package net.sf.freecol.common.model;
|
||||
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
|
||||
import net.sf.freecol.common.io.FreeColXMLReader;
|
||||
import net.sf.freecol.common.io.FreeColXMLWriter;
|
||||
import static net.sf.freecol.common.util.CollectionUtils.*;
|
||||
|
||||
|
||||
/**
|
||||
* Simple container for individual type changes.
|
||||
*/
|
||||
public class UnitTypeChange extends FreeColSpecObjectType {
|
||||
|
||||
public static final String TAG = "unit-type-change";
|
||||
|
||||
/** The unit type to change from. */
|
||||
public UnitType from;
|
||||
|
||||
/** The unit type to change to. */
|
||||
public UnitType to;
|
||||
|
||||
/** The percentage chance of the change occurring. */
|
||||
public int probability;
|
||||
|
||||
/** The number of turns for the change to take, if not immediate. */
|
||||
public int turns;
|
||||
|
||||
|
||||
/**
|
||||
* Trivial constructor.
|
||||
*
|
||||
* @param id The object identifier.
|
||||
* @param specification The {@code Specification} to use.
|
||||
*/
|
||||
public UnitTypeChange(String id, Specification specification) {
|
||||
super(id, specification);
|
||||
}
|
||||
|
||||
/**
|
||||
* Read a unit change from a stream.
|
||||
*
|
||||
* @param xr The {@code FreeColXMLReader} to read from.
|
||||
* @exception XMLStreamException if there is a problem reading
|
||||
* the stream.
|
||||
*/
|
||||
public UnitTypeChange(FreeColXMLReader xr, Specification spec)
|
||||
throws XMLStreamException {
|
||||
this(xr.readId(), spec);
|
||||
|
||||
readFromXML(xr);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper to check if a change is available to a player.
|
||||
* This is useful when the change involves a transfer of ownership.
|
||||
*
|
||||
* @param player The {@code Player} to test.
|
||||
* @return True if the player can use the to-unit-type.
|
||||
*/
|
||||
public boolean isAvailableTo(Player player) {
|
||||
return this.to.isAvailableTo(player);
|
||||
}
|
||||
|
||||
|
||||
// Serialization
|
||||
|
||||
private static final String FROM_TAG = "from";
|
||||
private static final String PROBABILITY_TAG = "probability";
|
||||
private static final String TO_TAG = "to";
|
||||
private static final String TURNS_TAG = "turns";
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void writeAttributes(FreeColXMLWriter xw) throws XMLStreamException {
|
||||
super.writeAttributes(xw);
|
||||
|
||||
xw.writeAttribute(FROM_TAG, this.from);
|
||||
|
||||
xw.writeAttribute(TO_TAG, this.to);
|
||||
|
||||
xw.writeAttribute(PROBABILITY_TAG, this.probability);
|
||||
|
||||
if (this.turns > 0) xw.writeAttribute(TURNS_TAG, this.turns);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void readAttributes(FreeColXMLReader xr) throws XMLStreamException {
|
||||
final Specification spec = getSpecification();
|
||||
|
||||
super.readAttributes(xr);
|
||||
|
||||
this.from = xr.getType(spec, FROM_TAG, UnitType.class, (UnitType)null);
|
||||
|
||||
this.to = xr.getType(spec, TO_TAG, UnitType.class, (UnitType)null);
|
||||
|
||||
this.probability = xr.getAttribute(PROBABILITY_TAG, 0);
|
||||
|
||||
this.turns = xr.getAttribute(TURNS_TAG, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public String getXMLTagName() { return TAG; }
|
||||
|
||||
|
||||
// Override Object
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder(32);
|
||||
sb.append(this.from.getSuffix())
|
||||
.append("->").append(this.to.getSuffix())
|
||||
.append('/').append(this.probability);
|
||||
if (this.turns > 0) sb.append('/').append(this.turns);
|
||||
return sb.toString();
|
||||
}
|
||||
};
|
||||
|
|
@ -95,7 +95,7 @@ import net.sf.freecol.common.model.TradeRouteStop;
|
|||
import net.sf.freecol.common.model.Turn;
|
||||
import net.sf.freecol.common.model.Unit;
|
||||
import net.sf.freecol.common.model.UnitChangeType;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import net.sf.freecol.common.model.Unit.UnitState;
|
||||
import net.sf.freecol.common.model.UnitLocation;
|
||||
import net.sf.freecol.common.model.UnitType;
|
||||
|
@ -1266,7 +1266,7 @@ public final class InGameController extends Controller {
|
|||
* @return A {@code ChangeSet} encapsulating this action.
|
||||
*/
|
||||
public ChangeSet clearSpeciality(ServerPlayer serverPlayer, Unit unit) {
|
||||
UnitChange uc = unit.getUnitChange(UnitChangeType.CLEAR_SKILL);
|
||||
UnitTypeChange uc = unit.getUnitChange(UnitChangeType.CLEAR_SKILL);
|
||||
if (uc == null) {
|
||||
return serverPlayer.clientError("Can not clear unit speciality: "
|
||||
+ unit.getId());
|
||||
|
@ -3840,7 +3840,7 @@ public final class InGameController extends Controller {
|
|||
colony.equipForRole(unit, spec.getDefaultRole(), 0);
|
||||
|
||||
// Check for upgrade.
|
||||
UnitChange uc = unit.getUnitChange(UnitChangeType.ENTER_COLONY);
|
||||
UnitTypeChange uc = unit.getUnitChange(UnitChangeType.ENTER_COLONY);
|
||||
if (uc != null) unit.changeType(uc.to);//-vis: safe in colony
|
||||
|
||||
// Change the location.
|
||||
|
|
|
@ -87,7 +87,7 @@ import net.sf.freecol.common.model.TradeRoute;
|
|||
import net.sf.freecol.common.model.Turn;
|
||||
import net.sf.freecol.common.model.Unit;
|
||||
import net.sf.freecol.common.model.UnitChangeType;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import net.sf.freecol.common.model.UnitType;
|
||||
import net.sf.freecol.common.model.WorkLocation;
|
||||
import net.sf.freecol.common.model.pathfinding.GoalDeciders;
|
||||
|
@ -1900,7 +1900,7 @@ outer: for (Effect effect : effects) {
|
|||
= spec.getUnitChangeType(UnitChangeType.FOUNDING_FATHER);
|
||||
if (uct != null && uct.appliesTo(this)) {
|
||||
for (Unit u : getUnitList()) {
|
||||
for (UnitChange uc : uct.getUnitChanges(u.getType())) {
|
||||
for (UnitTypeChange uc : uct.getUnitChanges(u.getType())) {
|
||||
u.changeType(uc.to);//-vis(this)
|
||||
visibilityChange = true;
|
||||
cs.add(See.perhaps(), u);
|
||||
|
@ -3103,7 +3103,7 @@ outer: for (Effect effect : effects) {
|
|||
final String suffix = loser.getType().getSuffix(); // pre-demotion value
|
||||
String key;
|
||||
|
||||
UnitChange uc = loser.getUnitChange(UnitChangeType.DEMOTION);
|
||||
UnitTypeChange uc = loser.getUnitChange(UnitChangeType.DEMOTION);
|
||||
if (uc == null || uc.to == loser.getType()) {
|
||||
logger.warning("Demotion failed, type="
|
||||
+ ((uc == null) ? "null" : "same type: " + uc.to));
|
||||
|
@ -3690,7 +3690,7 @@ outer: for (Effect effect : effects) {
|
|||
ServerPlayer winnerPlayer = (ServerPlayer) winner.getOwner();
|
||||
StringTemplate winnerLabel = winner.getLabel();
|
||||
|
||||
UnitChange uc = winner.getUnitChange(UnitChangeType.PROMOTION);
|
||||
UnitTypeChange uc = winner.getUnitChange(UnitChangeType.PROMOTION);
|
||||
if (uc == null || uc.to == winner.getType()) {
|
||||
logger.warning("Promotion failed, type="
|
||||
+ ((uc == null) ? "null" : "same type: " + uc.to));
|
||||
|
@ -4221,7 +4221,7 @@ outer: for (Effect effect : effects) {
|
|||
final Tile oldTile = unit.getTile();
|
||||
if (change != null) {
|
||||
UnitType mainType = unit.getType();
|
||||
UnitChange uc;
|
||||
UnitTypeChange uc;
|
||||
if ((uc = unit.getUnitChange(change, null, newOwner)) == null) {
|
||||
; // mainType is unchanged
|
||||
} else if (uc.isAvailableTo(newOwner)) {
|
||||
|
|
|
@ -63,7 +63,7 @@ import net.sf.freecol.common.model.TileType;
|
|||
import net.sf.freecol.common.model.Turn;
|
||||
import net.sf.freecol.common.model.Unit;
|
||||
import net.sf.freecol.common.model.UnitChangeType;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import net.sf.freecol.common.model.UnitType;
|
||||
import net.sf.freecol.common.model.WorkLocation;
|
||||
import net.sf.freecol.common.networking.ChangeSet;
|
||||
|
@ -199,7 +199,7 @@ public class ServerUnit extends Unit implements TurnTaker {
|
|||
this.visibleGoodsCount = -1;
|
||||
|
||||
// Check for creation change
|
||||
UnitChange uc = getUnitChange(UnitChangeType.CREATION);
|
||||
UnitTypeChange uc = getUnitChange(UnitChangeType.CREATION);
|
||||
if (uc != null) this.unitType = uc.to;
|
||||
|
||||
// Fix up role, state and location now other values are present.
|
||||
|
@ -527,7 +527,7 @@ public class ServerUnit extends Unit implements TurnTaker {
|
|||
break;
|
||||
case LEARN:
|
||||
StringTemplate oldName = getLabel();
|
||||
UnitChange uc = getRandomMember(logger, "Choose learn",
|
||||
UnitTypeChange uc = getRandomMember(logger, "Choose learn",
|
||||
spec.getUnitChanges(UnitChangeType.LOST_CITY, getType()),
|
||||
random);
|
||||
changeType(uc.to);//-vis(serverPlayer)
|
||||
|
@ -959,7 +959,7 @@ public class ServerUnit extends Unit implements TurnTaker {
|
|||
// Check for experience-promotion.
|
||||
GoodsType produce;
|
||||
UnitType learn;
|
||||
UnitChange uc;
|
||||
UnitTypeChange uc;
|
||||
if (isInColony()
|
||||
&& (produce = getWorkType()) != null
|
||||
&& (learn = spec.getExpertForProducing(produce)) != null
|
||||
|
|
|
@ -57,8 +57,8 @@ public class UnitChangeTypeTest extends FreeColTestCase {
|
|||
|
||||
assertNull(gardenerType.getTeachingType(farmer));
|
||||
|
||||
spec().addUnitChange(UnitChangeType.EDUCATION, gardenerType, farmer,
|
||||
100, -1);
|
||||
addUnitTypeChange(UnitChangeType.EDUCATION, gardenerType, farmer,
|
||||
100, -1);
|
||||
|
||||
assertEquals(farmer, gardenerType.getTeachingType(farmer));
|
||||
|
||||
|
@ -88,8 +88,8 @@ public class UnitChangeTypeTest extends FreeColTestCase {
|
|||
assertEquals(0, count(spec().getUnitChanges(UnitChangeType.CREATION,
|
||||
gardenerType)));
|
||||
|
||||
spec().addUnitChange(UnitChangeType.CREATION, gardenerType, farmer,
|
||||
100, -1);
|
||||
addUnitTypeChange(UnitChangeType.CREATION, gardenerType, farmer,
|
||||
100, -1);
|
||||
|
||||
assertEquals(1, count(spec().getUnitChanges(UnitChangeType.CREATION,
|
||||
gardenerType)));
|
||||
|
|
|
@ -58,7 +58,7 @@ import net.sf.freecol.common.model.TileImprovementType;
|
|||
import net.sf.freecol.common.model.TileType;
|
||||
import net.sf.freecol.common.model.Unit;
|
||||
import net.sf.freecol.common.model.UnitChangeType;
|
||||
import net.sf.freecol.common.model.UnitChangeType.UnitChange;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import net.sf.freecol.common.model.UnitType;
|
||||
import net.sf.freecol.common.model.WorkLocation;
|
||||
import static net.sf.freecol.common.util.CollectionUtils.*;
|
||||
|
@ -2089,8 +2089,8 @@ public class InGameControllerTest extends FreeColTestCase {
|
|||
gardenerType.setSkill(0);
|
||||
gardenerType.addAbility(new Ability(Ability.PERSON));
|
||||
|
||||
spec().addUnitChange(UnitChangeType.ENTER_COLONY, gardenerType,
|
||||
farmerType, 100, -1);
|
||||
addUnitTypeChange(UnitChangeType.ENTER_COLONY, gardenerType, farmerType,
|
||||
100, -1);
|
||||
|
||||
assertEquals(farmerType,
|
||||
spec().getUnitChange(UnitChangeType.ENTER_COLONY, gardenerType).to);
|
||||
|
|
|
@ -47,7 +47,9 @@ import net.sf.freecol.common.model.Specification;
|
|||
import net.sf.freecol.common.model.Tile;
|
||||
import net.sf.freecol.common.model.TileType;
|
||||
import net.sf.freecol.common.model.Unit;
|
||||
import net.sf.freecol.common.model.UnitChangeType;
|
||||
import net.sf.freecol.common.model.UnitType;
|
||||
import net.sf.freecol.common.model.UnitTypeChange;
|
||||
import net.sf.freecol.common.model.WorkLocation;
|
||||
import static net.sf.freecol.common.util.CollectionUtils.*;
|
||||
import net.sf.freecol.server.model.ServerGame;
|
||||
|
@ -716,4 +718,20 @@ public class FreeColTestCase extends TestCase {
|
|||
}
|
||||
assertTrue(err + " requires more goods", check.isEmpty());
|
||||
}
|
||||
|
||||
public void addUnitTypeChange(String type, UnitType from, UnitType to,
|
||||
int probability, int turns) {
|
||||
UnitTypeChange utc = new UnitTypeChange(type + "."
|
||||
+ from.getSuffix() + "-" + to.getSuffix(), spec());
|
||||
utc.from = from;
|
||||
utc.to = to;
|
||||
utc.probability = probability;
|
||||
utc.turns = turns;
|
||||
UnitChangeType uct = spec().getUnitChangeType(type);
|
||||
if (uct == null) {
|
||||
uct = new UnitChangeType(type, spec());
|
||||
spec().getUnitChangeTypeList().add(uct);
|
||||
}
|
||||
uct.addUnitTypeChange(utc);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue