/tg/ Station 13 - Modules - TypesVar Details - Proc Details

mafia_ability

Vars

action_priorityThe priority level this action must be sent at. Setting this to null will prevent it from being triggered automatically. (COMSIG_MAFIA_NIGHT_PRE_ACTION_PHASE|COMSIG_MAFIA_NIGHT_ACTION_PHASE|COMSIG_MAFIA_NIGHT_KILL_PHASE)
host_roleThe mafia role that holds this ability.
target_roleThe mafia role this ability is targeting, if necessary.
use_flagsWhether this ability can be used on yourself. Selections: (CAN_USE_ON_OTHERS | CAN_USE_ON_SELF | CAN_USE_ON_DEAD)
using_abilityBoolean on whether the ability was selected to be used during the proper period.
valid_use_periodWhen the ability can be used: (MAFIA_PHASE_DAY | MAFIA_PHASE_VOTING | MAFIA_PHASE_NIGHT)

Procs

clean_action_refsCalled when refs need to be cleared, when the target is no longer set.
handle_speechHandles special messagese sent by ability-specific stuff (such as changeling chat).
perform_action_targetCalled when using the ability. Will first check if you are using the ability, then whether you can use it. Finally it will check if you are interrupted, then will pass that you've performed it. Args: game - The Mafia controller that holds reference to the game. day_target - Set when using actions during the day, this is the person that is the target during this phase.
set_target##set_target
validate_action_targetUsed to check if this ability can be used on a potential target. Args: game - The Mafia controller that holds reference to the game. potential_target - The player we are attempting to validate the action on. silent - Whether to give feedback to the player about why the action cannot be used.

Var Details

action_priority

The priority level this action must be sent at. Setting this to null will prevent it from being triggered automatically. (COMSIG_MAFIA_NIGHT_PRE_ACTION_PHASE|COMSIG_MAFIA_NIGHT_ACTION_PHASE|COMSIG_MAFIA_NIGHT_KILL_PHASE)

host_role

The mafia role that holds this ability.

target_role

The mafia role this ability is targeting, if necessary.

use_flags

Whether this ability can be used on yourself. Selections: (CAN_USE_ON_OTHERS | CAN_USE_ON_SELF | CAN_USE_ON_DEAD)

using_ability

Boolean on whether the ability was selected to be used during the proper period.

valid_use_period

When the ability can be used: (MAFIA_PHASE_DAY | MAFIA_PHASE_VOTING | MAFIA_PHASE_NIGHT)

Proc Details

clean_action_refs

Called when refs need to be cleared, when the target is no longer set.

handle_speech

Handles special messagese sent by ability-specific stuff (such as changeling chat).

perform_action_target

Called when using the ability. Will first check if you are using the ability, then whether you can use it. Finally it will check if you are interrupted, then will pass that you've performed it. Args: game - The Mafia controller that holds reference to the game. day_target - Set when using actions during the day, this is the person that is the target during this phase.

set_target

##set_target

Used for Night abilities ONLY Sets the ability's target, which will cause the action to be performed on them at the end of the night. Subtypes can override this for things like self-abilities (such as shooting visitors).

validate_action_target

Used to check if this ability can be used on a potential target. Args: game - The Mafia controller that holds reference to the game. potential_target - The player we are attempting to validate the action on. silent - Whether to give feedback to the player about why the action cannot be used.