Package net.sf.colossus.ai.objectives
Class CreatureAttackTacticalObjective
- java.lang.Object
-
- net.sf.colossus.ai.objectives.AbstractTacticalObjective
-
- 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
Fields Modifier and Type Field Description private AbstractAIaiprivate BattleEvalConstantsbecprivate Clientclientprivate Creaturecreatureprivate LegionliveLegion
-
Constructor Summary
Constructors Constructor Description CreatureAttackTacticalObjective(float priority, Client client, Legion liveLegion, Creature creature, AbstractAI ai, BattleEvalConstants bec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCount()java.lang.StringgetDescription()Get the description of this objective.booleanobjectiveAttained()Whether the objective is already achievedValueRecordersituationContributeToTheObjective()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
-
-
-
-
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:TacticalObjectiveWhether 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:TacticalObjectiveGet the description of this objective.- Returns:
- The description of this objective.
-
-