mafia_ability
Vars | |
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) |
Procs | |
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 |
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. |
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.