|
|||||||||
| 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.Feature
net.sf.freecol.common.model.Ability
public final class Ability
The Ability class encapsulates a bonus or penalty
that can be applied to any action within the game, most obviously
combat.
| Field Summary | |
|---|---|
static java.lang.String |
ADD_TAX_TO_BELLS
The ability to add the current tax as a bonus to the production of bells. |
static java.lang.String |
AUTO_PRODUCTION
The ability of certain buildings (e.g. |
static java.lang.String |
AVOID_EXCESS_PRODUCTION
The ability of certain buildings (e.g. |
static java.lang.String |
BOMBARD
The ability to bombard other units, i.e. |
static java.lang.String |
BORN_IN_COLONY
The ability to be born in a Colony. |
static java.lang.String |
BORN_IN_INDIAN_SETTLEMENT
The ability to be born in an IndianSettlement. |
static java.lang.String |
BUILD
The ability to build BuildableTypes, such as units. |
static java.lang.String |
CAN_BE_CAPTURED
The ability of certain unarmed units to be captured by another player's units. |
static java.lang.String |
CAN_BE_EQUIPPED
The ability of certain units to be equipped with tools, muskets, etc. |
static java.lang.String |
CAN_TEACH
The ability of some buildings (e.g. |
static java.lang.String |
CAPTURE_GOODS
The ability of certain units (e.g. |
static java.lang.String |
CAPTURE_UNITS
The ability of certain armed units to capture another player's units. |
static java.lang.String |
CARRY_GOODS
The ability of certain units (e.g. |
static java.lang.String |
CARRY_TREASURE
The ability of certain units (e.g. |
static java.lang.String |
CARRY_UNITS
The ability of certain units (e.g. |
static java.lang.String |
CONSUME_ALL_OR_NOTHING
The ability of certain consumers (e.g. |
static java.lang.String |
EXPERT_MISSIONARY
The ability of certain units to work as missionaries more effectively. |
static java.lang.String |
EXPERT_PIONEER
The ability of certain units to build TileImprovements faster. |
static java.lang.String |
EXPERT_SCOUT
The ability of certain units to work as scouts more effectively. |
static java.lang.String |
EXPERT_SOLDIER
The ability of certain units to work as soldiers more effectively. |
static java.lang.String |
EXPERTS_USE_CONNECTIONS
The somewhat controversial ability of expert units in factory level buildings to produce a certain amount of goods even when no raw materials are available. |
static java.lang.String |
EXPORT
The ability to export goods to Europe directly. |
static java.lang.String |
NAVAL_UNIT
The ability of ships to move across water tiles. |
static java.lang.String |
PIRACY
The ability of certain units (e.g. |
static java.lang.String |
PRODUCE_IN_WATER
The ability to produce goods (e.g. |
private boolean |
value
|
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, INFINITY, logger, NO_ID, PARTIAL_ATTRIBUTE, UNDEFINED, VALUE_TAG |
| Constructor Summary | |
|---|---|
Ability(Ability template)
Creates a new Ability instance. |
|
Ability(org.w3c.dom.Element element)
Creates a new Ability instance. |
|
Ability(java.lang.String id)
Creates a new Ability instance. |
|
Ability(java.lang.String id,
boolean value)
Creates a new Ability instance. |
|
Ability(java.lang.String id,
FreeColGameObjectType source,
boolean value)
Creates a new Ability instance. |
|
Ability(javax.xml.stream.XMLStreamReader in,
Specification specification)
Creates a new Ability instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
boolean |
getValue()
Get the Value value. |
static java.lang.String |
getXMLElementTagName()
Returns the XML tag name for this element. |
int |
hashCode()
|
protected void |
readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
Reads the attributes of this object from an XML stream. |
void |
setValue(boolean newValue)
Set the Value value. |
java.lang.String |
toString()
|
void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out)
This method writes an XML-representation of this object to the given stream. |
protected void |
writeAttributes(javax.xml.stream.XMLStreamWriter out)
Write the attributes of this object to a stream. |
| Methods inherited from class net.sf.freecol.common.model.Feature |
|---|
appliesTo, appliesTo, copy, getFirstTurn, getLastTurn, getNameKey, getScopes, getSource, hasScope, hasTimeLimit, isOutOfDate, readChildren, setFirstTurn, setLastTurn, setScopes, setSource, writeChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ADD_TAX_TO_BELLS
FoundingFather Thomas Paine.
public static final java.lang.String AUTO_PRODUCTION
public static final java.lang.String AVOID_EXCESS_PRODUCTION
public static final java.lang.String BOMBARD
public static final java.lang.String BORN_IN_COLONY
public static final java.lang.String BORN_IN_INDIAN_SETTLEMENT
public static final java.lang.String BUILD
BuildableTypes, such as units. The
shipyard provides the ability to build ships, for example.
public static final java.lang.String CAN_BE_CAPTURED
public static final java.lang.String CAN_BE_EQUIPPED
public static final java.lang.String CAN_TEACH
public static final java.lang.String CAPTURE_GOODS
public static final java.lang.String CAPTURE_UNITS
public static final java.lang.String CARRY_GOODS
public static final java.lang.String CARRY_UNITS
public static final java.lang.String CARRY_TREASURE
public static final java.lang.String CONSUME_ALL_OR_NOTHING
public static final java.lang.String EXPERT_MISSIONARY
public static final java.lang.String EXPERT_PIONEER
public static final java.lang.String EXPERT_SCOUT
public static final java.lang.String EXPERT_SOLDIER
public static final java.lang.String EXPERTS_USE_CONNECTIONS
public static final java.lang.String EXPORT
public static final java.lang.String NAVAL_UNIT
public static final java.lang.String PIRACY
public static final java.lang.String PRODUCE_IN_WATER
private boolean value
| Constructor Detail |
|---|
public Ability(java.lang.String id)
Ability instance.
id - a String value
public Ability(java.lang.String id,
boolean value)
Ability instance.
id - a String valuevalue - a boolean value
public Ability(java.lang.String id,
FreeColGameObjectType source,
boolean value)
Ability instance.
id - a String valuesource - a FreeColGameObjectType valuevalue - a boolean valuepublic Ability(Ability template)
Ability instance.
template - an Ability valuepublic Ability(org.w3c.dom.Element element)
Ability instance.
element - an Element value
public Ability(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
Ability instance.
in - a XMLStreamReader valuespecification - a Specification value
javax.xml.stream.XMLStreamException - if an error occurs| Method Detail |
|---|
public boolean getValue()
Value value.
boolean valuepublic void setValue(boolean newValue)
Value value.
newValue - The new Value value.public int hashCode()
Feature
hashCode in class Featurepublic boolean equals(java.lang.Object o)
Feature
equals in class Feature
public void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
toXMLImpl in class FreeColObjectout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing
to the stream.
protected void writeAttributes(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
writeAttributes in class Featureout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing to
the stream.
protected void readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readAttributes in class Featurein - The XML input stream.specification - A Specification to use.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.public java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||