|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.model.FreeColGameObjectType
net.sf.freecol.common.model.TileImprovementType
public final class TileImprovementType
Field Summary |
---|
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
TileImprovementType(int index)
|
Method Summary | |
---|---|
boolean |
changeContainsTarget(TileType tileType)
|
int |
getAddWorkTurns()
|
java.lang.String |
getArtOverlay()
|
int |
getBonus(GoodsType goodsType)
|
TileType |
getChange(TileType tileType)
|
int |
getDeliverAmount()
|
GoodsType |
getDeliverGoodsType()
|
int |
getExpendedAmount()
|
EquipmentType |
getExpendedEquipmentType()
|
int |
getMagnitude()
|
int |
getMovementCost(int moveCost)
Performs reduction of the movement-cost. |
java.lang.String |
getOccupationString()
|
Modifier |
getProductionModifier(GoodsType goodsType)
|
TileImprovementType |
getRequiredImprovementType()
|
int |
getValue(TileType tileType,
GoodsType goodsType)
Returns a value for use in AI decision making. |
int |
getZIndex()
Get the ZIndex value. |
boolean |
isNatural()
|
boolean |
isTileAllowed(Tile tile)
Check if a given Tile is valid for this TileImprovement. |
boolean |
isTileTypeAllowed(TileType tileType)
This will check if in principle this type of improvement can be used on this kind of tile, disregarding the current state of an actual tile. |
boolean |
isWorkerAllowed(Unit unit)
Check if a given Unit can perform this TileImprovement. |
boolean |
isWorkerTypeAllowed(UnitType unitType)
|
void |
readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
setZIndex(int newZIndex)
Set the ZIndex value. |
Methods inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
---|
addAbility, addModifier, getFeatureContainer, getIndex, getModifierSet, hasAbility, hasAbility, readFromXML, setFeatureContainer, setIndex, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TileImprovementType(int index)
Method Detail |
---|
public boolean isNatural()
public int getMagnitude()
public int getAddWorkTurns()
public java.lang.String getOccupationString()
public java.lang.String getArtOverlay()
public int getZIndex()
ZIndex
value.
int
valuepublic void setZIndex(int newZIndex)
ZIndex
value.
newZIndex
- The new ZIndex value.public TileImprovementType getRequiredImprovementType()
public EquipmentType getExpendedEquipmentType()
public int getExpendedAmount()
public GoodsType getDeliverGoodsType()
public int getDeliverAmount()
public boolean isWorkerTypeAllowed(UnitType unitType)
public boolean isWorkerAllowed(Unit unit)
Unit
can perform this TileImprovement.
public boolean isTileTypeAllowed(TileType tileType)
isTileAllowed(Tile)
.
tileType
- The type of terrain
public boolean isTileAllowed(Tile tile)
Tile
is valid for this TileImprovement.
public int getBonus(GoodsType goodsType)
public Modifier getProductionModifier(GoodsType goodsType)
public TileType getChange(TileType tileType)
public boolean changeContainsTarget(TileType tileType)
public int getValue(TileType tileType, GoodsType goodsType)
tileType
- The TileType
to be considered. A null
entry
denotes no interest in a TileImprovementType that changes TileTypesgoodsType
- A preferred GoodsType
or null
public int getMovementCost(int moveCost)
moveCost
- Original movement cost
public void readAttributes(javax.xml.stream.XMLStreamReader in, Specification specification) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public void readChildren(javax.xml.stream.XMLStreamReader in, Specification specification) throws javax.xml.stream.XMLStreamException
readChildren
in class FreeColGameObjectType
javax.xml.stream.XMLStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |