Action¶
-
class
Affliction
(origin: int, affected_entity: int, duration: int)[source]¶ Bases:
scripts.engine.internal.action.Action
A subclass of Affliction represents an affliction (a semi-permanent modifier) and holds all the data that is not dependent on the individual instances - stuff like applicable targets etc.
An instance of Affliction represents an individual application of that affliction, and holds only the data that is tied to the individual use - stuff like the user and target.
-
__init__
(origin: int, affected_entity: int, duration: int)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
Behaviour
(attached_entity: int)[source]¶ Bases:
abc.ABC
Base class for AI behaviours. Not really an Action, as such, more of a super class that determines when npcs will use Actions.
-
class
DelayedSkill
(attached_entity: int)[source]¶ Bases:
scripts.engine.internal.action.Behaviour
After duration ends trigger skill centred on self.
-
class
Projectile
(attached_entity: int)[source]¶ Bases:
scripts.engine.internal.action.Behaviour
Move in direction, up to max_range (in tiles). Speed is time spent per tile moved.
-
class
Skill
(user: int, target_tile: scripts.engine.world_objects.tile.Tile, direction: DirectionType)[source]¶ Bases:
scripts.engine.internal.action.Action
A subclass of Skill represents a skill and holds all the data that is not dependent on the individual cast - stuff like shape, base accuracy, etc.
An instance of Skill represents an individual use of that skill, and additionally holds only the data that is tied to the individual use - stuff like the user and target.
-
__init__
(user: int, target_tile: scripts.engine.world_objects.tile.Tile, direction: DirectionType)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
SkillModifier
(owner)[source]¶ Bases:
abc.ABC
The base class for blessings. Blessings modify skills through the effects applied.
-
apply
(effects: List[scripts.engine.core.effect.Effect], owner, target)[source]¶ This is the core function of the blessing. It takes the effect stack and modifies it with the blessing.
-
property
involved_effects
¶ Get the set of effects involved in the blessing.
-
-
register_action
(cls: Type[Union[Action, Behaviour, SkillModifier]])[source]¶ Initialises the class properties set by external data, if appropriate, and adds to the action registry for use by the engine.