HeroStatusFlag
Bases: _DataSetIntFlags
This enum class provides the integer values for the different hero status flags that can be used in the 'Modify Attribute' effect with the 'Hero Status' attribute. This is a combinable bit field
Methods
HeroStatusFlag.combine()
HeroStatusFlag.split_flags()
Examples
Source code in AoE2ScenarioParser/datasets/trigger_lists/hero_status_flag.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
Attributes¶
Functions¶
def combine(...)
staticmethod
¶
This method combines the given hero status flags into an integer value
Parameters:
Name | Type | Description | Default |
---|---|---|---|
full_hero_status |
bool
|
Enabling this for a unit grants all the flags mentioned below except invert_all_flags |
False
|
cannot_be_converted |
bool
|
Enabling this for a unit makes it un-convertable |
False
|
hero_regeneration |
bool
|
Enabling this for a unit grants 0.5 HP/s heal rate to the unit |
False
|
defensive_stance_by_default |
bool
|
Enabling this for a unit makes it be on defensive stance by default |
False
|
protected_formation |
bool
|
Enabling this for a unit makes it be in protected formation by default |
False
|
delete_confirmation |
bool
|
Enabling this for a unit will bring up a delete confirmation for the unit when trying |
False
|
hero_glow |
bool
|
Enabling this for a unit grants it the golden hero glow effect |
False
|
invert_all_flags |
bool
|
Enabling this for a unit will invert all the above flags except full_hero_status |
False
|
Returns:
Type | Description |
---|---|
HeroStatusFlag
|
An integer combining all the different hero status flags into one value |
Source code in AoE2ScenarioParser/datasets/trigger_lists/hero_status_flag.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
def split_flags(...)
staticmethod
¶
Split the Hero Status flags into boolean variables related to their effects
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
int
|
An integer value representing all the hero status flags set |
required |
Returns:
Type | Description |
---|---|
Dict[HeroStatusFlag, bool]
|
A dict with all the flags values as keys and a bool as their value |
Source code in AoE2ScenarioParser/datasets/trigger_lists/hero_status_flag.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|