public enum UnitAITypes extends Enum<UnitAITypes>
Unit AI Types are a collection of flags that define how the low level AI handles unit interactions. It's quite a primitive yet powerful system. However, certain proto flags tend to override this behavior.
The format is as follows:
Type "Name of type" (this will be the name you use in proto) [A collection of flags from the list below, 1 per line.]
Enum Constant and Description |
---|
Attack
If followed by a unit type: turns "can attack" ON for "Unit Type".
Else: turns "can attack" ON for every type. |
AutoAttack
If followed by a unit type: turns "auto attack" ON for "Unit Type".
Else: turns "auto attack" ON for every type. |
NoAttack
If followed by a unit type: turns "can attack" OFF for "Unit Type".
Else: turns "can attack" OFF for every type. |
NoAutoAttack
If followed by a unit type: turns "auto attack" OFF for "Unit Type".
Else: turns "auto attack" OFF for every type. |
NoRespondToAttack
If followed by a unit type: turns "attack response" OFF for "Unit Type".
Else: turns "attack response" OFF for every type. |
NoRunAway
Restricts these units from running away when they cannot return an attack.
|
RespondToAttack
If followed by a unit type: turns "attack response" ON for "Unit Type".
Else: turns "attack response" ON for every type. |
Modifier and Type | Method and Description |
---|---|
static UnitAITypes |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static UnitAITypes[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UnitAITypes Attack
public static final UnitAITypes NoAttack
public static final UnitAITypes AutoAttack
public static final UnitAITypes NoAutoAttack
public static final UnitAITypes RespondToAttack
public static final UnitAITypes NoRespondToAttack
public static final UnitAITypes NoRunAway
public static UnitAITypes[] values()
for (UnitAITypes c : UnitAITypes.values()) System.out.println(c);
public static UnitAITypes valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null