Package megamek.client.bot.princess
Class BehaviorSettingsFactory
java.lang.Object
megamek.client.bot.princess.BehaviorSettingsFactory
- Since:
- 9/6/13 6:50 PM
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BehaviorSettingsDestination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NONE
Forced Withdrawal: False
Go Home: False
Auto Flee: False
Fall Shame: 2
Hyper Aggression: 10
Self Preservation: 2
Mutual Support: 5
Bravery: 9
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: Nonestatic final Stringfinal BehaviorSettingsDestination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: True
Auto Flee: True
Fall Shame: 6
Hyper Aggression: 3
Self Preservation: 10
Mutual Support: 5
Bravery: 2
Anti-Crowding: 5
Favor Higher TMM: 10
Ignore Damage Output: True
Strategic Targets: Nonestatic final Stringfinal BehaviorSettingsDestination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: False
Auto Flee: False
Fall Shame: 8
Hyper Aggression: 1
Self Preservation: 10
Mutual Support: 8
Bravery: 2
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: Nonestatic final Stringfinal BehaviorSettingsDestination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: False
Auto Flee: False
Fall Shame: 5
Hyper Aggression: 5
Self Preservation: 5
Mutual Support: 5
Bravery: 5
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: Nonestatic final Stringfinal BehaviorSettingsDestination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: True
Auto Flee: True
Fall Shame: 7
Hyper Aggression: 3
Self Preservation: 10
Mutual Support: 5
Bravery: 2
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: Nonestatic final Stringfinal BehaviorSettingsDestination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: True
Auto Flee: True
Fall Shame: 7
Hyper Aggression: 3
Self Preservation: 10
Mutual Support: 5
Bravery: 2
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: Nonestatic final Stringfinal BehaviorSettingsDestination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: True
Auto Flee: True
Fall Shame: 7
Hyper Aggression: 3
Self Preservation: 10
Mutual Support: 5
Bravery: 2
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: Nonestatic final String -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBehavior(BehaviorSettings behaviorSettings) Adds aBehaviorSettingsto the cache.getBehavior(String desc) Returns the namedBehaviorSettings.Returns a list of the names of all the availableBehaviorSettings.String[]getBehaviorOrDefault(String desc, BehaviorSettings defaultBehavior) Returns the namedBehaviorSettings.static BehaviorSettingsFactoryvoidinit(boolean reinitialize) Initializes theBehaviorSettingscache.voidremoveBehavior(String settingName) Removes the behavior setting with the given name from the cache.voidsaveBehaviorSettings(boolean includeTargets) Saves the contents of the cache to the mmconf/princessBehaviors.xml file.
-
Field Details
-
BERSERK_BEHAVIOR
Destination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NONE
Forced Withdrawal: False
Go Home: False
Auto Flee: False
Fall Shame: 2
Hyper Aggression: 10
Self Preservation: 2
Mutual Support: 5
Bravery: 9
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: None -
BERSERK_BEHAVIOR_DESCRIPTION
- See Also:
-
COWARDLY_BEHAVIOR
Destination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: False
Auto Flee: False
Fall Shame: 8
Hyper Aggression: 1
Self Preservation: 10
Mutual Support: 8
Bravery: 2
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: None -
COWARDLY_BEHAVIOR_DESCRIPTION
- See Also:
-
ESCAPE_BEHAVIOR
Destination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: True
Auto Flee: True
Fall Shame: 7
Hyper Aggression: 3
Self Preservation: 10
Mutual Support: 5
Bravery: 2
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: None -
ESCAPE_BEHAVIOR_DESCRIPTION
- See Also:
-
RUTHLESS_BEHAVIOR
Destination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: True
Auto Flee: True
Fall Shame: 7
Hyper Aggression: 3
Self Preservation: 10
Mutual Support: 5
Bravery: 2
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: None -
RUTHLESS_BEHAVIOR_DESCRIPTION
- See Also:
-
PIRATE_BEHAVIOR
Destination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: True
Auto Flee: True
Fall Shame: 7
Hyper Aggression: 3
Self Preservation: 10
Mutual Support: 5
Bravery: 2
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: None -
PIRATE_BEHAVIOR_DESCRIPTION
- See Also:
-
CONVOY_BEHAVIOR
Destination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: True
Auto Flee: True
Fall Shame: 6
Hyper Aggression: 3
Self Preservation: 10
Mutual Support: 5
Bravery: 2
Anti-Crowding: 5
Favor Higher TMM: 10
Ignore Damage Output: True
Strategic Targets: None -
CONVOY_BEHAVIOR_DESCRIPTION
- See Also:
-
DEFAULT_BEHAVIOR
Destination Edge:CardinalEdge.NONE
Retreat Edge:CardinalEdge.NEAREST
Forced Withdrawal: True
Go Home: False
Auto Flee: False
Fall Shame: 5
Hyper Aggression: 5
Self Preservation: 5
Mutual Support: 5
Bravery: 5
Anti-Crowding: 0
Favor Higher TMM: 0
Strategic Targets: None -
DEFAULT_BEHAVIOR_DESCRIPTION
- See Also:
-
-
Method Details
-
getInstance
-
init
public void init(boolean reinitialize) Initializes theBehaviorSettingscache. If the cache is empty, it will load from mmconf/princessBehaviors.xml. Also, if the "DEFAULT" behavior is missing, it will be added.- Parameters:
reinitialize- Set TRUE to force the cache to be completely rebuilt.
-
addBehavior
Adds aBehaviorSettingsto the cache. If a behavior with the same name is already in the cache, it will be overwritten.- Parameters:
behaviorSettings- TheBehaviorSettingsto be added to the cache.
-
removeBehavior
Removes the behavior setting with the given name from the cache. Returns the BehaviorSettings that was removed (or null if there was no such BehaviorSettings). -
getBehavior
Returns the namedBehaviorSettings.- Parameters:
desc- The name of the behavior; matched toBehaviorSettings.getDescription().- Returns:
- The named behavior or NULL if no match is found.
-
getBehaviorOrDefault
Returns the namedBehaviorSettings.- Parameters:
desc- The name of the behavior; matched toBehaviorSettings.getDescription().- Returns:
- The named behavior or default if no match is found.
-
saveBehaviorSettings
public void saveBehaviorSettings(boolean includeTargets) Saves the contents of the cache to the mmconf/princessBehaviors.xml file.- Parameters:
includeTargets- Set TRUE to include the contents of the Strategic Targets list.
-
getBehaviorNames
- Returns:
- an array of the names of all the
BehaviorSettingsin the cache.
-
getBehaviorNameList
Returns a list of the names of all the availableBehaviorSettings.
-