Package megamek.common.jacksonAdapters
Class PrincessSettingsBuilder
java.lang.Object
megamek.common.jacksonAdapters.PrincessSettingsBuilder
This class is a builder for settings for a Princess bot (BehaviorSettings) and also supports parsing such settings
from a yaml MM scenario definition. The difference to BehaviorSettings itself is that this builder can work with
incomplete settings, such as only a change to mutual support or only a change to auto-flee. When building the final
BehaviorSettings, either default values or the values of a given other BehaviorSettings are used where the builder
has no value.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbravery(int bravery) build()Returns new BehaviorSettings based on the Princess default settings.build(BehaviorSettings previousSettings) Returns new BehaviorSettings based on the given settings.description(String description) fallShame(int fallShame) flee(boolean flee) hyperAggression(int hyperAggression) mutualSupport(int mutualSupport) selfPreservation(int selfPreservation) setFleeEdge(String edge) useWithdraw(boolean useWithdraw) withdrawEdge(String edge)
-
Constructor Details
-
PrincessSettingsBuilder
public PrincessSettingsBuilder()
-
-
Method Details
-
selfPreservation
-
fallShame
-
hyperAggression
-
mutualSupport
-
bravery
-
flee
-
useWithdraw
-
setFleeEdge
-
withdrawEdge
-
posture
-
description
-
build
Returns new BehaviorSettings based on the given settings. Settings that are present in this builder overwrite the previous settings, otherwise the previous settings are left unchanged.- Parameters:
previousSettings- Settings to base the new settings on- Returns:
- New BehaviorSettings that incorporate the settings of this builder
-
build
Returns new BehaviorSettings based on the Princess default settings. Settings that are present in this builder overwrite the default settings, others are left at their default values.- Returns:
- New BehaviorSettings that incorporate the settings of this builder
-