stratega.ActionType

class stratega.ActionType

Contains the definition of an action. Which type is the source SGA::ActionSourceType , a set effects,preconditions and a list of action targets linked to their target conditions.If the action is continuous it will have a set of effects as events:OnStart, OnTick, OnComplete, OnAbort and the list of conditions that triggers the completed action.

__init__(self: stratega.ActionType) None

Methods

__init__(self)

get_cooldown(self)

Number of ticks/turn that must happen between two uses of this action.

get_effects(self)

List of effects this action causes when executed.

get_id(self)

Unique ID of this action type

get_name(self)

Name of this action type.

get_on_abort(self)

For continuous actions, list of effects that are applied when this action is aborted.

get_on_complete(self)

For continuous actions, list of effects that are applied when this action ends.

get_on_start(self)

For continuous actions, list of effects that are applied when this action starts.

get_on_tick(self)

For continuous actions, list of effects that are applied on every tick/turn.

get_preconditions(self)

List of preconditions for this action to be run.

get_source_type(self)

Source of this action (entity, player...)

get_target_conditions(self, searchingTarget)

Returns a list of conditions linked to the searched target.

get_targets(self)

List of target types of this action with their conditions.

get_trigger_complete(self)

Continuous actions finish when certain conditions are met.

is_continuous(self)

set_Cooldown(self, cd)

Number of ticks/turn that must happen between two uses of this action.

set_continuous(self, c)

set_id(self, id)

Unique ID of this action type

set_name(self, name)

Name of this action type.

set_source_type(self, ast)

Source of this action (entity, player...)

Attributes

continuous

cooldown

id

name

source_type