Events/targeted command

The targeted_command event is usually called whenever a role command which takes a target is executed. Certain roles may not fire this event, usually these roles act on night 1 only.

Event callback

 * prevent_default prevents the command from being executed. It is the handler's responsibility to somehow inform the player of this fact (e.g. by calling ).
 * : The event object
 * : The IRC connection
 * : Reference to the src.settings module
 * : Command being executed
 * : Person using the command
 * : Person originally targeted by the command. This may be different than who is currently being targeted, and should only be checked if knowing the original target is important
 * : Collection of tags that describe this command, see below for more information

Event data
The target data property holds the current target of the command, which may be different than orig_target. If misdirection is True, misdirection/luck totems are applied to the target. If exchange is True, exchange totems are applied to the target. The handling for misdirection and exchange totems happens on event priority 9, so events that wish to modify these properties should register a lower priority number. Events that wish to check the target after misdirection or luck totems are applied should register a higher priority number.

Tags
The following is a summary of the various tags applied to commands, this list may grow over time. Most tags are purely informational, that is, they have no defined game function. However, they are presented anyway in case they are useful for consumers of the event.


 * info: The command gives information to the person that uses it (such as a seer's see or a werecrow's observe).
 * detrimental: The command has a direct negative impact on the target (such as a wolf's kill or a doomsayer's see).
 * beneficial: The command has a direct positive impact on the target (such as a guardian angel's guard). If a command lacks this tag, it cannot be used to target a succubus.
 * immediate: The results of the command happen immediately; that is, the actor cannot change their target once the command is executed. The lack of this tag implies the opposite, where the actor can change their mind before the command takes effect.