Class TraitOption
Represents the effects that will be applied to a set of characters when the condition of having a certain number of characters in play is met.
Namespace: AutoBattleFramework.Stats
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class TraitOption
Fields
modificator
Modification of the stats that will be applied to the characters when this option is applied.
Declaration
public StatsModificator modificator
Field Value
Type | Description |
---|---|
StatsModificator |
NumberOfTraits
Number of characters in play required for this option to be activated.
Declaration
public int NumberOfTraits
Field Value
Type | Description |
---|---|
Int32 |
OptionDescription
Description of the effects of this option.
Declaration
public string OptionDescription
Field Value
Type | Description |
---|---|
String |
SelectedTraits
The effects of this option will be applied to all characters that share at least one trait in this list. Only if Target is set to SelectedTraits.
Declaration
public List<Trait> SelectedTraits
Field Value
Type | Description |
---|---|
List<Trait> |
Target
To whom the effects of this option apply.
Declaration
public TraitOption.TraitTarget Target
Field Value
Type | Description |
---|---|
TraitOption.TraitTarget |
TraitOptionColor
Description of the effects of this option.
Declaration
public Color TraitOptionColor
Field Value
Type | Description |
---|---|
Color |
Methods
Activate(GameCharacter, Trait)
Activate this option in a character.
Declaration
public void Activate(GameCharacter character, Trait trait)
Parameters
Type | Name | Description |
---|---|---|
GameCharacter | character | Character to which the effects of this option will be applied. |
Trait | trait | Trait that contains this option. |
Deactivate(GameCharacter, Trait)
Dectivate this option in a character.
Declaration
public void Deactivate(GameCharacter character, Trait trait)
Parameters
Type | Name | Description |
---|---|---|
GameCharacter | character | Character to which the effects of this option will be removed. |
Trait | trait | Trait that contains this option. |
OnActivation(GameCharacter, Trait)
Method that is called only once when the option is activated.
Declaration
protected virtual void OnActivation(GameCharacter character, Trait trait)
Parameters
Type | Name | Description |
---|---|---|
GameCharacter | character | Character that activates the option. |
Trait | trait | Trait containing this option. |
OnDeactivation(GameCharacter, Trait)
Method that is called only once when the option is deactivated.
Declaration
protected virtual void OnDeactivation(GameCharacter character, Trait trait)
Parameters
Type | Name | Description |
---|---|---|
GameCharacter | character | Character that deactivates the option. |
Trait | trait | Trait containing this option. |