Consume targeted item action
ConsumeTargetedItemAction
class
¶
Bases: Action
Action which handles consuming an targeted item if it is consumable with the invoking entity as the consumer.
Attributes
Name | Type | Description |
---|---|---|
engine |
Engine
|
Engine representing the current game. |
entity |
ActiveEntity
|
Entity that invoked this action. |
target_location |
tuple[int, int]
|
Location of the target. |
item |
Item | None
|
Item to consume. |
Parameters
Name | Type | Description | Default |
---|---|---|---|
engine |
Engine
|
Engine representing the current game. |
required |
entity |
ActiveEntity
|
Entity that invoked this action. |
required |
target_location |
tuple[int, int]
|
Location of the target. |
required |
item |
Item | None
|
Item to consume. |
None
|
perform
method
¶
Method to consume the item with the invoking entity as the consumer.
Raises
Type | Description |
---|---|
ImpossibleActionException
|
If |