net.sf.freecol.server.ai.goal
Class CreateMissionAtSettlementGoal
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.CreateMissionAtSettlementGoal
- All Implemented Interfaces:
- GoalConstants
public class CreateMissionAtSettlementGoal
- extends Goal
This Goal
deals with one missionary unit.
On construction, an AIUnit
and an IndianSettlement
are given to this.
The Goal will try to create a mission at that settlement,
eventually by bringing the missionary unit there first using a GotoAdjacentGoal
.
Should the target become invalid, the missionary will be given back
to the parent of this goal (ManageMissionariesGoal
, in most cases).
Excess units will be given back to the parent, or the AIPlayer
directly.
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 |
CreateMissionAtSettlementGoal
public CreateMissionAtSettlementGoal(AIPlayer p,
Goal g,
float w,
AIUnit u,
IndianSettlement i)
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