stratega.Action

class stratega.Action

Contains the main information of an action as the action type id that is linked to an ActionType

__init__(self: stratega.Action, actionType: SGA::ActionType) None

Methods

__init__(self, actionType)

create_abort_entity_action(arg0, arg1, arg2)

Generates an Action which the owner is a entity, used by the game to abort a continuous action.

create_abort_player_action(arg0, arg1)

Generates an Action which the owner is a player, used by the game to abort a continuous action.

create_end_action(playerID, newActionType)

Generates an Action used by the game to end the tick/turn.

execute(self, state, fm)

Execute the effects defined in the SGA::ActionType linked to this action.

get_action_flag(self)

get_action_name(self)

Returns the name of this action

get_action_source_type(self)

Checks if this action is to be executed over an entity.

get_action_type(self)

Checks if this action is to be executed over an entity.

get_action_type_id(self)

Returns the action type ID of this action

get_continuous_action_id(self)

get_elapsed_ticks(self)

get_owner_id(self)

get_source_id(self)

Gets the player or entity ID of the target of this action

get_targets(self)

incTicks(self)

is_entity_action(self)

Checks if this action is to be executed over an entity.

is_player_action(self)

Checks if this action is to be executed over a player.

set_action_flag(self, flag)

set_action_targets(self, actionTargets)

set_continuous_action_id(self, id)

set_elapsed_ticks(self, elapsed)

set_owner_id(self, id)

validate(self, state)

Checks if this action can be executed.

Attributes

action_flag

continuous_action_id

elapsed_ticks

max_value