net.sf.colossus.ai.objectives
Class CreatureAttackTacticalObjective

java.lang.Object
  extended by net.sf.colossus.ai.objectives.AbstractTacticalObjective
      extended by net.sf.colossus.ai.objectives.CreatureAttackTacticalObjective
All Implemented Interfaces:
TacticalObjective

 class CreatureAttackTacticalObjective
extends AbstractTacticalObjective

The objective of sending all of a CreatureType into battle, presumably because we don't really need them for anything else.

Author:
Romain Dolbeau

Field Summary
private  AbstractAI ai
           
private  BattleEvalConstants bec
           
private  Client client
           
private  Creature creature
           
private  Legion liveLegion
           
 
Constructor Summary
CreatureAttackTacticalObjective(float priority, Client client, Legion liveLegion, Creature creature, AbstractAI ai, BattleEvalConstants bec)
           
 
Method Summary
 int getCount()
           
 java.lang.String getDescription()
          Get the description of this objective.
 boolean objectiveAttained()
          Whether the objective is already achieved
 ValueRecorder situationContributeToTheObjective()
          This is mostly a copy/paste from the EvaluateCritterMove_Strike and EvaluateCritterMove_Rangestrike functions in SimpleAI.
 
Methods inherited from class net.sf.colossus.ai.objectives.AbstractTacticalObjective
changePriority, getPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

creature

private final Creature creature

liveLegion

private final Legion liveLegion

client

private final Client client

ai

private final AbstractAI ai

bec

private final BattleEvalConstants bec
Constructor Detail

CreatureAttackTacticalObjective

CreatureAttackTacticalObjective(float priority,
                                Client client,
                                Legion liveLegion,
                                Creature creature,
                                AbstractAI ai,
                                BattleEvalConstants bec)
Method Detail

objectiveAttained

public boolean objectiveAttained()
Description copied from interface: TacticalObjective
Whether the objective is already achieved

Returns:
Whether the objective is already achieved

getCount

public int getCount()

situationContributeToTheObjective

public ValueRecorder situationContributeToTheObjective()
This is mostly a copy/paste from the EvaluateCritterMove_Strike and EvaluateCritterMove_Rangestrike functions in SimpleAI. This is known. The goal is indeed to replace the big hardwired functions in SimpleAI by a bunch of objectives, so we can tweak what critter does what in an easier way.

Returns:
How much does he 'current situation' contributes to the objective

getDescription

public java.lang.String getDescription()
Description copied from interface: TacticalObjective
Get the description of this objective.

Returns:
The description of this objective.