net.sf.freecol.server.ai.goal
Class ManageMissionariesGoal
java.lang.Object
net.sf.freecol.common.model.FreeColObject
net.sf.freecol.server.ai.AIObject
net.sf.freecol.server.ai.goal.Goal
net.sf.freecol.server.ai.goal.ManageMissionariesGoal
- All Implemented Interfaces:
- GoalConstants
public class ManageMissionariesGoal
- extends Goal
This Goal
deals with all missionaries of one AIPlayer
.
For each missionary unit that is being added, this goal will try to find
an IndianSettlement
needing a visit.
Distance and reachability from the current position of the unit are taken into
account, with the implicit assumption that the current location of the unit
is sensible in that a nearby settlement is even worth visiting.
Since missionary units are either created in a player-owned colony,
or brought there from Europe, this assumption will most often be valid.
If a settlement has been found, a CreateMissionAtSettlementGoal
will be created, and the unit be moved there.
Method Summary |
java.lang.String |
getGoalDescription()
Returns a string describing just this goal. |
Methods inherited from class net.sf.freecol.server.ai.goal.Goal |
addUnit, cancelGoal, canYieldUnit, doPlanning, getAbsoluteWeight, getDebugDescription, getParentWeight, getWeight, getXMLElementTagName, getYieldedUnitWeight, isFinished, needsPlanning, normalizeSubGoalWeights, setNeedsPlanningRecursive, setWeight, yieldUnit |
Methods inherited from class net.sf.freecol.common.model.FreeColObject |
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readFromXMLElement, removePropertyChangeListener, removePropertyChangeListener, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, writeAttribute, writeFreeColGameObject |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManageMissionariesGoal
public ManageMissionariesGoal(AIPlayer p,
Goal g,
float w)
getGoalDescription
public java.lang.String getGoalDescription()
- Description copied from class:
Goal
- Returns a string describing just this goal.
An implementing class may override this method to add specialized information.
Used by
getDebugDescription
.
- Overrides:
getGoalDescription
in class Goal
- Returns:
- a string describing this goal