net.sf.freecol.server.ai.goal
Class CreateMissionAtSettlementGoal

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      extended by net.sf.freecol.server.ai.AIObject
          extended by net.sf.freecol.server.ai.goal.Goal
              extended by 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.


Field Summary
 
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ID_ATTRIBUTE_TAG
 
Fields inherited from interface net.sf.freecol.server.ai.goal.GoalConstants
MAX_SEARCH_RADIUS
 
Constructor Summary
CreateMissionAtSettlementGoal(AIPlayer p, Goal g, float w, AIUnit u, IndianSettlement i)
           
 
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.server.ai.AIObject
dispose, getAIMain, getGame, isUninitialized, readFromXML
 
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
 

Constructor Detail

CreateMissionAtSettlementGoal

public CreateMissionAtSettlementGoal(AIPlayer p,
                                     Goal g,
                                     float w,
                                     AIUnit u,
                                     IndianSettlement i)
Method Detail

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