Package net.sf.colossus.ai.objectives
Class PreserveCreatureTacticalObjective
- java.lang.Object
-
- net.sf.colossus.ai.objectives.AbstractTacticalObjective
-
- net.sf.colossus.ai.objectives.PreserveCreatureTacticalObjective
-
- All Implemented Interfaces:
TacticalObjective
class PreserveCreatureTacticalObjective extends AbstractTacticalObjective
The tactical objective of preserving all of a specific CreatureType. The evaluation function currently return the negative of the highest amount of point gang-banging any one of the creaturetype in our legion, multiplied by the priority. Rangestriker count for half. This doesn't take a number into account, so if you try to preserve 2 out of 3 Lions, this will try to protect ALL Lions. This is capped to 0 after the objective has failed. The objective is attained as long as enough creature are alive.- Author:
- Romain Dolbeau
-
-
Constructor Summary
Constructors Constructor Description PreserveCreatureTacticalObjective(float priority, Client client, Legion liveLegion, Creature critter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Get the description of this objective.boolean
objectiveAttained()
Whether the objective is already achievedValueRecorder
situationContributeToTheObjective()
How much does the 'current situation' contributes to the objective.-
Methods inherited from class net.sf.colossus.ai.objectives.AbstractTacticalObjective
changePriority, getPriority
-
-
-
-
Method Detail
-
objectiveAttained
public boolean objectiveAttained()
Description copied from interface:TacticalObjective
Whether the objective is already achieved- Returns:
- Whether the objective is already achieved
-
situationContributeToTheObjective
public ValueRecorder situationContributeToTheObjective()
Description copied from interface:TacticalObjective
How much does the 'current situation' contributes to the objective. The actual value is currently added to the overall evaluation of the whole legion move.- 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.
-
-