yawning_titan.config.groups.core#
Classes
Group to represent an action, likelihood, and chance common config group. |
|
Group to represent an action, likelihood common config group. |
|
Group to indicate chances of success for different node types. |
|
|
|
Group to indicate whether an element is used and its associated chance of success for different node types. |
|
Group of values that collectively describe whether an item is used and if so what value to use with. |
- class yawning_titan.config.groups.core.ActionLikelihoodGroup(doc=None, use=False, likelihood=None)[source]#
Group to represent an action, likelihood common config group.
The ActionLikelihoodGroup constructor.
- Parameters:
use – Whether to use the action or not.
likelihood – The likelihood of the action.
doc – An optional descriptor.
- __init__(doc=None, use=False, likelihood=None)[source]#
The ActionLikelihoodGroup constructor.
- Parameters:
use – Whether to use the action or not.
likelihood – The likelihood of the action.
doc – An optional descriptor.
- validate()[source]#
Validate the ActionLikelihoodGroup.
- This is done at two levels:
1. A group level validation is performed that checks if likelihood and chance are provided when use is True. 2. An item level validation is performed by calling .validate on the use and likelihood config items.
- Returns:
An instance of ConfigGroupValidation.
- class yawning_titan.config.groups.core.ActionLikelihoodChanceGroup(doc=None, use=False, likelihood=None, chance=None)[source]#
Group to represent an action, likelihood, and chance common config group.
The ActionLikelihoodChanceGroup constructor.
- Parameters:
use – Whether to use the action or not.
likelihood – The likelihood of the action.
chance – The chance of the action.
doc – An optional descriptor.
- __init__(doc=None, use=False, likelihood=None, chance=None)[source]#
The ActionLikelihoodChanceGroup constructor.
- Parameters:
use – Whether to use the action or not.
likelihood – The likelihood of the action.
chance – The chance of the action.
doc – An optional descriptor.
- validate()[source]#
Validate the ActionLikelihoodChanceGroup.
- This is done at two levels:
1. A group level validation is performed that checks if likelihood and chance are provided when use is True. 2. An item level validation is performed by calling .validate on the use, likelihood, and chance config items.
- Returns:
An instance of ConfigGroupValidation.
- class yawning_titan.config.groups.core.UseValueGroup(doc=None, use=False, value=None)[source]#
Group of values that collectively describe whether an item is used and if so what value to use with.
The UseValueGroup constructor.
- Parameters:
use – Whether to use the action or not.
value – The value of the item.
doc – An optional descriptor.
- class yawning_titan.config.groups.core.NodeChanceGroup(doc=None, standard_node=0.5, deceptive_node=0.5)[source]#
Group to indicate chances of success for different node types.
The ConfigGroup constructor.
- Parameters:
doc – The groups doc.
- class yawning_titan.config.groups.core.UseChancesGroup(doc=None, use=False, chance=None)[source]#
Group to indicate whether an element is used and its associated chance of success for different node types.
The ConfigGroup constructor.
- Parameters:
doc – The groups doc.
- class yawning_titan.config.groups.core.RestrictRangeGroup(doc=None, restrict=False, min=None, max=None)[source]#
ConfigGroup
to restrict the range of a given attribute to within :attribute: min and :attribute: max.The ConfigGroup constructor.
- Parameters:
doc – The groups doc.